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 8109261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:21:49+00:00 2026-06-06T01:21:49+00:00

My Question is… On my UISegmentedControl, I created two buttons on navigationItem, on button

  • 0

My Question is…

On my UISegmentedControl, I created two buttons on navigationItem, on button one I show my own class and another button I need show another XIB, the only thing I’m missing is how I show this another class ?

-(IBAction)segmentAction:(id)sender

{

    UISegmentedControl *segmentedControl = (UISegmentedControl *)sender;

    segmentedControl.momentary = YES;

    NSInteger selectedSegment = segmentedControl.selectedSegmentIndex;

    MapViewController *mapController = [[MapViewController alloc]init];(Other class)

    if(selectedSegment == 0) {

        [self.view setHidden:NO];(MOSTRA)

        [mapController.view setHidden:YES];

        NSLog(@"Lista");

    } else {

        [self.view setHidden:YES];

        **[mapController.view setHidden:NO];(Dont show anything)**

        NSLog(@"Mapa");

    }

}
  • 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-06T01:21:51+00:00Added an answer on June 6, 2026 at 1:21 am

    In your code sample I dont’t see anything that you added the UIView of your map controller to a parent view (I think self.view in your sample) with addSubview. So it can’t be visible.

    Since iOS 5 you should use container view controllers to manage the views you add from other UIViewController subclasses.

    UIViewController Class Reference

    The best solution would be, that you have a parent controller that includes the both view controllers you want to use to switch between.

    Or maybe UITabViewController is a solution for you, which is used to swtich between different UIViewController. But I think you want some customization, so the prior solution should work.

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

Sidebar

Related Questions

Question: What kind of resources are needed to learn how to create one's own
Question: I need to read a CSV file. I use the FileHelpers library to
Question is self explanatory, again I need an alternativs in cocos2d android to use
Question I need to make a short write to a file every 15 seconds
Question: I use the bidirectional dicionary class I found here: Bidirectional 1 to 1
Question: In one of my database, there is a value in a varchar-field: Brokers
Question: Can anyone please provide a full code example that shows how one does
question is Regarding the collection base class that implements a weird property: protected IList
Question: Why is it that holdDate under function Check(), show Nothing while debugging, I
Question can some one tell me how can i convert my SVG element to

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.