Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone tab bar with custom buttons and scrollview
    primarykey
    data
    text
    <p>I'm trying to get a tab bar effect not unlike <a href="http://www.russellquinn.com/blog/2010/04/22/creative-review-annual-2010-iphone-app/" rel="nofollow noreferrer">Russell Quinn's Creative Review app</a>. The tab bar swipes across, which I have figured out, but the tab bar style itself is unlike anything I've seen on the iPhone (though it looks so simple!).</p> <p>It has square buttons with a space between, and each button has a select/active/inactive state. I'm having a hard time seeing how this can be a tab bar, but i don't know any other way. Can someone explain this?</p> <p><strong>EDIT:</strong></p> <p>thanks to yukla for the guidance, I got it working using <code>uibutton</code>. It was pretty basic and fairly embarrassing that I couldn't think this up... in my <code>rootviewcontroller.m</code>, I tossed this in after i synthesized <code>homeBtn</code>.</p> <pre><code>- (UIButton *) homeBtn { homeBtn = [[UIButton buttonWithType:UIButtonTypeCustom] retain]; homeBtn.frame = CGRectMake(0, 0, 100, 45); [homeBtn setTitle:@"Home" forState:UIControlStateNormal]; [homeBtn setTitle:@"Home" forState:UIControlStateSelected]; [homeBtn setBackgroundImage:[UIImage imageNamed:@"normal.png"] forState:UIControlStateNormal]; [homeBtn setBackgroundImage:[UIImage imageNamed:@"disabled.png"] forState:UIControlStateDisabled]; [homeBtn setBackgroundImage:[UIImage imageNamed:@"selected.png"] forState:UIControlStateSelected]; [homeBtn setBackgroundImage:[UIImage imageNamed:@"highlighted.png"] forState:UIControlStateHighlighted]; [homeBtn setBackgroundImage:[UIImage imageNamed:@"highlighted+selected.png"] forState:(UIControlStateHighlighted | UIControlStateSelected)]; [homeBtn addTarget:self action:@selector(switchPages:) forControlEvents:UIControlEventTouchUpInside]; return homeBtn; } </code></pre> <p>Just subclass it from UISwipeView and you're all set.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload