ios - Load UIViewController -
ios - Load UIViewController -
i have 1 uiviewcontroller black background color , this:
credenciaisviewcontroller *obj = [self.storyboard instantiateviewcontrollerwithidentifier:@"credencial"]; [_viewcontainer addsubview:obj.view]; _viewcontainer.alpha = 1; credenciaisviewcontroller has reddish background color, when load half of background white.
and uibuttons when in white part not work too.
why happens? , how can prepare it?
now got it! set container view
and in action button did:
- (ibaction)mostrarcredenciais:(id)sender { credenciaisviewcontroller *credenciaisview = [self.storyboard instantiateviewcontrollerwithidentifier:@"credencial"]; [self addchildviewcontroller:credenciaisview]; [credenciaisview didmovetoparentviewcontroller:self]; credenciaisview.view.frame = self.containerview.bounds; [self.containerview addsubview:credenciaisview.view]; } and worked well!
ios xcode uiview uiviewcontroller storyboard
Comments
Post a Comment