Преглед изворни кода

Choose different sizes for argument input views based on their type.

For numbers, we basically always want small. For objects, we use large to allow editing things like arrays, dictionaries, etc.
Ryan Olson пре 12 година
родитељ
комит
675dbd7350

+ 1 - 0
Classes/Editing/Argument Input Views/FLEXArgumentInputJSONObjectView.m

@@ -18,6 +18,7 @@
         // Start with the numbers and punctuation keyboard since quotes, curly braces, or
         // square brackets are likely to be the first characters type for the JSON.
         self.inputTextView.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
+        self.targetSize = FLEXArgumentInputViewSizeLarge;
     }
     return self;
 }

+ 1 - 0
Classes/Editing/Argument Input Views/FLEXArgumentInputNumberView.m

@@ -16,6 +16,7 @@
     self = [super initWithArgumentTypeEncoding:typeEncoding];
     if (self) {
         self.inputTextView.keyboardType = UIKeyboardTypeNumbersAndPunctuation;
+        self.targetSize = FLEXArgumentInputViewSizeSmall;
     }
     return self;
 }

+ 0 - 1
Classes/Editing/FLEXDefaultEditorViewController.m

@@ -44,7 +44,6 @@
     
     FLEXArgumentInputView *inputView = [FLEXArgumentInputViewFactory argumentInputViewForTypeEncoding:@encode(id)];
     inputView.backgroundColor = self.view.backgroundColor;
-    inputView.targetSize = FLEXArgumentInputViewSizeLarge;
     inputView.inputValue = [self.defaults objectForKey:self.key];
     self.fieldEditorView.argumentInputViews = @[inputView];
 }

+ 0 - 1
Classes/Editing/FLEXIvarEditorViewController.m

@@ -39,7 +39,6 @@
     
     FLEXArgumentInputView *inputView = [FLEXArgumentInputViewFactory argumentInputViewForTypeEncoding:ivar_getTypeEncoding(self.ivar)];
     inputView.backgroundColor = self.view.backgroundColor;
-    inputView.targetSize = FLEXArgumentInputViewSizeLarge;
     inputView.inputValue = [FLEXRuntimeUtility valueForIvar:self.ivar onObject:self.target];
     inputView.delegate = self;
     self.fieldEditorView.argumentInputViews = @[inputView];

+ 0 - 1
Classes/Editing/FLEXPropertyEditorViewController.m

@@ -42,7 +42,6 @@
     const char *typeEncoding = [[FLEXRuntimeUtility typeEncodingForProperty:self.property] UTF8String];
     FLEXArgumentInputView *inputView = [FLEXArgumentInputViewFactory argumentInputViewForTypeEncoding:typeEncoding];
     inputView.backgroundColor = self.view.backgroundColor;
-    inputView.targetSize = FLEXArgumentInputViewSizeLarge;
     inputView.inputValue = [FLEXRuntimeUtility valueForProperty:self.property onObject:self.target];
     inputView.delegate = self;
     self.fieldEditorView.argumentInputViews = @[inputView];