hittest

Horizontal UIScrollView having vertical UIScrollViews inside - how to prevent scrolling of inner scroll views when scrolling outer horizontal view?

拜拜、爱过 提交于 2019-12-03 07:40:58
couldn't find a solution for that. I am building an app, with big scroll view, who has paging (Horizontal). Inside this scroll view, there is a grid of UIView's, and an UIScrollview inside each one of them, with vertical scroll view. Now, the point is, When I'm paging my 'big' scrollview, sometimes the touch get stuck in one of small scrollviews inside the UIViews of the grid. I don't know how to avoid it - tried trick with hitTest but still couldn't find the answer. Hope i'm clear... Thanks for your help. Edit: This is the bigger scrollview: @implementation UIGridScrollView - (id

Tap / Select Node in SceneKit (Swift)

淺唱寂寞╮ 提交于 2019-12-03 06:48:16
I'm new to SceneKit and 3D spaces in iOS. I'm currently working on a simple game that shows a cube of 28 segments ("mini cubes" if you want). I want to move the mini cubes by tapping them, but I can't get my head around how to select specific nodes (childnodes of the big cube). Can anybody help me or post a link to SceneKit tutorials for dummies? I've been looking for days now, and haven't found what I'm looking for. Cheers You can hit test the scene view (for example from the location of a tap gesture recognizer), which will give you a list of hit test results. From each result you can get

Html5 canvas hittest arbitrary shape

人走茶凉 提交于 2019-12-02 06:17:45
问题 I'm trying to develop program which can render images and text in canvas. I tried to handle click on image in canvas, but it work for rectable images. My question: Did you know solution or frameworks for handle click on visible part of image (not transparent part) in canvas ? I'm looking for javascript implementation of ActionScript hitTestObject function, if someone familiar with it. Here is simple algorithm with rectable hit text: http://jsfiddle.net/V92Gn/298/ var hitted = e.clientX >=

Unable to implement onTouchEvent (Drag & Drop) with Osmdroid

[亡魂溺海] 提交于 2019-12-02 05:14:05
问题 I had been trying to implement OnTouchEvent so I can react when an user move (drag & drop) an overlayitem. I found something similar on the Osmdroid site: http://code.google.com/p/osmdroid/issues/detail?id=225. I am using the code there as reference but still is not working for me and then my application is crashing when it get to the hitTest. Any suggestion? Thanks. public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action = event.getAction(); final int x = (int)

Unable to implement onTouchEvent (Drag & Drop) with Osmdroid

爱⌒轻易说出口 提交于 2019-12-02 01:47:29
I had been trying to implement OnTouchEvent so I can react when an user move (drag & drop) an overlayitem. I found something similar on the Osmdroid site: http://code.google.com/p/osmdroid/issues/detail?id=225 . I am using the code there as reference but still is not working for me and then my application is crashing when it get to the hitTest. Any suggestion? Thanks. public boolean onTouchEvent(MotionEvent event, MapView mapView) { final int action = event.getAction(); final int x = (int) event.getX(); final int y = (int) event.getY(); final Projection pj = mapView.getProjection(); boolean

Bug in geometry Hit-Testing

匆匆过客 提交于 2019-12-01 05:25:23
I have a DrawingVisual element that rappresents a path which geometry is described by this syntax : "m106,59.3c0-1.98,0,0-4.95,0.989-3.96,0.989-13.8,3.96-20.8,4.95-6.92,0-14.8-3.96-17.8-3.96-1.98,2.97,3.96,10.9,7.91,13.8,2.97,1.98,9.89,3.96,14.8,3.96,4.95-0.989,10.9-2.97,13.8-6.92,2.97-2.97,5.93-10.9,6.92-12.9z" To render the visual i use MyCanvas class, that provides hit-testing functionality: public class MyCanvas : Panel { public List<Visual> Visuals = new List<Visual>(); private List<DrawingVisual> Hits = new List<DrawingVisual>(); public void AddVisual(Visual Visual) { this.Visuals.Add

How to get UIView given a CGPoint?

橙三吉。 提交于 2019-12-01 02:24:57
I am trying to find a way to get a particular UIView given a CGPoint . Briefly, I want to do a hit test. For example, I have a UIView which has many subviews whose sizes are smaller than the parent UIView . What I want to do is, when a touchMoved event happens, to check the other subviews around the touched subview. For that purpose, it would be nice to be able to convert a CGPoint to a subview UIView . I'm new to Objective-C. Is there good way to do it? Any suggestion would be really helpful. :) There is a hitTest:withEvent: selector on UIView. This returns the deepest subview in the view

Right-click on a Listbox in a Silverlight 4 app

岁酱吖の 提交于 2019-12-01 00:16:29
I am trying to implement what I used to take for granted in Winforms applications. I am a Silverlight noob, so hopefully all this is elementary. I have a listbox in a Silverlight 4 app. I'd like to do the following: Right-click on the listbox Have the item under the location where I click highlight itself I'd like a context menu to popup (with my own items in the context menu) From my research so far, it appears that there is no ContextMenu construct in Silverlight, instead we have to build up a Grid/Canvas structure and attach it to a Popup object, which is what is then popped up. My

How to get UIView given a CGPoint?

為{幸葍}努か 提交于 2019-11-30 22:47:44
问题 I am trying to find a way to get a particular UIView given a CGPoint . Briefly, I want to do a hit test. For example, I have a UIView which has many subviews whose sizes are smaller than the parent UIView . What I want to do is, when a touchMoved event happens, to check the other subviews around the touched subview. For that purpose, it would be nice to be able to convert a CGPoint to a subview UIView . I'm new to Objective-C. Is there good way to do it? Any suggestion would be really helpful

Swift: hitTest for UIView underneath another UIView

烂漫一生 提交于 2019-11-30 22:46:42
I have TransparentUIView on top of RedOrGreenUIView. TransparentUIView has a UILongPressGestureRecognizer attached to it. Once user begins a long touch on it, I check for .Changed status of this LongPressGesture, and execute below hitTest: var p:CGPoint = rec.locationInView(self.view) var selectedView = view.hitTest(p, withEvent: nil) if selectedView != nil { if selectedView == TransparentUIView { println("TransparentUIView is being touched") } } I get TransparentView as selectedView fine. However I need to be able to conduct a hitTest on RedOrGreenUIView at the same time, which is underneath