iphone - Problem with UIPopOverController shrinking in width when navigationController pushes a new view(screenshots included) -
ok have view call homeview. when button pushed on homeview, uipopovercontroller presented in following way:
self.studypicker = [[[studypickercontroller alloc] initwithstudyarray:self.studyarray viewnum:butto.tag] autorelease]; uinavigationcontroller *navcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:self.studypicker]; _studypicker.delegate = self; self.studypickerpopover = [[[uipopovercontroller alloc] initwithcontentviewcontroller:navcontroller] autorelease]; [self.studypickerpopover presentpopoverfromrect:cgrectmake(955,60, 22,10) inview:self.view permittedarrowdirections:uipopoverarrowdirectionany animated:yes];
which works great. nice big popover controller displays tableview data way need it. fyi, in studypickercontroller viewdidload method, setting this:
self.contentsizeforviewinpopover = cgsizemake(1000.0, 610.0);
which allows me make size of tableview nice , big. the problem experiencing after select row in first tableview. navigationcontroller pushes new view fine, width of popover controller gets cut in half! doesn't make sense! have tried , can't figure out going on. in new view, called screenview, has same code in viewdidload:
self.contentsizeforviewinpopover = cgsizemake(1000.0, 610.0);
an interesting observation i've made don't know if take out contentforsize code second view in tableview, or 1 trying push within controller, when pushes, gets cut in half again, width of standard popover controller see in safari. adding code in makes 2 times wide, there 2 glued or something, still more narrow original width.
i don't know what's going on here, can me out!
thanks
here image of width should stay:
and here after pushes new view:
for each view presenting in uipopovercontroller
, set property contentsizeforviewinpopover
for example:
myviewcontroller.contentsizeforviewinpopover = cgsize(120.0f, 320.0f);
you need account size of uinavigationbar
(that uinavigationbar
) inside uipopovercontroller
overall controls stretching , contracting of uipopovercontroller
.
Comments
Post a Comment