ios - View in popover is missing some, but not all, subviews -


i trying make view reveal inside popover. have done numerous times. however, reason time, popover appearing missing (but not all) of subviews.

more specifically, view contains label, text field, button, , has navigation bar @ top. when revealed, displays label, not text field, or button. ive tried , without xib , results same.

here declaration of popover.. (triggers on button click)

if (popover) {     [popover dismisspopoveranimated:no];     popover = nil; }  // create settings view controller , display in popover loginviewcontroller *loginviewcontroller = [[loginviewcontroller alloc] init]; uinavigationcontroller *nav = [[uinavigationcontroller alloc] initwithrootviewcontroller:loginviewcontroller];  // initialize popover, set parent view delegate , allocate popover's origin on screen popover = [[uipopovercontroller alloc] initwithcontentviewcontroller:nav]; popover.delegate = self; [popover presentpopoverfromrect:button.frame inview:button.superview permittedarrowdirections:uipopoverarrowdirectiondown animated:yes]; 

and in view did load of loginviewcontroller have

self.navigationitem.title = nslocalizedstring(@"popover_title_information", nil);  // setup navigation buttons uibarbuttonitem *cancelbutton = [[uibarbuttonitem alloc] initwithtitle:nslocalizedstring(@"button_title_cancel", nil) style:uibarbuttonitemstylebordered target:self action:@selector(cancel)]; uibarbuttonitem *searchbutton = [[uibarbuttonitem alloc] initwithtitle:nslocalizedstring(@"button_title_search", nil) style:uibarbuttonitemstyledone target:self action:@selector(search)]; self.navigationitem.rightbarbuttonitem = searchbutton; self.navigationitem.leftbarbuttonitem = cancelbutton;  [_logintextlabel settext:nslocalizedstring(@"description_text", nil)]; [_logintextlabel setnumberoflines:0]; _logintextlabel.frame = cgrectmake(20, 30, 728, 40); [self.view addsubview:_logintextlabel];  _logintextfield.frame = cgrectmake(20, 80, 264, 30); [self.view addsubview:_logintextfield];  [_loginsubmitbutton settitle:nslocalizedstring(@"button_title_submit", nil) forstate:uicontrolstatenormal]; [_loginsubmitbutton addtarget:self action:@selector(submitbtnclk:) forcontrolevents:uicontroleventtouchupinside]; [_loginsubmitbutton setframe:cgrectmake(20, 130, 208, 44)]; [self.view addsubview:_loginsubmitbutton]; 

nothing overly complex, label thing displays screen.

i found solution.

it seem popovers autoresize components, , widths of button , textfield not large enough. essentially, popover screen smaller normal view covering full window, shrinking widths of textfield , button way 0 when guess popover adjusting view.

so basically, had jack widths of subviews compensate.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -