123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- //
- // LCActionSheetConfig.h
- // LCActionSheet
- //
- // Created by Leo on 2016/11/29.
- //
- // Copyright (c) 2015-2017 Leo <leodaxia@gmail.com>
- //
- // Permission is hereby granted, free of charge, to any person obtaining a copy
- // of this software and associated documentation files (the "Software"), to deal
- // in the Software without restriction, including without limitation the rights
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- // copies of the Software, and to permit persons to whom the Software is
- // furnished to do so, subject to the following conditions:
- //
- // The above copyright notice and this permission notice shall be included in all
- // copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- // SOFTWARE.
- #import <UIKit/UIKit.h>
- #define LC_ACTION_SHEET_COLOR(r, g, b) LC_ACTION_SHEET_COLOR_A(r, g, b, 1.0f)
- #define LC_ACTION_SHEET_COLOR_A(r, g, b, a) [UIColor colorWithRed:(r)/255.0f\
- green:(g)/255.0f\
- blue:(b)/255.0f\
- alpha:a]
- NS_ASSUME_NONNULL_BEGIN
- @interface LCActionSheetConfig : NSObject
- /**
- Title.
- */
- @property (nullable, nonatomic, copy) NSString *title;
- /**
- Cancel button's title.
- */
- @property (nullable, nonatomic, copy) NSString *cancelButtonTitle;
- /**
- Cancel button's index.
- */
- @property (nonatomic, assign, readonly) NSInteger cancelButtonIndex;
- /**
- All destructive buttons' set. You should give it the `NSNumber` type items.
- */
- @property (nullable, nonatomic, strong) NSIndexSet *destructiveButtonIndexSet;
- /**
- Destructive button's color. Default is RGB(254, 67, 37).
- */
- @property (nonatomic, strong) UIColor *destructiveButtonColor;
- /**
- Title's color. Default is `[UIColor blackColor]`.
- */
- @property (nonatomic, strong) UIColor *titleColor;
- /**
- Buttons' color, without destructive buttons. Default is `[UIColor blackColor]`.
- */
- @property (nonatomic, strong) UIColor *buttonColor;
- /**
- Title's font. Default is `[UIFont systemFontOfSize:14.0f]`.
- */
- @property (nonatomic, strong) UIFont *titleFont;
- /**
- All buttons' font. Default is `[UIFont systemFontOfSize:18.0f]`.
- */
- @property (nonatomic, strong) UIFont *buttonFont;
- /**
- All buttons' height. Default is 49.0f;
- */
- @property (nonatomic, assign) CGFloat buttonHeight;
- /**
- If buttons' bottom view can scrolling. Default is NO.
- */
- @property (nonatomic, assign, getter=canScrolling) BOOL scrolling;
- /**
- Visible buttons' count. You have to set `scrolling = YES` if you want to set it.
- */
- @property (nonatomic, assign) CGFloat visibleButtonCount;
- /**
- Animation duration. Default is 0.3 seconds.
- */
- @property (nonatomic, assign) CGFloat animationDuration;
- /**
- Opacity of dark background. Default is 0.3f.
- */
- @property (nonatomic, assign) CGFloat darkOpacity;
- /**
- If you can tap darkView to dismiss. Defalut is NO, you can tap dardView to dismiss.
- */
- @property (nonatomic, assign) BOOL darkViewNoTaped;
- /**
- Clear blur effect. Default is NO, don't clear blur effect.
- */
- @property (nonatomic, assign) BOOL unBlur;
- /**
- Style of blur effect. Default is `UIBlurEffectStyleExtraLight`. iOS 8.0 +
- */
- @property (nonatomic, assign) UIBlurEffectStyle blurEffectStyle;
- /**
- Title's edge insets. Default is `UIEdgeInsetsMake(15.0f, 15.0f, 15.0f, 15.0f)`.
- */
- @property (nonatomic, assign) UIEdgeInsets titleEdgeInsets;
- /**
- Cell's separator color. Default is `RGBA(170/255.0f, 170/255.0f, 170/255.0f, 0.5f)`.
- */
- @property (nonatomic, strong) UIColor *separatorColor;
- /**
- Auto hide when the device rotated. Default is NO, won't auto hide.
- */
- @property (nonatomic, assign) BOOL autoHideWhenDeviceRotated;
- /**
- LCActionSheetConfig shared instance.
- */
- @property (class, nonatomic, strong, readonly) LCActionSheetConfig *config;
- /**
- LCActionSheetConfig shared instance.
- */
- + (instancetype)shared __deprecated_msg("Method deprecated. Use property `config` instead.");
- @end
- NS_ASSUME_NONNULL_END
|