xcode - Crash in self.view after constructor on iOS 8.1 and 8.2 -


i'm trying simple spritekit action - adding view scene:

uistoryboard *mainstoryboard = [uistoryboard storyboardwithname:@"levelseditorstoryboard" bundle:[nsbundle mainbundle]]; self.levelseditor = [mainstoryboard instantiateviewcontrollerwithidentifier:@"levelseditorid"]; [self.scene.view addsubview:self.levelseditor.view]; 

on ios 8.0 , 8.3 working fine , on ios 8.1 , 8.2 i'm getting following error:

spbingo[75304:80943666] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[uitextselectionview name]: unrecognized selector sent instance 

i realised crash caused uitextfield. once i'm getting rid of it, replacing uitextfield uitextview ( not ideal whatever) view loading when try click on uitextview crashed. other input views work (switches, datapicker, tableview etc.)

after deep dive figured out problem occur in contractor already. when put breakpoint on the second line in following code :

-(instancetype) initwithcoder:(nscoder *)adecoder {     self = [super initwithcoder:adecoder];     if(self)     {     }     return self; } 

and try print "self.view" i'm getting following error:

error: execution interrupted, reason: internal objc exception breakpoint(-3).. 

the process has been returned state before expression evaluation. odd!

you cannot access view until after "viewdidload:" method signature called, otherwise attempts create view before prerequisites in place.

make sure call self.view "viewdidload:", "viewwillappear:" or "viewdidappear:" when has been setup.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -