UIToolBar and setItems with animation

Discussion in 'iOS Programming' started by Sergio10, Feb 3, 2010.

  1. Sergio10 macrumors regular

    Joined:
    Oct 3, 2007
    #1
    Hi guys,

    Need to change buttons on toolbar(UIToolBar) with animation.
    I use next code:

    PHP:
    UIBarButtonItemitem = [[UIBarButtonItem allocinitWithTitle:@"test" style:UIBarButtonItemStylePlain target:nil action:nil];
    NSArrayitems = [NSArray arrayWithObject:item];
    [
    _bottomToolBar setItems:items animated:YES];
    As result nothing appear and without animation as well.
    How to solve the problem?
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
  3. North Bronson macrumors 6502

    Joined:
    Oct 31, 2007
    Location:
    San José
    #3
    The setItems:animated: method is designed to be used when you use the toolbar that UINavigationController gives you for free. It will not help you set items for an arbitrary toolbar.
     
  4. Sergio10 thread starter macrumors regular

    Joined:
    Oct 3, 2007

Share This Page