Здравствуйте у меня небольшая проблема.
У меня есть приложение для проекта, но это несколько старое приложение (IOS 7).
Я видел в Интернете, как обновить UIAlertController, используя ВМЕСТО старого доброго UIAlertView.
if (error.code) {
cancelBlock = block;
UIAlertController *alert = [UIAlertController alertControllerWithTitle: @"Message"
message: @"Peripheral Disconnected with Error"
preferredStyle: UIAlertControllerStyleAlert];
UIAlertAction *alertAction = [UIAlertAction actionWithTitle: @"OK"
style: UIAlertActionStyleDestructive
handler: ^(UIAlertAction *action) {
NSLog(@"OK");
}];
[alert addAction: alertAction];
[self presentViewController: controller animated: YES completion: nil];
/* UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Peripheral Disconnected with Error"
message:error.description
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];*/
Я получаю ошибку, которую я не понимаю:
Нет видимого @interface для «RFduino», объявленного селектором «presentViewController: анимированный: завершение».