我想在 SKStoreProductViewController 的顶部放置一个自定义按钮。我像下面这样尝试过,但没有奏效。我想知道你是否可以给我任何建议。
SKStoreProductViewController *storeViewController = [[SKStoreProductViewController alloc] init];
UIBarButtonItem *shareButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction
target:self
action:@selector(showShareDialog)];
storeViewController.navigationItem.rightBarButtonItem = shareButton;
storeViewController.delegate = self;
[self presentViewController:storeViewController animated:YES completion:^() {
[storeViewController loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier:appId}
completionBlock:^(BOOL result, NSError *error) {}];
}];