NSDecimalNumber amount_before_current_year のプロパティにアクセスしようとすると、アプリがクラッシュします。
[amount_before_current_year stringValue]
Program received signal: “EXC_BAD_ACCESS”.
添付の画像に示すように、オブジェクトは NSDecimalNumber です。
viewDidLoad で作成しました。ヘッダー ファイルに存在します。
.h
...
NSDecimalNumber *amount_before_current_year;
...
@property (nonatomic, retain) NSDecimalNumber *amount_before_current_year;
...
実装ファイルにも:
@synthesize amount_before_current_year;
amount_before_current_year = [NSDecimalNumber decimalNumberWithString:@"100.00"];
ここで私はそれをもう一度呼びます:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *test = [amount_before_current_year stringValue]; // HARD CRASH !!!
だから、私は今何をすべきかわからない、私はこれで数時間を費やしました.....
何か案は ??????
ありがとう、r.