storyboard segue setup encourages buggy, sloppy programming

Originator:neilmggall
Number:rdar://10992368 Date Originated:6 March 2012
Status:Open Resolved:
Product:iPhone SDK Product Version:5.0.1
Classification:UI/Usability Reproducible:Always
 
Summary:
When using storyboards, segues are set up by setting an identifier in the UI editor then string matching this identifier in the view controller's prepareForSegue: method. This is naïve design at best and positively encourages buggy, sloppy programming at worst.

A much better solution would be to allow segues to connect to an optional prepare: selector, specified as an IBAction in the view controller. Then the correct piece of code could be attached to the segue in the UI editor, avoiding all that dangerous mucking about with identifier string matching.

Steps to Reproduce:
Use storyboards. Create a segue that requires custom setup. Experience pain.

Expected Results:
Development tools that make life easier.

Actual Results:
Bugs, messy code, sadness.

Regression:
No.

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!