我见过许多应用程序在导航栏上都有一个信息按钮(字母“i”,周围有一个圆圈)。如何添加这种类型的按钮?
最佳答案
之前的答案很接近,但没有完全编译。这就是您真正想要的:
// Info button
UIButton* infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
[infoButton addTarget:self action:@selector(showInfoView:) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:infoButton];
关于iphone - 如何在 iPhone 上的 uinavigationbar 上创建信息按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1456088/