Ios 更改SKProduct/SKPayment委托
我实施应用程序内购买。我将所有方法放在单独的类IAPHelper中,出于某些原因,我希望将SKProductsRequestDelegate放在另一个类中。有没有办法将委托更改为我的其他类而不是IAPHelper?如果IAPHelper知道其他类,请确定:)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
比如说
//In eg appDelegate
IAPHelper *helper = [[IAPHelper alloc] init];
helper.productsDelegate = self;
//in IAPHelper
-(void)setProductsHelper:(id)newHelper {
self.productsRequest = newHelper;
}