My iOS app terminates in Xcode simulator due to EXC_BAD_ACCESS error on following line
if ([amount.text isEqualToString:@""] || [chargeAmount floatValue] == 0.0) {
The complete block of code is
if ([amount.text isEqualToString:@""] || [chargeAmount floatValue] == 0.0) {
// Focus on the poptip target.
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[transactionView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
[self performSelector:@selector(amountRequiredPopup) withObject:nil afterDelay:0.3];
return;
}
I check amount.text in NSLog and it is showing the value but not the ChargeAmount. It seems there is bad value of chargeAmount. chargeAmount is defined in interface in .h file as follows:
NSDecimalNumber* chargeAmount;
I am new in objective C and iOS app development. Please suggest where is the issue? Thank you in advance.