dimarts, d’agost 28, 2012

Property lists and push vs. modal segues

This is the first post about findings on developing an application for iOS. I've just finished  (well, almost) the Coding Together course for CS193P. The course itself ended yesterday. I'm developing a real application to be submitted to Apple in the near future but I have not presented it inside the course as the timing did not suit me.
Developing the first version of the application I discovered this:

  • property lists need to have strings as keys, otherwise when you write them to file or URL the method will return NO. This can be inferred from the fact that the property list editor in Xcode has no UI for setting the type of the keys, only for the type of the values.
  • Xcode allows you to choose Push as type of a segue even if you are not inside a Navigation Controller, although the Push type in fact makes sense only when you are inside a Navigation Controller. The initial version of my app just had a Tab Bar Controller, there will be a Navigation Controller but there is not any right now. So I had to choose Modal as segue type, since choosing Push results in the segue not being performed when you click on the button that should perform it, no exception or warning appears.