iphone - Viewcontroller's view fram doesn't give accuratly -
i using 2 approaches place viewcontroller
approach 1: taking uiviewcontroller , pushing viewcontroller below [self.navigationcontroller pushviewcontroller:myviewcontroller animated:yes];
approach 2:taking uiviewcontroller using
[self presentmodalviewcontroller:myviewcontroller animated:yes]; while using approach1 "myviewcontroller" view size giving expected portrait 768*1024 coming landscape 1024*768.but approach2 not providing expected sizes first approach, both orientations giving me 768*1024
problem: issue in second approach? there solution on come issue.
in project have use second approach only. need correct dimensions.provide me suggestions.
my viewcotrollers hierarchy:
1)my project based on uitabbarviewcontroller , restricted portrait only.
2)one of uitabbarbutton loads viewcontroller ( bookbagviewcontroller *bookbagviewcontroller = [[bookbagviewcontroller alloc] init]; thenavigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:bookbagviewcontroller];)
3)bookbagviewcontroller restricted portrait.
4)bookbagviewcontroller contains 1 button once click on below code executed
myviecontroller *viewer = [[myviecontroller alloc] initwithnibname:@"myviecontroller" bundle:nil]; [self presentmodalviewcontroller:viewer animated:yes]; 5)myviecontroller supporting orientations expected not giving accurate frame size while printing (debugging).
6)for returning using below line
[self dismissmodalviewcontrolleranimated:yes]; for more info provided above steps. please accept it, lengthy.
first approach:
you pushing uiviewcontroller inside of uinavigationcontroller. besides size of uiview (which root of uiviewcontroller) need remember size of uinavigationbar of uinavigationcontroller.
second approach:
you presenting full size of uiviewcontroller on screen (you not putting inside of anything).
as problem, it's bit weird sizes not updating according orientation. show printing values?
Comments
Post a Comment