FLEXArgumentInputView.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // FLEXArgumentInputView.h
  3. // Flipboard
  4. //
  5. // Created by Ryan Olson on 5/30/14.
  6. // Copyright (c) 2014 Flipboard. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef NS_ENUM(NSUInteger, FLEXArgumentInputViewSize) {
  10. FLEXArgumentInputViewSizeDefault = 0,
  11. FLEXArgumentInputViewSizeLarge
  12. };
  13. @interface FLEXArgumentInputView : UIView
  14. - (instancetype)initWithArgumentTypeEncoding:(const char *)typeEncoding;
  15. /// The name of the field. Optional (can be nil).
  16. @property (nonatomic, copy) NSString *title;
  17. /// To populate the filed with an initial value, set this property.
  18. /// To reteive the value input by the user, access the property.
  19. /// Primitive types and structs should/will be boxed in NSValue containers.
  20. @property (nonatomic, strong) id inputOutput;
  21. /// Setting this value to large will make some argument input views increase the size of their input field(s).
  22. /// Useful to increase the use of space if there is only one input view on screen (i.e. for property and ivar editing).
  23. @property (nonatomic, assign) FLEXArgumentInputViewSize targetSize;
  24. // Subclasses can override
  25. /// If the input view has one or more text views, returns YES when one of them is focused.
  26. @property (nonatomic, readonly) BOOL inputViewIsFirstResponder;
  27. // For subclass eyes only
  28. @property (nonatomic, strong, readonly) UILabel *titleLabel;
  29. @property (nonatomic, assign, readonly) const char *typeEncoding;
  30. @property (nonatomic, readonly) BOOL showsTitle;
  31. + (CGFloat)titleBottomPadding;
  32. @end