2

My iOS 5 project uses storyboards. I have a view whose view controller inherits from a class that in turn inherits from UIViewController. This class belongs to a framework that was written for non-storyboard projects, i.e. it initialises the view by overriding loadView. When my view controller runs, it receives self.view as set up by the super class, thus rendering ineffective the Interface Builder settings for the current view.

While I do have the source code of the framework I'm using, and in theory could edit it to remove the loadView override and relocate the code to viewDidLoad for example, I'm wondering if there is a better way to do this just from my own code. Basically I would need to have my [super loadView] un-overriden, or bypass it by calling my superclass's superclass's (i.e. UIViewController) loadView. Is there any way to achieve this?

lucianf
  • 547
  • 7
  • 17
  • So long as you call `[super loadView]` in every subclass, you would doing what you describe. And "unoverriding" the method would just be leaving it blank with a super call. – CodaFi May 29 '12 at 06:19
  • Well, a blank method with just [super loadView] would mean calling my framework's loadView, which is exactly what I want to bypass, because there the view is replaced and I lose what's configured inside IB. I just need a way to prevent that. – lucianf May 29 '12 at 08:57

0 Answers0