Skip to content

自定义的 action sheet,行数过多时可指定可见行数

License

Notifications You must be signed in to change notification settings

xjh093/JHActioinSheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JHActioinSheet

action sheet

image

.h

#import <UIKit/UIKit.h>

typedef void(^JHClickBlock)(NSInteger index,NSString *title);

@interface JHActionSheetTitleConfig : NSObject
@property (nonatomic,  strong) UIFont  *font;
@property (nonatomic,  strong) UIColor *color;
@property (nonatomic,  strong) UIColor *highlightedColor;
@property (nonatomic,  assign) BOOL     enable;
@end

@interface JHActionSheetViewController : UIViewController

@property (copy,    nonatomic) JHClickBlock clickBlock ; /**< 点击按钮回调 */

@property (nonatomic,  strong) NSArray <JHActionSheetTitleConfig *>*titleConfig;

@property (nonatomic,  strong) JHActionSheetTitleConfig *allMenuTitleConfig;

@property (nonatomic,  strong) JHActionSheetTitleConfig *cancelTitleConfig;

/// menus types : 1. @[@"title1",@"title2"...] 2. @[@[@"image1",@"title1"],@[@"image2",@"title2"]...]
- (instancetype)initWithMenus:(NSArray *)menus;

/// menus types : 1. @[@"title1",@"title2"...] 2. @[@[@"image1",@"title1"],@[@"image2",@"title2"]...]
- (instancetype)initWithMenus:(NSArray *)menus
                menuRowHeight:(CGFloat)height1
              cancelRowHeight:(CGFloat)height2;

/// menus types : 1. @[@"title1",@"title2"...] 2. @[@[@"image1",@"title1"],@[@"image2",@"title2"]...]
- (instancetype)initWithMenus:(NSArray *)menus
                menuRowHeight:(CGFloat)height1
              cancelRowHeight:(CGFloat)height2
                 visiableRows:(NSInteger)row;

- (void)showIn:(UIViewController *)vc;

@end

About

自定义的 action sheet,行数过多时可指定可见行数

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published