Hey,
I want to add a bar right below NavigationController which will visible all the time even as user scrolls down. Can you tell me how I can do that or refer me to an article? I want to add couple of buttons to it to sort out results.
Thanks
Hey,
I want to add a bar right below NavigationController which will visible all the time even as user scrolls down. Can you tell me how I can do that or refer me to an article? I want to add couple of buttons to it to sort out results.
Thanks
If the youtube app most viewed section (http://www.engadget.com/photos/the-definitive-iphone-user-interface-gallery/#294309) is what you are after, then you don't need a bar below the navigation bar.
You could make a UISegmentedControl and add it as a custom title view on the navigation item of your view controller. Then if you want a title to also be displayed above the buttons you would set the prompt property on the navigation item.
So, in the init method of view controller that has the scrollable view:
self.navigationItem.prompt = @"Title of this view";
NSArray *items = [NSArray arrayWithObjects:@"Sort1", @"Sort2", nil];
UISegmentedControl *control = [[[UISegmentedControl alloc] initWithItems:items]
autorelease];
[control addTarget:self
action:@selector(action:)
forControlEvents:UIControlEventValueChanged];
self.navigationItem.titleView = control;
As far as I know, it is impossible to nest multiple navigation controllers.