
What would be the best way to make these buttons? I have no problem with the right/left buttons, but this “tab” functionality is eluding me.
I was thinking of adding custom buttons on viewDidLoad like:
UIButton *profileBtn = [[UIButton alloc] initWithFrame:CGRectMake(50, 5, 100, 30)];
[profileBtn setTitle:@"Profile" forState:UIControlStateNormal];
[self.navigationController.navigationBar addSubview:profileBtn];
However, then the buttons stay on the navigation bar until I manually get them off. Surely there is a better/easier way to do something like this? (note that I’m already using the UITabBarController on the bottom of the screen)
Make use of the UISegmentedControl. Switch views by adding both in the first place and hide/show accordingly. If that eats up too much memory create them just in time and remove the inactive one from the superview.
Here is a tutorial on the UISegmentedControl.