我有以下代码
- (IBAction)buttonPressed: (id) sender
{
UIButton *button = (UIButton*) sender;
NSLog(@"Clicked button is: %d", button.currentTitle);
}
输出为:
Clicked button is: 26317696
为什么不显示按钮的标题“A”?
最佳答案
(根据要求)
%d
不是正确使用的格式说明符。
关于objective-c - UIButton currentTitle 显示与预期不同的信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2292976/