CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

JHSheetActionView 2.0.1

JHSheetActionView 2.0.1

Maintained by jianghao562.



  • By
  • 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