2

Do you know any tutorial / project that implements tabs in the way that Apple did in the AppStore -> app detail page? Here is what I meant:

AppStore info view tabs

Of course I could write in by myself, but I was wondering if there isn't such think done before.

Thanks!

2
  • In what way? The button active button look? Or the partial view changing on click?
    – Jeremy
    Jan 17, 2013 at 9:15
  • @Jeremy partial view changing on click, button active look and this small triangular intend :) Jan 17, 2013 at 10:39

2 Answers 2

4

You should take a look at : http://www.cocoacontrols.com/platforms/ios/controls/sdwellsegmentedcontrol , very useful!

Loris

0
0

In Your case you need to create UIView or UIImageView with frame (0, 35, self.view.bounds.size.width, 36) and add Three UIButton. And set BackGround image of UIButton for Both forState:UIControlStateNormal and forState:UIControlStateHighlighted. I also write following code for You , for better understanding.

    UIImageView *imgHeading = [[UIImageView alloc] initWithFrame:CGRectMake(0, 35, self.view.bounds.size.width, 36)] ;
    [imgHeading setImage: [UIImage imageNamed:@"NameOfImage"]];
    [self.view addSubview: imgHeading];

    UIButton *btnHome = [UIButton buttonWithType:UIButtonTypeCustom];
    [btnHome addTarget:self action:@selector(goBack:) forControlEvents:UIControlEventTouchUpInside];
    btnHome.frame = CGRectMake(as you need);
    [btnHome setBackgroundImage:[UIImage imageNamed:@"NameOfImage"] forState:UIControlStateNormal];
    [btnHome setBackgroundImage:[UIImage imageNamed:@"NameOfImage"] forState:UIControlStateHighlighted];
    [self.view addSubview:btnHome];

UIButton *btnHome1 = [UIButton buttonWithType:UIButtonTypeCustom];
    [btnHome1 addTarget:self action:@selector(goBack:) forControlEvents:UIControlEventTouchUpInside];
    btnHome1.frame = CGRectMake(as you need);
    [btnHome1 setBackgroundImage:[UIImage imageNamed:@"NameOfImage"] forState:UIControlStateNormal];
    [btnHome1 setBackgroundImage:[UIImage imageNamed:@"NameOfImage"] forState:UIControlStateHighlighted];
    [self.view addSubview:btnHome1];

UIButton *btnHome2 = [UIButton buttonWithType:UIButtonTypeCustom];
    [btnHome2 addTarget:self action:@selector(goBack:) forControlEvents:UIControlEventTouchUpInside];
    btnHome2.frame = CGRectMake(as you need);
    [btnHome2 setBackgroundImage:[UIImage imageNamed:@"NameOfImage"] forState:UIControlStateNormal];
    [btnHome2 setBackgroundImage:[UIImage imageNamed:@"NameOfImage"] forState:UIControlStateHighlighted];
    [self.view addSubview:btnHome2];

Thanks, may be it is helpful for you :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.