xcode - UIView transitions with wrong orientation -
i have code (book1 uiviewcontroller class)
book1 *book = [self.storyboard instantiateviewcontrollerwithidentifier:@"book1id"]; [uiview transitionfromview:self.view toview:book.view duration:1 options:uiviewanimationoptiontransitioncurldown completion:nil];
the viewcontroller loads orientation wrong. loads in portrait view want load in landscape.
i have following code in book1 once view loaded autorotation seems fail.
- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation{ return interfaceorientation == uiinterfaceorientationlandscapeleft || interfaceorientation == uiinterfaceorientationlandscaperight;}
how can load view in landscape?
i haven't found problem previous methods found way it.
this how:
book = [self.storyboard instantiateviewcontrollerwithidentifier:@"book1id"]; book.modaltransitionstyle = uimodaltransitionstylecoververtical; [self presentviewcontroller:book animated:yes completion:^(void){}];
special aalok parikh help
Comments
Post a Comment