在代碼中對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];
