2011-03-20 122 views

回答

7

==會做一個指針比較,這是不正確的。你想要

if ([currentPasswordBox.text isEqualToString:@"1234"]) { 
+0

非常感謝你! (我是菜鳥:P) – Linuxmint 2011-03-20 02:39:18

+2

如果你擔心的話,你也可以使用'caseInsensitiveCompare:'。 – raidfive 2011-03-20 03:00:52

+0

每個人在某個時候都是小菜一碟! – Wevah 2011-03-21 06:42:31