在代码的日子里希望你我同行!

关于iOS中如何在导航栏创建多个按钮(UIBarButtonItem)-如右边创建俩个按钮

** 关于如何在导航栏创建多个按钮(UIBarButtonItem)-如右边创建俩个按钮** UIBarButtonItem *rightSearch = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"kc_icon_search.png"]style:UIBarButtonItemStyleDone target:selfaction:@selector(rightSearchAction:)];
rightSearch.tintColor = [UIColor whiteColor];

UIBarButtonItem *rightShopping = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"kc_icon_shopping.png"]style:UIBarButtonItemStyleDone target:selfaction:@selector(rightShoppingAction:)];
rightShopping.tintColor = [UIColor whiteColor];

self.navigationItem.rightBarButtonItems = @[rightSearch,rightShopping];

关于如何在导航栏创建多个按钮(UIBarButtonItem)-如右边创建俩个按钮

发表新评论
Title - Artist
0:00