JHSheetActionView 2.0.1

JHSheetActionView 2.0.1

jianghao562 维护。



  • JiangHao

#仿微信 sheetView,一款相当实用的控件!
引入 pod

pod 'JHSheetActionView'

1.使用 block

 JHSheetActionView *sheetView= [[JHSheetActionView alloc] init];
    sheetView.sheetItems=@[@[@"标题1",@"标题2,@"标题3"],@[@"取消"]];
     sheetView.callBackCellForRowIndex = ^(NSInteger index) {
      NSLog(@"选择了第%zd个item",index);
    };
    [sheetView showView];

2.使用 delegate

 #import "JHSheetActionView.h"
 @interface ViewController ()<JHSheetActionViewDelegate>
   JHSheetActionView *sheetView= [[JHSheetActionView alloc] init];
    sheetView.sheetItems=@[@[@"标题1",@"标题2"],@[@"取消"]];
    sheetView.delegate=self;
    [sheetView showView];   
}
#pragma mark - SheetDelegate
-(void)didSelectCellForRowIndex:(NSInteger)index{
      NSLog(@"选择了第%zd个item",index);    
    }
@end

image