我创建了一个tableViewCell,包括一个图像,两个文本标签和一个uibutton.该按钮被分配给一个动作方法(例如viewButtonPused:sender).
我习惯用tableView处理行选择:didSelectRowAtIndexPath:所以我可以判断选择了哪一行.但是使用uibutton及其动作方法......我怎么能说出来?
提前致谢.
我第一次使用UIGestureRecognizer,我想让我的应用程序在iOS 3.0上运行.由于Apple明确表示该库在iOS 3.2及更高版本中可用,因此我使用了以下代码:
// Make sure that Gesture recognition technology is supportted by the device SDK version
if ([UIGestureRecognizer instancesRespondToSelector:@selector(initWithTarget:action:)])
{
[self initGestureRecognizers];
}
Run Code Online (Sandbox Code Playgroud)
令人惊讶的是,当我在我唯一的目标上运行App时,运行SDK3.0,它运行正常.
我将条件替换为以下内容:
if ([[[UIDevice currentDevice] systemVersion] compare:@"3.2"] != NSOrderedAscending)
{
[self initGestureRecognizers];
}
Run Code Online (Sandbox Code Playgroud)
我很想得到关于它的评论.
谢谢