iphone - UITableView styling ignored in Modal Presentation Style -
i have problem styling of uitableview
in uiviewcontroller
when presented modally on ipad within of uinavigationcontroller
. simply, want table cell border not appear , in ib set separator style 'none' , separator color 'clear color'. in nib grouped table looks way want look:
in nib tableview hooked file's owner it's source , delegate. set iboutlet. file's owner's class name set vc want loading nib. on start create instance of vc, create instance of uinavigationcontroller
. init uinavigationcontroller
vc (that has uitableview
) , nowadays uinavigationcontroller
modally. on ipad nowadays modal form sheet presentation style.
in appdelegate's application:didfinishlaunchingwithoptions:
method instantiate , retain reference both vc , it's parent `uinavigationcontroller:
self.loginviewcontroller = [[loginviewcontroller alloc] initwithnibname:@"loginviewcontroller" bundle:nil]; self.loginviewnavigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:self.loginviewcontroller];
then ... after logic has been performed (still in appdelegate) nowadays uinavigationcontroller
modally:
if (self.loginviewnavigationcontroller != nil) { if ([uidevice currentdevice].userinterfaceidiom == uiuserinterfaceidiompad) self.loginviewnavigationcontroller.modalpresentationstyle = uimodalpresentationformsheet; [self.window.rootviewcontroller presentviewcontroller:self.loginviewnavigationcontroller animated:yes completion:nil]; }
all world on iphone, in cell border not visible:
however, on ipad cell border visible , navigation header styling gone (that's problem day):
i'd know why uitableview
ignores separator style on ipad. i've tried setting modalpresentationstyle
pagesheet , fullscreen , have same issue. i've tried setting these properties in vc's viewdidload
(that contains table view) no avail. have tried creating ipad specific nib "loginviewcontroller~ipad" , hooking way didn't seem create difference either.
it way i'm retaining login vc , it's containing uinavigationcontroller
, can't sure because works fine on iphone.
i'm guessing has modal presentation on ipad , searching , trying different combinations can't figure out what's going on. ideas?
[edit]
i'm working in simulator ios 6.1, 5.1 , 5.0. see same issue in versions. i'm sticking ios 6.1 , move backwards compatible. haven't yet moved device.
thanks!
as turns out had faulty styling code in uinavigationcontroller subclass (bad, know?) not styling navigationbar , table. i've since fixed issue , uinavigationcontroller looks should.
iphone objective-c ipad uitableview uimodalpresentationstyle
No comments:
Post a Comment