From de028ad9cc5b6c13134bb056b6b0c105f6108bac Mon Sep 17 00:00:00 2001 From: BigPi Date: Sun, 20 Mar 2016 16:57:43 +0800 Subject: [PATCH] add IBInspectable and IB_DESIGNABLE so that we can edit GCPlaceholderTextView Property in the storyboard :) --- GCPlaceholderTextView/GCPlaceholderTextView.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/GCPlaceholderTextView/GCPlaceholderTextView.h b/GCPlaceholderTextView/GCPlaceholderTextView.h index c548034..088dacd 100644 --- a/GCPlaceholderTextView/GCPlaceholderTextView.h +++ b/GCPlaceholderTextView/GCPlaceholderTextView.h @@ -8,12 +8,16 @@ #import - +IB_DESIGNABLE @interface GCPlaceholderTextView : UITextView -@property(nonatomic, strong) NSString *placeholder; +@property(nonatomic, strong) IBInspectable NSString *placeholder; + +@property (nonatomic, strong) IBInspectable UIColor *realTextColor; //UI_APPEARANCE_SELECTOR +@property (nonatomic, strong) IBInspectable UIColor *placeholderColor; //UI_APPEARANCE_SELECTOR -@property (nonatomic, strong) UIColor *realTextColor UI_APPEARANCE_SELECTOR; -@property (nonatomic, strong) UIColor *placeholderColor UI_APPEARANCE_SELECTOR; +// I don't know what's 'UI_APPEARANCE_SELECTOR' means, +// but if i don't remove it, +// `realTextColor` and `placeholderColor` property won't show in the Storyboard; @end