ios UITableViewCell如何点击一个cell出现个图片 ios UITableViewCell如何点击一个cell出现个图片,不点击图片立马隐藏啊。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 首先你要了解button是很多种状态的我写了一个简单的例子,你看下就差不多明白了:-(void)doneSomeThing{ UIButton *cellButton = [UIButton buttonWithType:UIButtonTypeCustom]; [cellButton addTarget:self action:@selector(showPicture) forControlEvents:UIControlEventTouchUpInside]; [cellButton addTarget:self action:@selector(dismissPicture) forControlEvents:UIControlEventTouchUpOutside]; //把cellButton的大小设置为cell的大小,另外把button添加到cell上面,设置button的alpha为0或者是背景色clearcolor}- (void)showPicture{ //显示图片}-(void)dismissPicture{ //隐藏图片} uipickerview 高度问题 APNS推送功能支持iPad吗? 求解决发布iPhone应用文件大的问题 ios个人账号能转成公司账号吗 这段代码如何转成android代码? 求最新lion下载地址。 苹果公司的硬件平台是自己设计的么? 解的旧书学cocoa,攒了好多问题,求大神解惑 微信支付的退款流程问题 【求助】使用itms-service协议下载安装ipa文件遇到的问题 资深果粉发声:上哪个网站买iphone6更划算? iOS 模拟器无法显示完整 -------help
我写了一个简单的例子,你看下就差不多明白了:
-(void)doneSomeThing
{
UIButton *cellButton = [UIButton buttonWithType:UIButtonTypeCustom];
[cellButton addTarget:self action:@selector(showPicture) forControlEvents:UIControlEventTouchUpInside];
[cellButton addTarget:self action:@selector(dismissPicture) forControlEvents:UIControlEventTouchUpOutside];
//把cellButton的大小设置为cell的大小,另外把button添加到cell上面,设置button的alpha为0或者是背景色clearcolor
}
- (void)showPicture
{
//显示图片
}
-(void)dismissPicture
{
//隐藏图片
}