ios 导航栏放置多个按钮

来源:互联网 发布:淘宝开店找货源怎么找 编辑:程序博客网 时间:2024/05/19 13:06

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];

0 1
原创粉丝点击