I have some good news, and I have some bad news. The bad news is, we had to cancel the iCloud MacTech workshop. I think people have either just given up on iCloud, or (hopefully) the new API is working so well that they don't need any help.
The good news is, I will now be talking about one of my other favorite (and possibly equally controversial) topics, Auto Layout.
Here are the details:
When an Apple developer is deals with a view’s size changes, they need to adjust the layout of its content to fit within its new bounds. Traditionally, we did this using autoresizing masks. These have the advantage of being easy to understand. Unfortunately, they are also limited. In all but the most basic views, we would need to supplement our autoresizing masks with custom code to programmatically layout some or all of our subviews.
Starting with OS X 10.7 Lion and iOS 6, Apple introduced Auto Layout to help us better manage changes in our user interfaces. Auto Layout promises to fill the gaps left by autoresizing masks. In theory, it should completely eliminate the need to programmatically layout our view hierarchies. Furthermore, Auto Layout lets our views adapt to internal changes -- this means our views can automtaically adjust their size in response to changes in their content.
This is especially important with the introduction of iOS 7 and likely Mavericks. Dynamic Type allows users to change the size of the fonts in all supporting applications. If we want to support Dynamic Type, we must re-layout our user interface whenever the font size changes. In addition, many user interface elements have changed size between iOS 6 and iOS 7. If we want to support both operating systems, we need to adjust our user interface appropriately. Auto Layout helps solve both of these problems.
Auto Layout is declarative, constraints-based layout engine. Instead of specifying a view’s size or location, Auto Layout lets us define complex relationships between views, giving us an incredible amount of power--but this power comes at a cost. Auto layout has a steeper learning curve than Autoresizing.
This workshop will help you get over the steepest part of that curve. Specifically, Mastering Auto Layout will cover:
- The theory behind Auto Layout.
- Programmatically setting Auto Layout constraints using NSLayoutConstraint.
- Setting and modifying Auto Layout constraints in Interface Builder.
- Debugging Auto Layout issues.
- Best practices for using Auto Layout with iOS 7.
- Using Auto Layout to support Dynamic Type.
- Using Auto Layout to support both iOS 6 and iOS 7.
This is a hands-on workshop. Students will get experience adding, modifying and debugging Auto Layout constraints through a series of lab exercises. The class will be taught using iOS 7; however, most of the material will apply to OS X development as well.
I hope to see you there!