→ Maiyo:喔 你是問UITextField 那就用 [aTextfield text] 11/12 21:34
可是我在 IBAction打
NSString *mystring=[atextfield text];
if(mystring= =@"AA"){
[alabel setText:@"Hello"];
}
不管我怎麼按那按鈕
我的lable都不Hello。。。
※ 編輯: shiftsmart 來自: 114.45.16.109 (11/12 23:23)
→ uranusjr:字串比對不能用 ==, 去找本好書來看吧 =_= 11/12 23:26
推 Piceman:關鍵字 isEqualToString 11/13 00:16
感謝大家!!!!我已經成功的判別了!!
找尋了GOOGLE一整天,原來是字串比對不能用= (Orz
※ 編輯: shiftsmart 來自: 114.45.16.109 (11/13 00:41)