[TIMOB-5121] Add a member function to View called 'convertPointToView'
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-09-01T10:34:16.000+0000 |
Affected Version/s | Release 1.7.2 |
Fix Version/s | Sprint 2011-35, Release 1.8.0 |
Components | iOS |
Labels | module_views |
Reporter | Reggie Seagraves |
Assignee | Reggie Seagraves |
Created | 2011-08-26T11:45:00.000+0000 |
Updated | 2012-02-08T16:49:43.000+0000 |
Description
- name: convertPointToView
description: translates a point from the receiver's view coordinate system to another view's coordinate system. If both views
are connected in the native view heirarchies, will return the converted point in the form of an object with x and y properties.
If either view is not in the view heirarchy, a null is returned. Keep in mind that views may be removed from the view heirarchy
if their window is blurred or if the view is offscreen (such as in some situations with ).
returns:
type: [Object, null]
parameters:
- name: point
description: an object with properties of x and y describing a point within the receiver's coordinate system. If this argument is missing an x or y property, or the properties can not be converted into numbers, an exception will be raised.
type: Object
- name: destinationView
description: the view whose coordinate system to which the point will be converted. If this argument is not a view, an exception will be raised.
type: Titanium.UI.View
Tested with version=1.9.0 module_apiversion=2 timestamp=02/08/12 14:59 githash=d577936 on iphone simulator 5.0 and android Nexus One 2.2.2 on v8/rhino