| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- //
- // HyPopMenuView.h
- // HyPopMenuView
- //
- // Created by H y on 15/9/8.
- // Copyright (c) 2015年 ouy.Aberi. All rights reserved.
- //
- #import "HyPopMenuViewDelegate.h"
- #import "PopMenuButton.h"
- #import "PopMenuModel.h"
- #import <UIKit/UIKit.h>
- /**
- * 弹出动画类型
- * animation Type
- */
- typedef NS_ENUM(NSUInteger, HyPopMenuViewAnimationType) {
- /**
- * 仿新浪App弹出菜单。
- * Sina App fake pop-up menu
- */
- HyPopMenuViewAnimationTypeSina,
- /**
- * 带有粘性的动画
- * Animation with viscous
- */
- HyPopMenuViewAnimationTypeViscous,
- /**
- * 底部中心点弹出动画
- * The bottom of the pop-up animation center
- */
- HyPopMenuViewAnimationTypeCenter,
-
- /**
- * 左和右弹出动画
- * Left and right pop Anime
- */
- HyPopMenuViewAnimationTypeLeftAndRight,
- };
- typedef enum : NSUInteger {
- /**
- * light模糊背景类型。
- * light blurred background type.
- */
- HyPopMenuViewBackgroundTypeLightBlur,
- /**
- * dark模糊背景类型。
- * dark blurred background type.
- */
- HyPopMenuViewBackgroundTypeDarkBlur,
- /**
- * 偏白半透明背景类型。
- * Partial white translucent background type.
- */
- HyPopMenuViewBackgroundTypeLightTranslucent,
- /**
- * 偏黑半透明背景类型。
- * Partial translucent black background type.
- */
- HyPopMenuViewBackgroundTypeDarkTranslucent,
- /**
- * 白~黑渐变色。
- * Gradient color.
- */
- HyPopMenuViewBackgroundTypeGradient,
- } HyPopMenuViewBackgroundType; //背景类型
- //Background type
- @interface HyPopMenuView : UIView
- /*=====================================================================================*/
- @property (nonatomic, retain) NSArray<PopMenuModel*>* dataSource;
- /**
- * 背景类型默认为 'HyPopMenuViewBackgroundTypeLightBlur'
- * The default is 'HyPopMenuViewBackgroundTypeLightBlur'
- */
- @property (nonatomic, assign) HyPopMenuViewBackgroundType backgroundType;
- /**
- * 动画类型
- * animation Type
- */
- @property (nonatomic, assign) HyPopMenuViewAnimationType animationType;
- /**
- * 自动识别颜色主题,默认为关闭。
- * The default is false.
- */
- @property (nonatomic, assign) BOOL automaticIdentificationColor;
- /**
- * HyPopMenuViewDelegate
- */
- @property (nonatomic, weak) id<HyPopMenuViewDelegate> delegate;
- /**
- * 默认为 10.0f 取值范围: 0.0f ~ 20.0f
- * default is 10.0f Range: 0 ~ 20
- */
- @property (nonatomic, assign) CGFloat popMenuSpeed;
- /**
- * 顶部自定义View
- */
- @property (nonatomic, strong) UIView* topView;
- + (instancetype)sharedPopMenuManager;
- - (void)openMenu;
- - (void)closeMenu;
- - (BOOL)isOpenMenu;
- @end
- UIKIT_EXTERN NSString* const HyPopMenuViewWillShowNotification;
- UIKIT_EXTERN NSString* const HyPopMenuViewDidShowNotification;
- UIKIT_EXTERN NSString* const HyPopMenuViewWillHideNotification;
- UIKIT_EXTERN NSString* const HyPopMenuViewDidHideNotification;
|