Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 更改SKProduct/SKPayment委托_Ios_Cocoa Touch_In App Purchase - Fatal编程技术网

Ios 更改SKProduct/SKPayment委托

Ios 更改SKProduct/SKPayment委托,ios,cocoa-touch,in-app-purchase,Ios,Cocoa Touch,In App Purchase,我实施应用程序内购买。我将所有方法放在单独的类IAPHelper中,出于某些原因,我希望将SKProductsRequestDelegate放在另一个类中。有没有办法将委托更改为我的其他类而不是IAPHelper?如果IAPHelper知道其他类,请确定:) 比如说 //In eg appDelegate IAPHelper *helper = [[IAPHelper alloc] init]; helper.productsDelegate = self; //in IAPHelper

我实施应用程序内购买。我将所有方法放在单独的类IAPHelper中,出于某些原因,我希望将SKProductsRequestDelegate放在另一个类中。有没有办法将委托更改为我的其他类而不是IAPHelper?

如果IAPHelper知道其他类,请确定:)


比如说

//In eg appDelegate
IAPHelper *helper = [[IAPHelper alloc] init];
helper.productsDelegate = self;
//in IAPHelper
-(void)setProductsHelper:(id)newHelper {
    self.productsRequest = newHelper;
}