我正在尝试从其他 uiviewcontroller 的 uiviewcontroller 类启用按钮,但我无法启用它。这是我正在做的代码
@implementation InAppClass
- (void)recordTransaction:(SKPaymentTransaction *)transaction
{
if ([transaction.payment.productIdentifier isEqualToString:idstring])
{
generateAdviceViewController *objgenerate= [[generateAdviceViewController alloc]init ];
[objgenerate enableDisableMethod];
[objgenerate release];
}
}
@end
@implementation generateAdviceViewController
-(id)enableDisableMethod
{
[self->generateButton setEnabled:TRUE];
return self;
}
@end
我做错了吗?