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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T15:07:22+00:00 2026-06-13T15:07:22+00:00

When initiating a view from a UIActionSheet button, upon returning to the view via

  • 0

When initiating a view from a UIActionSheet button, upon returning to the view via the navigationBar back button, the toolbar while still visible does not have any of the buttons that were previously on it. This error has arisen since updating to iOS 6 and occurs while testing it on the simulator and a device running iOS 6 only. If I comment out the code that hides the toolbar on the view pushed by the UIActionSheet the buttons are added when going back.

I’m making my toolbar items programatically in viewWillAppear and showing the UIActionSheet from the toolbar which I’m accessing via self.navigationController.toolbar.

Any idea what is causing this problem? It’s only happened since iOS 6 has come around so is there any changes that I need to take into account regarding viewWillAppear?

This is how the view is pushed from the actionSheet:

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {

    if (actionSheet.tag == 2) {

    if (buttonIndex == 0) {

        [self dismissAllTips];

        self.actionNoteAddView= [[self.storyboard instantiateViewControllerWithIdentifier:@"IDActionNoteAddView"] retain];

        actionNoteAddView.note_id = 0;
        actionNoteAddView.iscompleted=0;

        [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"tool_tips"];

        [self.navigationController pushViewController:actionNoteAddView animated:TRUE];

        [actionNoteAddView release];

    }else if(buttonIndex == 1){

        ...

These are the view methods for the pushed view:

-(void)viewWillAppear:(BOOL)animated{

    [super viewWillAppear:animated];

    self.navigationItem.hidesBackButton = NO;
    [self.navigationController setToolbarHidden:YES];

    txtcontent.layer.cornerRadius = 10.0f;

}


-(void)viewDidAppear:(BOOL)animated{

    [super viewDidAppear:animated];

}

These are the view methods for the view that pushed the view using the actionSheet:

- (void) viewWillAppear:(BOOL)animated{

    [super viewWillAppear:animated];

    self.navigationItem.hidesBackButton = YES;
    [self.navigationController setToolbarHidden:NO];
    self.navigationController.navigationBarHidden=NO;

    self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
    self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.8 green:0.45 blue:0.2 alpha:1];
    self.navigationController.toolbar.barStyle = UIBarStyleBlackOpaque;
    self.navigationController.toolbar.tintColor = [UIColor colorWithRed:0.8 green:0.45 blue:0.2 alpha:1]; 

    UIImage *actionButtonImage = [UIImage imageNamed:@"31-circle-plus@2x.png"];
    UIBarButtonItem *actionButton = [[UIBarButtonItem alloc] initWithImage:actionButtonImage style:UIBarButtonItemStylePlain target:self action:@selector(actionPressed:)
                                     ];

    UIImage *dashButtonImage = [UIImage imageNamed:@"19-gear.png"];
    UIBarButtonItem *dashButton = [[UIBarButtonItem alloc] initWithImage:dashButtonImage style:UIBarButtonItemStylePlain target:self action:@selector(settingsPressed:)];




    UIBarButtonItem *flexItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
                                                                              target:nil
                                                                              action:nil];

    NSArray *toolitems = [NSArray arrayWithObjects:dashButton, flexItem, actionButton, flexItem, nil];

    [self setToolbarItems:toolitems];

    self.title = @"Dashboard";

    defaultProfile.text = [[NSUserDefaults standardUserDefaults] stringForKey:@"default_profile"];

    BOOL dailyProcess = [[NSUserDefaults standardUserDefaults] boolForKey:@"daily_process"];

    if(dailyProcess){

        [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"daily_process"];
        [[NSUserDefaults standardUserDefaults] synchronize];

        loading = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];

        labelProcess = [[UILabel alloc]initWithFrame:CGRectMake(60, 105, 240, 30)];
        labelProcess.text = @"Processing...";
        labelProcess.backgroundColor = [UIColor clearColor];
        labelProcess.textColor=[UIColor colorWithRed:0.8 green:0.45 blue:0.2 alpha:1];
        [labelProcess setFont:[UIFont systemFontOfSize:20]];

        loading.opaque = NO;
        loading.backgroundColor = [UIColor colorWithWhite:0.0f alpha:0.6f];

        indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
        [indicator setHidesWhenStopped:YES];
        indicator.center = self.view.center;

        [self.view addSubview:loading];
        [self.view addSubview:indicator];

        [self.view addSubview:labelProcess];

        [indicator startAnimating];

    }

}


-(void)viewDidAppear:(BOOL)animated{

    [super viewDidAppear:animated];

    CGRect frame = CGRectMake(157, 365, 10, 10);
    UIView *viewToPointAt = [[UIView alloc] initWithFrame:frame];

    [self.view addSubview:viewToPointAt];

    BOOL willies = [[NSUserDefaults standardUserDefaults] boolForKey:@"tool_tips"];

    if(willies==YES){

        if(popTip == nil) {

            popTip = [[[CMPopTipView alloc] initWithMessage:@"Step 1/3: This is the Action Button. You can create, view and auto-fill notes which are then added to your timeline.(Click for step 2)."] autorelease];
            popTip.delegate = self;

            [popTip presentPointingAtView:viewToPointAt inView:self.view animated:YES];
            popTip.backgroundColor = [UIColor colorWithRed:0.8 green:0.45 blue:0.2 alpha:1];
            popTip.textColor = [UIColor whiteColor];

        }

    }

    [viewToPointAt release];

}
  • 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-13T15:07:24+00:00Added an answer on June 13, 2026 at 3:07 pm

    Tried a lot of different techniques and eventually sorted it by showing it in one view method and hiding it in the next. It’s one fo the strangest bugs I have encountered and this is hardly a fix, but I hate having unanswered questions.

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

Sidebar

Related Questions

I'm initiating a URL connection and my script is returning the following JSON: (
I have a property that gets set when initiating a new view controller. -
I am initiating a voice call from my application. Now i want that when
I've been successfully transforming XML document with XSLT, I'm initiating the process from JavaScript.
I have successfully loaded a view from an xib file on to a window(another
I am initiating drag and drop from my WinForms application using this simple IDataObject
I have two view controllers connected to one another via segues. When someone presses
After initiating a new project, I would like to know when Petrel has completed
After initiating a new SimpleXml object: $xml = new SimpleXML($xmlStr); PHP errors out: Fatal
I created a sinatra based facebook app on Heroku by initiating it with the

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.