Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我实施应用内购买。我将所有方法都放在单独的类 IAPHelper 中,出于某些原因,我希望在其他类中有 SKProductsRequestDelegate。有什么办法可以将代表更改为我在 IAPHelper 中安装的其他班级?
如果 IAPHelper 知道其他类,当然:)
//In eg appDelegate IAPHelper *helper = [[IAPHelper alloc] init]; helper.productsDelegate = self;
...
//in IAPHelper -(void)setProductsHelper:(id)newHelper { self.productsRequest = newHelper; }
例如