ios - Programmatically moving to other view results in black screen -
i'm using code programmatically move main screen (login page) view behind it, gives black screen;
landingcontroller *landingcontroller = [[landingcontroller alloc] init]; [self presentviewcontroller:landingcontroller animated:yes completion:nil];
i've included landingcontroller.h
file viewcontroller.h
, doesn't give errors.
when remove storyboard id landingcontroller
(which isn't referred to) in above code, message:
/users/allendar/desktop/ios apps/#hidden# app/#hidden# app/base.lproj/main_ipad.storyboard: scene unreachable due lack of entry points , not have identifier runtime access via -instantiateviewcontrollerwithidentifier:.
i'm assuming has call associated controller view, whereas doesn't instantiate view's internals.
i tried other examples triggering storyboard id of landingcontroller
, either gives errors or nothing (like code does).
any ideas how can invoke view when triggering controller, or either doing through storyboard id?
try this:
uistoryboard *storybboard = [uistoryboard storyboardwithname:@"yourstoryboard" bundle:nil]; landingcontroller * landingcontroller = [storybboard instantiateviewcontrollerwithidentifier:@"storyboard id"]; [self presentviewcontroller: landingcontroller animated:yes completion:nil];
Comments
Post a Comment