左边导航栏放置多个按钮

UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc]initWithTitle:@"first" style:UITabBarSystemItemContactstarget:self action:@selector(one:)];

    UIBarButtonItem *anotherButton2 = [[UIBarButtonItem alloc]initWithTitle:@"second" style:UITabBarSystemItemContactstarget:self action:@selector(two:)];

    [self.navigationItem setLeftBarButtonItems:[NSArrayarrayWithObjects: anotherButton,anotherButton2,nil]];

    [anotherButton release];

    [anotherButton2 release];


你可能感兴趣的:(左边导航栏放置多个按钮)