Adding view to storyboard programmatically?

I am loading a viewController via a storyboard segue and I want to add a UIImageView to the controller programmatically (instead of creating it in the storyboard). Usually when working without a Storyboard or NIB I would do this in loadView: is there an appropriate place for this when using storyboards or does the storyboard drop you in a bit late in the day for that?

EDIT: Updated error regarding NIB and loadView:

Answers


If you're using a NIB you shouldn't really be adding anything using loadView:. You should be using viewDidLoad:. This also works when using Storyboards.


Need Your Help

Why this is so slow? (loop in a DF row vs. a standalone vector)

performance r

I have a piece of code and total elapsed time is around 30 secs of which, the following code is around 27 secs. I narrowed the offending code to this:

Objective C Issue With Rounding Float

iphone objective-c floating-point double decimal

I have an issue with rounding the result of a calculation to two decimal places.