iphone - How to hide the segments button and display other segments button -
iphone - How to hide the segments button and display other segments button -
i having problem in displaying segment button on navigation bar. programme flow this: login page > details page > map page. want display 2 segments button on details page , when goto map page user sees 3 segments button. how possible?
more info project: in app have tabbar create other class it's name tabbar class. , calling page.
ttabbar *tabbar=[[ttabbar alloc] init]; [self.navigationcontroller pushviewcontroller:tabbar animated:yes]; tabbar.selectedindex = 0;
you can seek adding segments code using following
segmentedcontrol = [[uisegmentedcontrol alloc]initwithframe:cgrectmake(115, 210, 190, 30)]; segmentedcontrol.segmentedcontrolstyle = uisegmentedcontrolstylebar; [segmentedcontrol insertsegmentwithimage:[uiimage imagenamed:@"bus.png"] atindex:0 animated:yes]; [segmentedcontrol insertsegmentwithimage:[uiimage imagenamed:@"car.png"] atindex:1 animated:yes]; [segmentedcontrol insertsegmentwithimage:[uiimage imagenamed:@"walking.png"] atindex:2 animated:yes]; segmentedcontrol.selectedsegmentindex =0; segmentedcontrol.tintcolor = [uicolor greycolor]; [mainview addsubview:segmentedcontrol];
iphone objective-c
Comments
Post a Comment