当我点击我的buyMore
按钮时,写下面的代码,如下面给出的zooz示例代码所示,
-(IBAction)buyMore
{
ZooZ * zooz = [ZooZ sharedInstance];
zooz.sandbox = YES;
zooz.tintColor = [UIColor colorWithRed:1 green:0.8 blue:0 alpha:1];
zooz.barButtonTintColor = [UIColor darkGrayColor];
ZooZPaymentRequest * req = [zooz createPaymentRequestWithTotal:12.1 invoiceRefNumber:@"test invoice ref-1234" delegate:self];
req.currencyCode = @"EUR";
req.payerDetails.firstName = @"Some";
req.payerDetails.email = @"test@zooz.com";
req.payerDetails.address.zip=@"01234";
req.requireAddress = NO;
ZooZInvoiceItem * item = [[[ZooZInvoiceItem alloc] initWithPrice:12.1 quantity:1 name:@"T-Shirt"] autorelease];//Don't forget to release/autorelease
item.itemId = @"refId-12345678"; // optional
[req addItem:item];
[zooz openPayment:req forAppKey:@"951bde04-5a26-4200-a94e-34d775a1e5f9"];
}
我收到错误说...
由于未捕获的异常而终止应用程序NSUnknownKeyException,原因:[setValue:forUndefinedKey:]:此类不是键值pageControl的键值编码兼容。
第一次抛出调用堆栈:
(0x1966052 0x1d4fd0a 0x1965f11 0x134c032 0x12bdf7b 0x12bdeeb 0x12d8d60 0xbcb91a 0x1967e1a 0x18d1821 0xbca46e 0xa71e2c 0xa723a9 0xa725cb 0xa72941 0xa8447d 0xa8466f 0xa8493b 0xa853df 0xa85561 0xba14ca 0x9eb301 0x1967e72 0x8cb92d 0x8d5827 0x85bfa7 0x85dea6 0x8e930c 0x9bd530 0x193a9ce 0x18d1670 0x189d4f6 0x189cdb4 0x189cccb 0x215b879 0x215b93e 0x9aca9b 0x29aa 0x28f5)
终止调用抛出异常程序以退出代码结束:0
答案 0 :(得分:0)
I think there is a problem into your XIB file.
查看XIB文件,将任何名为'pageControl'的控件连接到.h文件中。
答案 1 :(得分:0)
请右键单击文件所有者并检查是否有任何已连接插座的黄色警告,如果是,则将其删除
答案 2 :(得分:0)
请参阅Zooz Secure In app payment runtime error。 您需要遵循ZooZ pdf文档中的确切说明。我猜你忘了把-ObjC添加到“Other Linker Flags”。