Просмотр исходного кода

Convert property editor alert view to UIAlertController

Ryan Olson лет назад: 6
Родитель
Сommit
c3066a7847
1 измененных файлов с 2 добавлено и 4 удалено
  1. 2 4
      Classes/Editing/FLEXPropertyEditorViewController.m

+ 2 - 4
Classes/Editing/FLEXPropertyEditorViewController.m

@@ -12,6 +12,7 @@
 #import "FLEXArgumentInputView.h"
 #import "FLEXArgumentInputViewFactory.h"
 #import "FLEXArgumentInputSwitchView.h"
+#import "FLEXUtility.h"
 
 @interface FLEXPropertyEditorViewController () <FLEXArgumentInputViewDelegate>
 
@@ -62,10 +63,7 @@
     NSError *error = nil;
     [FLEXRuntimeUtility performSelector:setterSelector onObject:self.target withArguments:arguments error:&error];
     if (error) {
-        NSString *title = @"Property Setter Failed";
-        NSString *message = [error localizedDescription];
-        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
-        [alert show];
+        [FLEXUtility alert:@"Property Setter Failed" message:[error localizedDescription] from:self];
         self.firstInputView.inputValue = [FLEXRuntimeUtility valueForProperty:self.property onObject:self.target];
     } else {
         // If the setter was called without error, pop the view controller to indicate that and make the user's life easier.