Я использую API-интерфейс карты io, который сканирует кредитные карты, а затем берет ту информацию, которая будет использоваться в виде таблицы. У меня есть следующие поля, которые я должен заполнить:Пытается сохранить NSString в UITableViewCell с заданными переменными
Кредитная карточка номер -cvv -Expiration Дата (я приложил строки, так как они используются в качестве отдельных переменных)
вот мой код:
.m файл
- (void)userDidProvideCreditCardInfo:(CardIOCreditCardInfo *)info inPaymentViewController:(CardIOPaymentViewController *)scanViewController {
BillingTableViewCell *aCell;
NSString *myString = info.expiryMonth;
NSString *otherString = [myString stringByAppendingString: info.expiryYear];
aCell = (BillingTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
aCell.text.text = info.cardType;
aCell = (BillingTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:0]];
aCell.textLabel.text = info.cardNumber;
aCell = (BillingTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:2 inSection:0]];
aCell.text.text = info.cvv;
aCell = (BillingTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:3 inSection:0]];
aCell.text.text = info.zip;
aCell = (BillingTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:5 inSection:0]];
aCell.text.text = otherString;
[scanViewController dismissModalViewControllerAnimated:YES];
и вот мой .h файл:
property(nonatomic, assign, readwrite) NSUInteger expiryMonth;
@property(nonatomic, assign, readwrite) NSUInteger expiryYear;
@property(nonatomic, copy, readwrite) NSString *cvv;
@property(nonatomic, copy, readwrite) NSString *zip;
Я продолжаю придумывать ошибки потока, и информация не попадает в текстовые поля. Что я делаю не так?
ошибка:
0x38fa65c6: push.w {r3, r4}
0x38fa65ca: ldr r4, [r0] thread 1: EXC_BAD_ACCESS (code=1, address=0x5)
0x38fa65cc: lsr.w r9, r1, #2
Каковы ошибки? – rmaddy
Я отредактировал мой вопрос и добавил коды ошибок. –