您的位置:首页 > 移动开发 > IOS开发

iOS下拉悬浮窗,有选中状态

2016-05-15 16:11 423 查看
本文首发地址

一句话完成调用

该API和UITableView的API是差不多的

快速集成

使用简单

API仿UITableView的API哦

*内存消耗超低

容易扩展

看看效果图



快速继承

github
https://github.com/7General/HZDropDwonMneuList


// 添加代码
self.dropMenu = [DropDownMenuList show:CGPointMake(0, 64) andHeight:44];
self.dropMenu.delegate = self;
self.dropMenu.dataSource = self;
[self.view addSubview:self.dropMenu];


HZDropDownMenuList的代理

@protocol DropDownMenuListDataSouce <NSObject>
@required
// 设置显示列的内容
-(NSMutableArray *)menuNumberOfRowInColumn;
// 设置多少行显示
-(NSInteger)menu:(DropDownMenuList *)menu numberOfRowsInColum:(NSInteger)column;
// 设置显示没行的内容
-(NSString *)menu:(DropDownMenuList *)menu titleForRowAtIndexPath:(HZIndexPath *)indexPath;

@optional
// 每行图片
-(NSString *)menu:(DropDownMenuList *)menu imageNameForRowAtIndexPath:(HZIndexPath *)indexPath;

@end


@protocol DropDownMenuListDelegate <NSObject>
@optional
// 点击每一行的效果
- (void)menu:(DropDownMenuList *)segment didSelectRowAtIndexPath:(HZIndexPath *)indexPath;
// 点击没一列的效果
- (void)menu:(DropDownMenuList *)segment didSelectTitleAtColumn:(NSInteger)column;

@end


关注洲洲哥的公众号,提高装逼技能就靠他了

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ios api