2013-06-12 55 views
0

我想綁定這個對象控件,但這是第一次,我有一些問題 你能幫我嗎? 我有屬性和空隙「簡單」,但沒有其他問題,我不知道該怎麼辦 感謝 克里斯如何綁定object -c控件?

這是.h文件

#import <UIKit/UIKit.h> 

typedef NS_ENUM(NSUInteger, KGModalBackgroundDisplayStyle){ 
    KGModalBackgroundDisplayStyleGradient, 
    KGModalBackgroundDisplayStyleSolid 
}; 

@interface KGModal : NSObject 

@property (nonatomic) BOOL tapOutsideToDismiss; 

@property (strong, nonatomic) UIColor *modalBackgroundColor; 

@property (nonatomic) KGModalBackgroundDisplayStyle backgroundDisplayStyle; 


+ (instancetype)sharedInstance; 

- (void)showWithContentView:(UIView *)contentView; 

- (void)showWithContentView:(UIView *)contentView andAnimated:(BOOL)animated; 

- (void)showWithContentViewController:(UIViewController *)contentViewController; 

- (void)showWithContentViewController:(UIViewController *)contentViewController andAnimated:(BOOL)animated; 


- (void)hideWithCompletionBlock:(void(^)())completion; 

- (void)hideAnimated:(BOOL)animated withCompletionBlock:(void(^)())completion; 

@end 

回答

0

有兩種選擇,使綁定:

代碼看起來比較簡單,所以很可能你可以使用Objective Sharpie生成的綁定而不需要額外修補它。

+0

謝謝 我試着自動綁定Sharpie – user1592476