ios - Instantiate ViewController with identifier causes a crash using storyboard and a xib -


Then I am using a storyboard and an xib

I have a tableview in my ViewController I use and have a custom header as a xib file (the VC file is owner).

I want to present my new VC on swipe headers, I added a swipe signal to xib using IB, but now I am having trouble presenting it.

Crash has come when I am trying to gain the integrity of the controllerwindifier. I have made the property of my present Vice Chancellor and set the correct identifier "swipe right".

  - (IBAction) Swiped right: (ID) sender {NSLog (@ "right"); If (_mpvc == blue) {// user for those people, if only use it, do not push it twice more MPGc [self.storyboard instantiateViewControllerWithIdentifier: @ "swiperight"]; } [Self-present ViewController: Animated _mpvc: yes complete: zero]; }   

Error:

  can not be executable for CFBundle 0x9022120 & lt; / Applications / Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/ Developer / SDKs / iPhoneSimulator7.1.sdk / System / Library / AccessibilityBundles / GeoServices.axbundle & gt; (Not loaded)    

If you are inside an XIB file, you How do you know that using the storyboard? First, you need to input the storyboard in which the view controller is with the specified identifier:

  UIStoryboard * st = [UIStoryboard storyboardWithName: @ "StoryboardName" bundle: zero];   

You have to instantiate the view controller with this storyboard, which you have created:

  UIViewController _mpvc = [instantiateViewControllerWithIdentifier: @ "swipeRight"];   

Then you have to present the view controller:

  [self current viewer: Animated: _mpvc; yes complete: zero];   

Hope this solves your problem!

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -