iOS:Button.titleLabel.text


在代码中对button上的字进行设置,我们可以通过:

m_addButton.titleLabel.font = [UIFont systemFontOfSize: 7];
m_addButton.titleLabel.textColor = [UIColor blackColor];         
m_addButton.titleLabel.textAlignment = UITextAlignmentRight;

但是改变上面的字的时候不能用  m_addButton.titleLabel.text = @"Add Stuff";

而是要通过   [m_addButton setTitle:@"Add Stuff" forState: UIControlStateNormal];


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM