下拉列表(引入TableViewWithBlock包)
来源:互联网 发布:非农数据时间 编辑:程序博客网 时间:2024/06/08 08:09
//用户性别
- (IBAction)sexBtnAction:(id)sender
{
if (isSexOpened)
{
[UIViewanimateWithDuration:0.2animations:^{
UIImage *closeImage=[UIImageimageNamed:@"下拉图标.png"];
[self.sexBtnsetImage:closeImage forState:UIControlStateNormal];
CGRect frame=self.sexTab.frame;
frame.size.height=1;
[self.sexTabsetFrame:frame];
}completion:^(BOOL finished){
isSexOpened = NO;
}];
}else{
[UIViewanimateWithDuration:0.2animations:^{
UIImage *openImage=[UIImageimageNamed:@"收回图标.png"];
[self.sexBtnsetImage:openImage forState:UIControlStateNormal];
CGRect frame=self.sexTab.frame;
frame.size.height=80;//下拉框的高度
[self.sexTabsetFrame:frame];
}completion:^(BOOL finished){
isSexOpened = YES;
}];
}
}
-(void) sexinit
{
//用户性别
isSexOpened = NO;
[self.sexTabinitTableViewDataSourceAndDelegate:^(UITableView *tableView,NSInteger section)
{
return 3;
}
setCellForIndexPathBlock:^(UITableView *tableView,NSIndexPath *indexPath)
{
sexSelectCell *cell=[tableViewdequeueReusableCellWithIdentifier:@"sexSelectCell"];
if (!cell)
{
cell=[[[NSBundlemainBundle]loadNibNamed:@"sexSelectCell"owner:selfoptions:nil]objectAtIndex:0];
[cell setSelectionStyle:UITableViewCellSelectionStyleGray];
}
[cell.lablesetText:[self.sexArrobjectAtIndex:indexPath.row]];
return cell;
}
setDidSelectRowBlock:^(UITableView *tableView,NSIndexPath *indexPath)
{
sexSelectCell *cell=(sexSelectCell*)[tableViewcellForRowAtIndexPath:indexPath];
self.sexText.text=cell.lable.text;
[self.sexBtnsendActionsForControlEvents:UIControlEventTouchUpInside];
}];
[self.sexTab.layersetBorderColor:[UIColorlightGrayColor].CGColor];
[self.sexTab.layersetBorderWidth:2];
}
- 下拉列表(引入TableViewWithBlock包)
- EasyUI中包选择按钮的下拉列表的使用方法
- 下拉列表
- 下拉列表
- 下拉列表
- 下拉列表
- 下拉列表
- 下拉列表
- 下拉列表
- 下拉列表
- 下拉列表
- 下拉列表
- 下拉列表
- 下拉列表
- 有关jdeveloper引入包!~~~~
- struts2包引入
- 静态引入包
- lxml包引入错误
- TCP状态迁移图浅析
- hadoop namenode -format 后出现datanode 无法启动故障解决办法
- Linux系统调用--getrlimit()与setrlimit()函数详解
- reinterpret_cast
- 千万级别的数据存储
- 下拉列表(引入TableViewWithBlock包)
- select into from 和 into from select
- 对Python线程池使用方法和说明(转载)
- sata硬盘通过usb转sata芯片挂载在hub芯片上,其他的usb键盘和鼠标等挂载在hub下都能识别,只有硬盘不能识别
- C++中需要注意的细节
- Emgu CV库:.net平台下对openCV图像处理库的封装
- Python程序的性能分析指南
- inotify -- Linux 2.6 内核中的文件系统变化通知机制
- Linux中grep命令的用法