iphone - putting local tabBar on the global tabBar (I have a global tabBarController) -
iphone - putting local tabBar on the global tabBar (I have a global tabBarController) -
i have set 1 global tabbarcontroller in iphone app have been working on. in 1 of screen needed set local tabbar different global tabbarcontroller.
i have done in 2 ways: 1) hiding global tabbar self.tabbarcontroller.tabbar.hidden = yes; , putting local tabbar in place of in view. frame of tabbar showing blank white. 2) tried adding local tabbar subview of global tabbar worked after screen unloaded not removing local tabbar though applying [localtabbar removefromsuperview];
thanks in advance..
global tabbarcontroller: tabbarcontroller = [[uitabbarcontroller alloc] init]; tabbarcontroller.viewcontrollers = [nsarray arraywithobjects:activitytabnav,nav2,privatechatnav,exploretabnav,nav3,temptabnav, nil];
localtabbar tabbar on view xib of viewcontroller. in viewdidload >
uiwindow* window = [[uiapplication sharedapplication] keywindow]; [window addsubview:self.tabbar];
in viewdidunload >
[self.tabbar removefromsuperview];
previously tried add together self.tabbar self.tabbarcontroller.tabbar subview persisted local self.tabbar in other screens.
thank you...
the cleanest way i've found set hidesbottombarwhenpushed
property of view controller, place within uinavigationcontroller
(hiding navigiationbar if don't need it). hide uitabbarcontroller's
uitabbar
without leaving white space.
you'd set local uitabbar
straight uiviewcontroller's
view;
another possibility hide uitabbarcontroller's
uitabbar
, add together local uitabbar
subview of uitabbarcontroller's
view. of course of study you'd have remove superview when needed.
iphone objective-c
Comments
Post a Comment