English 中文(简体)
触角 页: 1
原标题:touchesForView in hitTest

I have a simple UIView used like container. If I write this code:

- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {

    UIView *hitView = [super hitTest:point withEvent:event];

    NSSet *sTouches = [event touchesForView:self];

    NSLog(@"Touches %d", [sTouches count] );

    return self;
}

Doesn t work! I would like get touches count in hitTest() message, before touchesBegan()! Is it possible?

我有这种等级:

UIView 
  +---> UIScrollView 

When touch on my UIView (single tap) the container moves. When I double touch (two finger) on my UIView, the child UIScrollView doesn t work for Zoom (for example). So I have think to catch touches number.

If touch number is equal to one, hitTest on my UIView container return "self". Else, if touch number is great to one ( == 2), hitTest return "scrollview" pointer.

换言之,我要把两次inger光活动带入“禁试”信息/发明中。

问题回答

<编码> 测试在框架中用于确定哪些观点正在受到打击,从而将<代码>touches Began/>touchesMoved/>touches Ended/>>> touchesCancelled 电文发送至<>。 在<条码>点上,请你说明。

或许你可以解释你试图完成的工作,因为这样做似乎不像正确。





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签