Hello everyone, I'm not sure how to ask my question?
When my UIAlertController appears, my ViewController in the background zoom (grows)?
I use the code below in objective-c Xcode 11.3.1:
I can't figure it out why ? I would apreciate if someone can make me on the way.
- (void)productDescription:(NSInteger)index {
SKProduct *product = _products[index];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:product.localizedTitle
message:product.localizedDescription
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(kOK,@"") style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
[self buyProduct:index];
}
];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(kCANCEL,@"") style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
}
];
[alert addAction:okAction];
[alert addAction:cancelAction];
UIViewController *topController = self.window.rootViewController;
while (topController.presentedViewController) topController = topController.presentedViewController;
[topController presentViewController:alert animated:YES completion:nil];
}