IBOutletCollection set ordering in Interface Builder

EDIT: Several commenters have claimed that more recent versions of Xcode return IBOutletCollections in the order the connections are made. Others have claimed that this approach didn’t work for them in storyboards. I haven’t tested this myself, but if you’re willing to rely on undocumented behavior, then you may find that the explicit sorting I’ve … Read more

What are the benefits of using Storyboards instead of xib files in iOS programming?

A Storyboard is: A container for all your Scenes (View Controllers, Nav Controllers, TabBar Controllers, etc) A manager of connections and transitions between these scenes (these are called Segues) A nice way to manage how different controllers talk to each other Storyboards give you a complete look at the flow of your application that you … Read more

Does an IBOutlet needs to be a property & synthesized?

On Mac OS X, IBOutlets are connected like this: Look for a method called set<OutletName>:. If it exists call it. If no method exists, look for an instance variable named <OutletName>, set it without retaining. On iPhone OS, IBOutlets are connected like this: call [object setValue:outletValue forKey:@”<OutletName>”] The behavior of set value for key is … Read more

How to send objects in NIB files to front/back?

Just to give a clean, up-to-date answer to this: Select an interface object, then “Editor | Arrange | Send to back/front/etc”, OR Select the window object, then click on ‘Window’ above the interface editor and select the objects it contains This pic shows where to click: Or you can expand the object browser, use the … Read more