| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- //
- // MMAlertView.h
- // MMPopupView
- //
- // Created by Ralph Li on 9/6/15.
- // Copyright © 2015 LJC. All rights reserved.
- //
- #import "MMPopupView.h"
- #import "MMPopupDefine.h"
- typedef void(^MMPopupInputHandler)(NSString *text);
- @interface MMAlertView : MMPopupView
- @property (nonatomic, assign) NSUInteger maxInputLength; // default is 0. Means no length limit.
- - (instancetype) initWithInputTitle:(NSString*)title
- detail:(NSString*)detail
- placeholder:(NSString*)inputPlaceholder
- keyboardType:(UIKeyboardType)keyboardType
- items:(NSArray*)items
- handler:(MMPopupInputHandler)inputHandler;
- - (instancetype) initWithConfirmTitle:(NSString*)title
- detail:(NSString*)detail;
- - (instancetype) initWithTitle:(NSString*)title
- detail:(NSString*)detail
- items:(NSArray*)items;
- @end
- /**
- * Global Configuration of MMAlertView.
- */
- @interface MMAlertViewConfig : NSObject
- + (MMAlertViewConfig*) globalConfig;
- @property (nonatomic, assign) CGFloat width; // Default is 275.
- @property (nonatomic, assign) CGFloat buttonHeight; // Default is 50.
- @property (nonatomic, assign) CGFloat innerMargin; // Default is 25.
- @property (nonatomic, assign) CGFloat cornerRadius; // Default is 6.
- @property (nonatomic, assign) CGFloat titleFontSize; // Default is 17.
- @property (nonatomic, assign) CGFloat detailFontSize; // Default is 14.
- @property (nonatomic, assign) CGFloat buttonFontSize; // Default is 17.
- @property (nonatomic, strong) UIColor *backgroundColor; // Default is #FFFFFF.
- @property (nonatomic, strong) UIColor *titleColor; // Default is #333333.
- @property (nonatomic, strong) UIColor *detailColor; // Default is #333333.
- @property (nonatomic, strong) UIColor *splitColor; // Default is #CCCCCC.
- @property (nonatomic, strong) UIColor *itemNormalColor; // Default is #333333. effect with MMItemTypeNormal
- @property (nonatomic, strong) UIColor *itemHighlightColor; // Default is #E76153. effect with MMItemTypeHighlight
- @property (nonatomic, strong) UIColor *itemPressedColor; // Default is #EFEDE7.
- @property (nonatomic, strong) NSString *defaultTextOK; // Default is "知道了".
- @property (nonatomic, strong) NSString *defaultTextCancel; // Default is "取消".
- @property (nonatomic, strong) NSString *defaultTextConfirm; // Default is "确定".
- @end
|