在iPhone中的UITableViewController类中没有调用touchesBegan方法 [英] touchesBegan method not called in UITableViewController class in iPhone

查看:253
本文介绍了在iPhone中的UITableViewController类中没有调用touchesBegan方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在UITableViewController类中使用 touchesBegan:withEvent:方法?

How can I use touchesBegan: withEvent: method in UITableViewController class?

UITableViewController是UIViewController的子类类。那么为什么该方法在UITableViewController中不起作用?

UITableViewController is a subclass of UIViewController class. So why the method does not works in UITableViewController?

推荐答案

touchesBegan除了是一个UIViewController方法之外还是一个UIView方法。

touchesBegan is a also UIView method besides being a UIViewController method.

要覆盖它,你需要子类UIView或UITableView而不是控制器。

to override it you need to subclass UIView or UITableView and not the controllers.

这篇关于在iPhone中的UITableViewController类中没有调用touchesBegan方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆