Angela Yu Course Part 12 (up to lesson 121)
Just a quick entry - one more course so that all the Auto Complete lessons are done. The Angela Yu one has been fantastic - the best one so far! I thought about leaving her course at this stage to move on to the Ray Wenderlich one, but actually, the next one - Intermediate Swift - looks worth doing first. So after this brief entry, I should be starting Ray Wenderlich's course pretty soon!
Auto Layout Using Stack Views
These are a recent development from Apple. Putting a number of items on screen that are distributed evenly.
Copying over buttons/objects using the alt button - clicking and dragging

Another point here is that if you connect a button, then copy it, the copy will link to the code that has been created for the original button.
Once stacked, use the object in the document outline to select each one /
You can change horizontal/vertical stacking if you need to.

OK, so there were several steps to get here - embed stack view, distribute equally, spacing of 10, copied, then selected into vertical stacking...
The whole making one button twice the size of others is VERY complex - will go back to this as and when needed!

And there it is!
You can change fill equally to fill equally - this will adjust the button size so that they fill the space of what text is used. That is an option.
Well, Stack Views make total sense - I see the purpose of aligning neatly and ensure that everything uses the horizontal and vertical properly. For lots and lots of buttons/labels this is really worth doing. Anyway, that's all of auto layout for now!
*Amanda said a bonus challenge is to make this into an actual calculator app. The prospect is delicious! However I have neither the time nor the energy right now. I will have a go at this after completing the 'Intermediate' module she has next, which should be in a few days!
Auto Layout Using Stack Views
These are a recent development from Apple. Putting a number of items on screen that are distributed evenly.
Copying over buttons/objects using the alt button - clicking and dragging
Another point here is that if you connect a button, then copy it, the copy will link to the code that has been created for the original button.
Once stacked, use the object in the document outline to select each one /
You can change horizontal/vertical stacking if you need to.
OK, so there were several steps to get here - embed stack view, distribute equally, spacing of 10, copied, then selected into vertical stacking...
The whole making one button twice the size of others is VERY complex - will go back to this as and when needed!
And there it is!
You can change fill equally to fill equally - this will adjust the button size so that they fill the space of what text is used. That is an option.
Well, Stack Views make total sense - I see the purpose of aligning neatly and ensure that everything uses the horizontal and vertical properly. For lots and lots of buttons/labels this is really worth doing. Anyway, that's all of auto layout for now!
*Amanda said a bonus challenge is to make this into an actual calculator app. The prospect is delicious! However I have neither the time nor the energy right now. I will have a go at this after completing the 'Intermediate' module she has next, which should be in a few days!
Comments
Post a Comment