[英]-didSelectRowAtIndexPath not working for me. iPhone SDK 3
[英]simple assignment not working for me: iphone sdk
有人可以向我解釋為什么這個簡單的任務不起作用。
這是代碼
loanDetails.currency = myCurrency;
NSLog(@" Value %@",myCurrency);
NSLog(@" Value %@",loanDetails.currency);
NSLog(@" Value %@",myCurrency);
輸出為:-
2010-05-05 23:00:44.394 ExpenseTracker[3576:207] Value AFA
2010-05-05 23:00:44.750 ExpenseTracker[3576:207] Value (null)
2010-05-05 23:00:45.095 ExpenseTracker[3576:207] Value AFA
定義為:
@property (nonatomic,retain) NSString *currency;
loadDetails
為零嗎?
好吧,當您編寫loanDetails.currency = myCurrency
,這等效於調用[loanDetails setCurrency:myCurrency]
。 因此,看一下標題:您是否偶然將其定義為readonly
? 您是否已合成訪問器方法或編寫了自己的訪問器方法?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.