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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:51:54+00:00 2026-05-27T13:51:54+00:00

I am loading a mapview. I have created a barbutton in the bottombar toolbar

  • 0

I am loading a mapview. I have created a barbutton in the bottombar toolbar of the view, setting its identifier as pagecurl. As expected, a barbutton with page curl icon is loaded. From this mapview I move to anotherv view, by clicking on annotations in the mapview. And then I return to the mapview. At that time my pagecurl barbutton icon(pagecurl icon) is not displayed, and my barbutton width is also reduced. I am not able to figure out the problem.

- (void)viewDidLoad
{
    [super viewDidLoad];

    if(isSingleContactSelected)
    {
        [self.navigationController.navigationBar setBarStyle:UIBarStyleDefault];
        self.navigationItem.leftBarButtonItem = self.cancelButton   ;
        [self.cancelButton setTarget:self];
        [self.cancelButton setAction:@selector(onClose:)];

        [addressFieldSearchBar setFrame:CGRectMake(66, 0, 256, 44)];
        addressFieldSearchBar.delegate =self;

        [self.navigationController.navigationBar setBarStyle:UIBarStyleDefault];
        [self.navigationController.navigationBar addSubview:addressFieldSearchBar];

        [searchDirectionSegmentedControl addTarget:self action:@selector(segmentAction:) forControlEvents:UIControlEventValueChanged];
        UIBarButtonItem *searchDirectionSegmentedButton = [[UIBarButtonItem alloc] initWithCustomView:searchDirectionSegmentedControl];

        flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
        NSArray *toolbarItems = [NSArray arrayWithObjects: compassButton , flexibleSpace, searchDirectionSegmentedButton, flexibleSpace, pageButton, nil];
        [self setToolbarItems:toolbarItems];

        self.navigationController.toolbarHidden = NO;
        [compassButton release];
        [pageButton release];
        [searchDirectionSegmentedControl release];

        mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
        mapView.delegate=self; 

        [self.view addSubview:mapView]; 
    }
}

- (void)viewDidUnload{
    [super viewDidUnload];    
}

-(void) viewWillAppear:(BOOL)animated{
    if(isSingleContactSelected){
        [self.navigationController.navigationBar setHidden:NO];
        [self.navigationController.toolbar setHidden:NO];
        [self.navigationController.toolbar setBarStyle:UIBarStyleDefault];
        [self.addressFieldSearchBar setHidden:NO];
    }
}

-(void) viewWillDisappear:(BOOL)animated{
    if(isSingleContactSelected){
        [self.addressFieldSearchBar setHidden:YES];
        [self.navigationController.toolbar setHidden:YES];
    }
}
  • 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-05-27T13:51:54+00:00Added an answer on May 27, 2026 at 1:51 pm

    Though its a long shot, it could be something to do with the setHidden calls in your appear and disappear methods.

    [self.navigationController.toolbar setHidden:YES];
    [self.navigationController.toolbar setHidden:NO];
    

    The best way to do this using UIViewController’s “-setHidesBottomBarWhenPushed:” method.

    Maybe try some NSLog() in -viewWillAppear:

    // If pageButton is an instance variable
    NSLog(@"%@",pageButton);
    
    // Enumerate through all toolbar items.
    // Check to see if NSLog output differs after pushing/popping this view controller.
    for (UIBarButtonItem *item in [self.navigationController.toolbar.items])
    {
        NSLog(@"%@",item);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am loading a mapview into a viewcontroller's view. When I load the mapview,
I am loading a mapview with annotation. I have written the code as shown
I have a mapview with a few pins on it. The pins are loading
I am loading a view(similar to the mapview annotation) on the click of an
When loading a page for the first time (!IsPostback), I am creating a button
Im loading an entity 'Member' from its id in route data. [ListItemsForMembershipType(true)] public ActionResult
while loading a page i am using a animation, wid=jQuery(window).width()+400; jQuery('#div').animate({'marginLeft' : '+='+wid+'px'},{queue:false, duration:20000
I am working with a custom MapView for an application. I have a database
When loading a page for the first time, the images do not show for
I have defined an ArrayList in my main class where I am loading data

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.