2015-07-21 118 views
0

我需要两个按钮,我无法找到:信息按钮和统计按钮UINavigationBar。有没有办法找到代表类似事物的按钮而不绘制它们?UIBarButtonSystemItem信息和统计

+1

没有这样的默认按钮 –

回答

4

希望这有助于你:

//for info button using custom UIButton 
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeInfoDark]; 
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:btn]; 

统计没有这样的默认按钮可用

1

斯威夫特四分之三

let infoButton = UIButton(type: .infoDark) 
infoButton.addTarget(self, action: #selector(navbarButtonPressed), for: .touchUpInside) 
navigationItem.rightBarButtonItems?.append(UIBarButtonItem(customView: infoButton))