objective c - In iPhone App ,How to add tab bar controller on some particular view controller Programmatically? -


in iphone app ,how add tab bar controller on particular view controller programmatically? here viewcontroller class uitableviewcontroller .

right if adding tab bar appears in table view. want display on bottom of window , and tableview should scroll separately tabbarcontroller

please , suggest

thanks

    firstview *view1 = [[firstview alloc]init];     secondview *view2 = [[secondview alloc] init];     uinavigationcontroller *firstview = [[uinavigationcontroller alloc] initwithrootviewcontroller:view1];     uinavigationcontroller *secondview = [[uinavigationcontroller alloc] initwithrootviewcontroller:view2];     uitabbarcontroller* tabbar = [[uitabbarcontroller alloc] init];     [tabbar setviewcontrollers:[nsarray arraywithobjects:view1, view2, nil]];     [tabbar setdelegate:self];     uinavigationcontroller* navigationcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:tabbar];     [self.view addsubview:navigationcontroller.view]; 

try this. here firstview, secondview class. if click tab, corresponding class (view) open. , have declare tabbar , navigation controller delegate.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -