的背景顏色,我創造了我所使用的用戶registration.In註冊頁面的應用程序,我已經創造了許多UITextFields.I希望,當用戶選擇的任何文本字段那麼它的背景圖像的變化。我使用的代碼是這樣做的:更改所選文本字段
- (IBAction)touchBegin:(id)sender
{
//UILabel *opt = (UILabel *)[cell viewWithTag:101];
if (_text1.isSelected) {
_text1.background = [UIImage imageNamed:@"big_star_non_rating.png"];
}
else if (_text2.isSelected){
_text2.background = [UIImage imageNamed:@"big_star_non_rating.png"];
}
else if (_text3.isSelected){
_text3.background = [UIImage imageNamed:@"big_star_non_rating.png"];
}
else if (_text4.isSelected){
_text4.background = [UIImage imageNamed:@"big_star_non_rating.png"];
}
else{
}
}
但我沒有得到根據我的需要的結果。 我應該用什麼來獲得正確的輸出?
什麼是您的文本字體樣式?邊框風格還是什麼? – Maul 2014-10-01 10:01:31