Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7840061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:38:54+00:00 2026-06-02T15:38:54+00:00

I have an iPad app with several segmented controls, including one view with two

  • 0

I have an iPad app with several segmented controls, including one view with two controls.

On that view, everything shows in the sim, both normal and retina. However, in the device, only one shows.

Below is the code that does not show on the device.. I have checked and all the images that make up the control are copied in the bundle resources. I’ve tried removing, cleaning, etc. No joy. I must be missing something (hopefully simple)..

 UISegmentedControl *controls = [[UISegmentedControl alloc] initWithItems:
 [NSArray arrayWithObjects: 
 [UIImage imageNamed:@"1.png"],
 [UIImage imageNamed:@"2.png"],
 [UIImage imageNamed:@"3.png"],
 [UIImage imageNamed:@"4.png"],
 [UIImage imageNamed:@"5.png"],
 [UIImage imageNamed:@"6.png"],                 
 [UIImage imageNamed:@"7.png"], 
 nil]];

 CGRect frame = CGRectMake(35, 70, 700, 35);
 controls.frame = frame;

 }

[controls addTarget:self action:@selector(drawSegmentAction:) forControlEvents:UIControlEventValueChanged];

controls.segmentedControlStyle = UISegmentedControlStyleBar;
controls.momentary = YES;
controls.tintColor = [UIColor grayColor];
[self.view addSubview:controls];

}

For reference, this code in the same view does work:

For reference, this control code does work:

-(void) buildColorBar {
//NSLog(@"%s", __FUNCTION__);

 UISegmentedControl *colorControl = [[UISegmentedControl alloc] initWithItems:
                                        [NSArray arrayWithObjects: [UIImage imageNamed:@"White.png"],
                                         [UIImage imageNamed:@"Red.png"],
                                         [UIImage imageNamed:@"Yellow.png"],
                                         [UIImage imageNamed:@"Green.png"],
                                         [UIImage imageNamed:@"Blue.png"],
                                         [UIImage imageNamed:@"Purple.png"],                         
     [UIImage imageNamed:@"Black.png"],

                                         nil]];

NSLog(@"Portrait");
CGRect frame = CGRectMake(35, 950, 700, 35);
colorControl.frame = frame;

     // When the user chooses a color, the method changeBrushColor: is called.
     [colorControl addTarget:self action:@selector(changeBrushColor:) forControlEvents:UIControlEventValueChanged];

     colorControl.segmentedControlStyle = UISegmentedControlStyleBar;

     // Make sure the color of the color complements the black background
     colorControl.tintColor = [UIColor grayColor];

     // Add the control to the window
     [self.view addSubview:colorControl];


}

Is there a rule against using two segmented controls in one view?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T15:38:55+00:00Added an answer on June 2, 2026 at 3:38 pm

    I found that one image in the segmented control – while it looked like it was in the bundle – it wasn’t. PITA, but at least, it works..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my iPad app I have two textfields. One displays the normal, default textfield
I'm working on an ipad app which is meant to have several UIWebView controls
I have an iPad app that has a UITableViewController that implements the NSFetchedResultsControllerDelegate .
I have this iPad app using Storyboard. There are some file that are marked
In my iPad App, I have one custom class inherited from UIButton. I am
I'm creating an iPad app, and I have two classes: NWRootViewController : UITableViewController and
I know that after I have deployed my ipad/iphone app into App Store, it
I have an iPad app and I have a video playing in a view.
I have a iPad app that can take a picture and then put it
I have an iPad app. In the Root View I have a UITableView with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.