Slide UIBarButtonItem

Discussion in 'iPhone/iPad Programming' started by IDMah, Feb 22, 2012.

  1. macrumors regular

    Hi I've got a right button ala:

    	//[[self navigationItem] setTitle:[NSString stringWithFormat:@"%@ Cards",[company companyName]]];
    	UIBarButtonItem *bby = [[UIBarButtonItem alloc]
    	// set this bar button to the right side item in the navigationItem //
    	[[self navigationItem] setRightBarButtonItem:bby animated:YES];
    	[bby release];
    and the same button on another View. the Left button slides in/out ok, but the right button floats. How do I get the RightButton to slide as well?

  2. macrumors newbie



    I'm not sure what you mean by "floats"?

    I would recommend you put this code into -(void)viewDidLoad, and then if possible give us screenshots to further diagnose the issue?
  3. macrumors regular

    I'll try words first.

    I have a ListView with [camera icon] and stuffView with [camera icon].
    so as the stuffView slides off the [Camera icon] stays on right obscuring the stuffView Label and anything on the left .

    What I would like is for the camera icon to slide off with the ListView and a [New Camera Icon] slide on from the right nailed with the stuffView.

    I might just live with it, but a solution would be great.

    adding it to viewDidLoad did nothing..
  4. macrumors 65816


    You are then (by reading your lines), adding the icons to the wrong navigationBar, or you're navigation tree is corrupted (doesn't it say that in the logs?). Because this should be automated, and if it isn't, it's an error on the code of switching etc.

Share This Page