Rich's Mad Rants
Powered by Squarespace

Entries in MacTech Conference (6)


Sprite Kit Demo Code

I finally had a chance to clean up the code from my Sprite Kit presentation at MacTech Conf 2013.

The code can be found here:

Sorry for the delay.


Mastering Auto-Layout Workshop

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.

You can get more information at the MacTech Conference site. If you're interested in signing up, you can also use my speakers link to get a discount.

I hope to see you there!


Just a quick update...

Summer is always an awkward time for me. I get so wrapped up with the new iOS SDK, but I cannot actually write about any of it yet. Nor can I really present the new information in my classes. It's frustrating, but also exciting. There are some cool things coming.

In the meantime, I continue to work away at the second edition of my book. It's shaping up well, and has a lot of great new information about iOS 7 in it. 

I will also be running a pre-conference workshop at MacTech Conf on implementing iCloud. This is a full-day, hands on workshop. We will take a sample project and implement all three types of iCloud syncing: key-value syncing, document syncing and even Core Data syncing. We will be looking at the strenghts and weaknesses of each approach, and dig into complex topics, like conflict resolution and duplicate entries.

More importantly, I will cover all the new tools and improved APIs for iOS 7. Unfortunatley, I can't say much about them yet--except to reassure everyone. Apple is continuing to advance and improve their iCloud support--and the changes they've made will make life much easier for everyone.

There are still seats available, if you're interesting in coming. The workshop will be on November 5th, at the Manhattan Beach Marriott, Los Angeles, CA. You can find more information at the MacTech Conference web site. Please spread the word to anyone who might be interested.


MacTech Conference 2013

Hey all,

Just wanted to let everyone know that MacTech Conf has their Super Early Bird pricing until August 15th.

I'll  be speaking again this year. Actually I'll be speaking and running a pre-conference workshop.

I'm running the Adding iCloud Syncing to your App lab. It will be a hands-on lab, where we will implement various types of iCloud syncing: Key-Value syncing, Document syncing and even the dreaded iCloud syncing. I'm putting the new iOS 7 beta through it's paces as I work on the second edition of my book--so I should have lots of new information to share.

I'll also be doing a presentation on Sprite Kit. I feel like this is really bringing everything full circle. I wrote an article on using Cocos 2D for MacTech Magazine several years ago. That article lead to my first freelance gig. Which lead to me switching to full-time iOS development. Which lead to my book. All of which lead to me talking about 2D game engines again.

I hope to see you there.



FMSSwizzler library added to GitHub

Hey all.

At the risk of repeating myself, I'll be speaking at the MacTech Conference next week in L.A. I'm actually doing two different presentations. One is on iCloud Document Syncing, the other on Metaprogramming in iOS. In my head, I'm king of thinking them as the "useful" talk and the "fun" talk.

As part of my prep, I've been putting together some examples. Here is another library of useful methods for Objective-C metaprogramming. Specifically, I have methods to simplify method- and class-swizzling. Also, unlike traditional Objective-C metaprogramming--I'm using the block-based API for dynamically adding methods to classes.

I've tried to address all the obvious gotchas (class clusters, KVO, nested dymanic subclasses, etc.), but--obviously--mucking around with classes at runtime will always be a bit dangerous. There are probably a few edge cases that I haven't though of. Take a look at the included documentation and the unit tests, if you have any questions. Most importantly, if you use the code in your own projects (not just when doing exploration coding or debugging), be sure to use it judiciously and test it ferociously.

You can find the repository at And, you can get more informaiton about MacTech Conf here.