iOS 导航栏 - 我想用动态值设置导航栏中的标题。
标题可以是咖啡(xxx 杯)
xxx 的值根据用户输入动态更改。
谢谢。
最佳答案
在您的 View Controller 代码中的某处:
self.navigationItem.title = [NSString stringWithFormat:@"Coffee (%d cups)", self.numberOfCupsOfCoffee];
没有更多细节,我不能更精确。
关于iOS 导航栏 - 我想用动态值设置导航栏中的标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27108712/