You are reading 12.7.1. See this page in 13.4.1.
Titanium.UI.iOS.SplitWindow
Extends Titanium.UI.WindowTitanium.UI.ViewTitanium.Proxy
A SplitWindow is a window that manages the presentation of two side-by-side view controllers.
The masterView and detailView properties are required before the SplitWindow is opened.
You use this class to implement a master-detail interface, in which the left-side view presents
a list of items and the right-side presents details of the selected item. The SplitWindow is supported
for both iPhone and iPad idioms. Use the Titanium.UI.iOS.createSplitWindow method to create a SplitWindow object
By default, SplitWindow shows both master and detail views in landscape orientation. When the
device switches into portrait orientation, the master is only shown if showMasterInPortrait
is set to true.
The property masterIsOverlayed controls how the master is
displayed in portrait mode. When masterIsOverlayed is set to true, the detailView occupies the full screen
and and masterView is displayed overlayed on top to the left of the screen. When masterIsOverlayed is set
to false, the available screen width is split between the masterView and detailView.
The width of the masterView can be controlled by the portraitSplit and
landscapeSplit properties. These values are capped in the range 0.25 to 0.5.
Any values outside this range are ignored.
To add a navigation bar to either the master or detail view of the split window, use a Titanium.UI.NavigationWindow.
The SplitWindow is a top-level window and cannot be contained within another window or view.
Examples
Split Window
This is an example of a Split Window.
var detail = Ti.UI.createWindow({ backgroundColor: 'white' });
var label1 = Ti.UI.createLabel({ text: 'Detail View' });
detail.add(label1);
var detailNav = Ti.UI.createNavigationWindow({ window: detail });
var master = Ti.UI.createWindow({ backgroundColor: 'gray' });
var label2 = Ti.UI.createLabel({ text: 'Master View' });
master.add(label2);
var masterNav = Ti.UI.createNavigationWindow({ window: master });
var splitWin = Ti.UI.iOS.createSplitWindow({
detailView: detailNav,
masterView: masterNav
});
splitWin.open();
Alloy XML Markup
Below is an Alloy version of the previous example. The first window is the masterView and the second window is the detailView. You can also use the <Require> element to add a <Window> or <NavigationWindow>.
views/index.xml:
<Alloy>
<SplitWindow backgroundColor="white" showMasterInPortrait="true">
<!-- First window is the masterView -->
<NavigationWindow>
<Window title="Master View">
<ListView>
<ListSection headerTitle="Some items">
<ListItem title="Item 1" />
<ListItem title="Item 2" />
<ListItem title="Item 3" />
</ListSection>
</ListView>
</Window>
</NavigationWindow>
<!-- Second window is the detailView -->
<NavigationWindow>
<Window title="Detail View">
<Label>I am the detail view.</Label>
</Window>
</NavigationWindow>
</SplitWindow>
</Alloy>
controllers/index.js:
$.index.open();
Properties 96
Inherited from Titanium.UI.View
Whether the view should be "hidden" from (i.e., ignored by) the accessibility service.
Default: false
Inherited from Titanium.UI.View
Briefly describes what performing an action (such as a click) on the view will do.
Default: null
Inherited from Titanium.UI.View
A succint label identifying the view for the device's accessibility service.
Inherited from Titanium.UI.View
A string describing the value (if any) of the view for the device's accessibility service.
Inherited from Titanium.UI.View
Coordinate of the view about which to pivot an animation.
Inherited from Titanium.UI.View
Current position of the view during an animation.
Inherited from Titanium.Proxy
The name of the API that this proxy corresponds to.
Inherited from Titanium.UI.Window
Specifies whether or not the view controller should automatically adjust its scroll view insets.
backButtonTitle
StringInherited from Titanium.UI.Window
Title for the back button. This is only valid when the window is a child of a tab.
backButtonTitleImage
String | Titanium.BlobInherited from Titanium.UI.Window
The image to show as the back button. This is only valid when the window is a child of a tab.
backgroundColor
String | Titanium.UI.ColorInherited from Titanium.UI.Window
Background color of the window, as a color name or hex triplet.
Default: Transparent
Inherited from Titanium.UI.View
A background gradient for the view.
Linear and Radial Gradients
The following code excerpt creates two views, one with a linear gradient and one with a radial gradient.
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#fff',
layout: 'vertical'
});
var radialGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'radial',
startPoint: { x: 50, y: 50 },
endPoint: { x: 50, y: 50 },
colors: [ 'red', 'blue'],
startRadius: 50,
endRadius: 0,
backfillStart: true
}
});
var linearGradient = Ti.UI.createView({
top: 10,
width: 100,
height: 100,
backgroundGradient: {
type: 'linear',
startPoint: { x: '0%', y: '50%' },
endPoint: { x: '100%', y: '50%' },
colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],
}
});
win1.add(radialGradient);
win1.add(linearGradient);
win1.open();
backgroundImage
StringInherited from Titanium.UI.View
Background image for the view, specified as a local file path or URL.
backgroundLeftCap
NumberInherited from Titanium.UI.View
Size of the left end cap.
Default: 0
backgroundRepeat
BooleanInherited from Titanium.UI.View
Determines whether to tile a background across a view.
Default: false
backgroundTopCap
NumberInherited from Titanium.UI.View
Size of the top end cap.
Default: 0
Inherited from Titanium.UI.Window
Background color for the nav bar, as a color name or hex triplet.
barImage
StringInherited from Titanium.UI.Window
Background image for the nav bar, specified as a URL to a local image.
borderColor
String | Titanium.UI.ColorInherited from Titanium.UI.View
Border color of the view, as a color name or hex triplet.
borderRadius
Number | String | Array<Number> | Array<String>Inherited from Titanium.UI.View
Radius for the rounded corners of the view's border.
Default: 0
borderWidth
NumberInherited from Titanium.UI.View
Border width of the view.
Default: 0
bottom
Number | StringInherited from Titanium.UI.Window
Window's bottom position, in platform-specific units.
Default: 0
Inherited from Titanium.Proxy
Indicates if the proxy will bubble an event to its parent.
Default: true
Inherited from Titanium.UI.View
View's center position, in the parent view's coordinates.
Inherited from Titanium.UI.View
Array of this view's child views.
Inherited from Titanium.UI.View
View's clipping behavior.
Inherited from Titanium.UI.Window
Determines whether this Window is closed.
Default: true
Window for the detail view section of the SplitWindow.
Inherited from Titanium.UI.Window
An array of supported values specified using the EXTEND_EDGE constants in Titanium.UI.
Inherited from Titanium.UI.Window
Specifies whether the screen insets/notches are allowed to overlap the window's content or not.
Default: `false` on Android, `true` on iOS.
Inherited from Titanium.UI.Window
Determines whether this TextArea has focus.
Default: false
fullscreen
BooleanInherited from Titanium.UI.Window
Boolean value indicating if the window is fullscreen.
Default: false
height
Number | StringInherited from Titanium.UI.View
View height, in platform-specific units.
Inherited from Titanium.UI.Window
Set this to true to hide the back button of navigation bar.
Default: false
Inherited from Titanium.UI.Window
Set this to true to hide the navigation bar on swipe.
Default: false
Inherited from Titanium.UI.Window
Set this to true to hide the navigation bar on tap.
Default: false
Inherited from Titanium.UI.Window
Set this to true to hide the navigation bar when the keyboard appears.
Default: false
Inherited from Titanium.UI.Window
Set this to true to hide the shadow image of the navigation bar.
Default: false
Inherited from Titanium.UI.Window
A Boolean value indicating whether the integrated search bar is hidden when scrolling any underlying content.
Default: true
Inherited from Titanium.UI.Window
Boolean value indicating whether the system is allowed to hide the visual indicator for returning to the Home screen.
Default: false
Inherited from Titanium.UI.View
Adds a horizontal parallax effect to the view
Inherited from Titanium.UI.View
Determines whether the layout has wrapping behavior.
Default: true
id
StringInherited from Titanium.UI.View
View's identifier.
Inherited from Titanium.UI.Window
Specifies if the edges should extend beyond opaque bars (navigation bar, tab bar, toolbar).
landscapeSplit
NumberDetermines the width of the masterView in landscape mode.
These values are capped in the range 0.25 to 0.5. Any values outside this range are ignored.
Default: The width of the master-view divided by the screen-height
Inherited from Titanium.UI.Window
The mode to use when displaying the title of the navigation bar.
Default: Titanium.UI.iOS.LARGE_TITLE_DISPLAY_MODE_AUTOMATIC
Inherited from Titanium.UI.Window
A Boolean value indicating whether the title should be displayed in a large format.
Default: false
layout
StringInherited from Titanium.UI.View
Specifies how the view positions its children. One of: 'composite', 'vertical', or 'horizontal'.
left
Number | StringInherited from Titanium.UI.Window
Window's left position, in platform-specific units.
Default: 0
Inherited from Titanium.UI.Window
View to show in the left nav bar area.
Inherited from Titanium.UI.Window
An Array of views to show in the left nav bar area.
masterIsOverlayed
BooleanDetermines whether to show the master view is overlayed in portrait orientation.
Note that you need to set showMasterInPortrait to true if you want to use
this property in portrait mode.
Default: false
Window for the master view section of the SplitWindow.
masterViewVisible
BooleanDetermines whether to show the master view or hide.
Default: true
modal
BooleanInherited from Titanium.UI.Window
Indicates to open a modal window or not.
Default: false
navBarHidden
BooleanInherited from Titanium.UI.Window
Hides the navigation bar (true) or shows the navigation bar (false).
Default: false
Inherited from Titanium.UI.Window
The Titanium.UI.NavigationWindow instance hosting this window.
Inherited from Titanium.UI.Window
The tintColor to apply to the navigation bar.
Default: null
opacity
NumberInherited from Titanium.UI.Window
The opacity from 0.0-1.0.
Inherited from Titanium.UI.Window
Current orientation of the window.
orientationModes
Array<Number>Inherited from Titanium.UI.Window
Array of supported orientation modes, specified using the orientation constants defined in Titanium.UI.
Default: empty array
portraitSplit
NumberDetermines the width of the masterView in portrait mode.
These values are capped in the range 0.25 to 0.5. Any values outside this range are ignored.
Default: The width of the master-view divided by the screen-width
Inherited from Titanium.UI.View
The preview context used in the 3D-Touch feature "Peek and Pop".
Inherited from Titanium.UI.View
Background color of the wrapper view when this view is used as either Titanium.UI.ListView.pullView or Titanium.UI.TableView.headerPullView.
Defaults to undefined. Results in a light grey background color on the wrapper view.
Inherited from Titanium.UI.View
The bounding box of the view relative to its parent, in system units.
right
Number | StringInherited from Titanium.UI.Window
Window's right position, in platform-specific units.
Default: 0
Inherited from Titanium.UI.Window
View to show in the right nav bar area.
Inherited from Titanium.UI.Window
An Array of views to show in the right nav bar area.
Inherited from Titanium.UI.View
Clockwise 2D rotation of the view in degrees.
Inherited from Titanium.UI.Window
The padding needed to safely display content without it being overlapped by the screen insets and notches.
Inherited from Titanium.UI.Window
Shadow image for the navigation bar, specified as a URL to a local image..
showMasterInPortrait
BooleanDetermines whether to show the master view in portrait orientation.
Default: false
Inherited from Titanium.UI.View
The size of the view in system units.
Inherited from Titanium.UI.Window
The status bar style associated with this window.
tabBarHidden
BooleanInherited from Titanium.UI.Window
Boolean value indicating if the tab bar should be hidden.
Inherited from Titanium.UI.View
The view's tintColor
Default: null
title
StringInherited from Titanium.UI.Window
Title of the window.
Inherited from Titanium.UI.Window
Title text attributes of the window.
Inherited from Titanium.UI.Window
View to show in the title area of the nav bar.
titleid
StringInherited from Titanium.UI.Window
Key identifying a string from the locale file to use for the window title.
titleImage
StringInherited from Titanium.UI.Window
Image to show in the title area of the nav bar, specified as a local file path or URL.
titlePrompt
StringInherited from Titanium.UI.Window
Title prompt for the window.
titlepromptid
StringInherited from Titanium.UI.Window
Key identifying a string from the locale file to use for the window title prompt.
toolbar
Array<Titanium.UI.View>Inherited from Titanium.UI.Window
Array of button objects to show in the window's toolbar.
Inherited from Titanium.UI.View
The default text to display in the control's tooltip.
top
Number | StringInherited from Titanium.UI.Window
Window's top position, in platform-specific units.
Default: 0
touchEnabled
BooleanInherited from Titanium.UI.View
Determines whether view should receive touch events.
Default: true
Inherited from Titanium.UI.View
Transformation matrix to apply to the view.
Default: Identity matrix
translucent
BooleanInherited from Titanium.UI.Window
Boolean value indicating if the nav bar is translucent.
Default: true on iOS7 and above, false otherwise.
Inherited from Titanium.UI.View
Adds a vertical parallax effect to the view
viewShadowColor
String | Titanium.UI.Colorsince Android 11.1.0, iPhone 3.3.0, iPad 3.3.0, macOS 9.2.0Inherited from Titanium.UI.View
Determines the color of the shadow.
Inherited from Titanium.UI.View
Determines the offset for the shadow of the view.
Inherited from Titanium.UI.View
Determines the blur radius used to create the shadow.
visible
BooleanInherited from Titanium.UI.View
Determines whether the view is visible.
Default: true
width
Number | StringInherited from Titanium.UI.View
View's width, in platform-specific units.
zIndex
NumberInherited from Titanium.UI.View
Z-index stack order position, relative to other sibling views.
Methods 25
Inherited from Titanium.UI.View
Adds a child to this view's hierarchy.
| Parameters | Type | Description |
|---|---|---|
| view | Titanium.UI.View | Array<Titanium.UI.View> | View to add to this view's hierarchy. You may pass an array of views, e.g. |
Inherited from Titanium.Proxy
Adds the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to invoke when the event is fired. 4 fields
|
Inherited from Titanium.UI.View
Animates this view.
| Parameters | Type | Description |
|---|---|---|
| animation | Titanium.UI.Animation | Dictionary<Titanium.UI.Animation> | Either a dictionary of animation properties or an Animation object. |
| callback? | Callback<Object> | Function to be invoked upon completion of the animation. |
applyProperties
since 3.0.0Inherited from Titanium.Proxy
Applies the properties to the proxy.
| Parameters | Type | Description |
|---|---|---|
| props | Dictionary | A dictionary of properties to apply. |
clearMotionEffects
since 8.2.0Inherited from Titanium.UI.View
Removes all previously added motion effects.
Inherited from Titanium.UI.Window
Closes the window.
| Parameters | Type | Description |
|---|---|---|
| params? | Titanium.UI.Animation | Dictionary<Titanium.UI.Animation> | closeWindowParams | Animation or display properties to use when closing the window. 5 fields
|
Starting in SDK 10.0.0, this method returns a Promise that will be resolved once the window is closed,
akin to adding a one-time listener for the close event. If the window fails to close (for example, because
it was not yet open) the Promise will be rejected.
convertPointToView
since Android 1.8, iPhone 1.8, iPad 1.8, macOS 9.2.0Inherited from Titanium.UI.View
Translates a point from this view's coordinate system to another view's coordinate system.
| Parameters | Type | Description |
|---|---|---|
| point | Point | A point in this view's coordinate system. If this argument is missing an |
| destinationView | Titanium.UI.View | View that specifies the destination coordinate system to convert to. If this argument is not a view, an exception will be raised. |
Inherited from Titanium.Proxy
Fires a synthesized event to any registered listeners.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| event? | Dictionary | A dictionary of keys and values to add to the Titanium.Event object sent to the listeners. |
getViewById
since 6.1.0Inherited from Titanium.UI.View
Returns the matching view of a given view ID.
| Parameters | Type | Description |
|---|---|---|
| id | String | The ID of the view that should be returned. Use the |
Inherited from Titanium.UI.View
Hides this view.
| Parameters | Type | Description |
|---|---|---|
| options? | AnimatedOptions | Animation options for Android only. Since SDK 5.1.0 and used only on Android 5.0+ Determines whether to enable a circular reveal animation.
Note that the default here is equivalent to passing in |
Inherited from Titanium.UI.Window
Hides the navigation bar.
| Parameters | Type | Description |
|---|---|---|
| options? | AnimatedOptions | Options dictionary supporting a single |
hideTabBar
deprecatedInherited from Titanium.UI.Window
Deprecated since 12.7.0, removed in 13.0.0
Deprecated in favor of <Titanium.UI.Window.tabBarHidden> property.
Hides the tab bar. Must be called before opening the window.
hideToolbar
since iPhone 5.4.0, iPad 5.4.0, macOS 9.2.0Inherited from Titanium.UI.Window
Makes the bottom toolbar invisible.
| Parameters | Type | Description |
|---|---|---|
| options? | AnimatedOptions | Options dictionary supporting a single |
insertAt
since 3.3.0Inherited from Titanium.UI.View
Inserts a view at the specified position in the children array.
| Parameters | Type | Description |
|---|---|---|
| params | ViewPositionOptions | Pass an object that specifies the view to insert and optionally at which position (defaults to end) 2 fields
|
Inherited from Titanium.UI.Window
Opens the window.
| Parameters | Type | Description |
|---|---|---|
| params? | openWindowParams | Animation or display properties to use when opening the window. |
Starting in SDK 10.0.0, this method returns a Promise that will be resolved once the window is opened,
akin to adding a one-time listener for the open event. If the window fails to open (for example, because
it is already opened or opening) the Promise will be rejected.
Inherited from Titanium.UI.View
Removes a child view from this view's hierarchy.
| Parameters | Type | Description |
|---|---|---|
| view | Titanium.UI.View | View to remove from this view's hierarchy. |
Inherited from Titanium.Proxy
Removes the specified callback as an event listener for the named event.
| Parameters | Type | Description |
|---|---|---|
| name | String | Name of the event. |
| callback | Callback<Titanium.Event> | Callback function to remove. Must be the same function passed to 4 fields
|
replaceAt
since 3.3.0Inherited from Titanium.UI.View
Replaces a view at the specified position in the children array.
| Parameters | Type | Description |
|---|---|---|
| params | ViewPositionOptions | Pass an object with the view to insert and the position of the view to replace. In this case the 2 fields
|
Sets the value of the masterIsOverlayed property.
| Parameters | Type | Description |
|---|---|---|
| masterIsOverlayed | Boolean | Determines whether to show the master view is overlayed in portrait orientation. |
| options? | AnimatedOptions | Determines whether the scrollable region reposition should be animated. On iOS, use the optional property
Note that the default here is equivalent to passing in |
Sets the value of the showMasterInPortrait property.
| Parameters | Type | Description |
|---|---|---|
| showMasterInPortrait | Boolean | Determines whether to show the master view in portrait orientation. |
| options? | AnimatedOptions | Determines whether the scrollable region reposition should be animated. On iOS, use the optional property
Note that the default here is equivalent to passing in |
Inherited from Titanium.UI.View
Makes this view visible.
| Parameters | Type | Description |
|---|---|---|
| options? | AnimatedOptions | Animation options for Android only. Since SDK 5.1.0 and only used on Android 5.0+ Determines whether to enable a circular reveal animation.
Note that the default here is equivalent to passing in |
Inherited from Titanium.UI.Window
Makes the navigation bar visible.
| Parameters | Type | Description |
|---|---|---|
| options? | AnimatedOptions | Options dictionary supporting a single |
showTabBar
deprecatedInherited from Titanium.UI.Window
Deprecated since 12.7.0, removed in 13.0.0
Deprecated in favor of <Titanium.UI.Window.tabBarHidden> property.
Shows the tab bar. Must be called before opening the window.
showToolbar
since iPhone 5.4.0, iPad 5.4.0, macOS 9.2.0Inherited from Titanium.UI.Window
Makes the bottom toolbar visible.
| Parameters | Type | Description |
|---|---|---|
| options? | AnimatedOptions | Options dictionary supporting a single |
Inherited from Titanium.UI.View
Returns an image of the rendered view, as a Blob.
| Parameters | Type | Description |
|---|---|---|
| callback? | Callback<Titanium.Blob> | Function to be invoked upon completion. If non-null, this method will be performed asynchronously. If null, it will be performed immediately. |
| honorScaleFactor? | Boolean | Determines whether the image is scaled based on scale factor of main screen. (iOS only) When set to true, image is scale factor is honored. When set to false, the image in the blob has the same dimensions for retina and non-retina devices. |
Events 19
Inherited from Titanium.UI.Window
Fired when the window loses focus.
Inherited from Titanium.UI.View
Fired when the device detects a click against the view.
| Event properties | Type | Description |
|---|---|---|
| x | Number | X coordinate of the event from the |
| y | Number | Y coordinate of the event from the |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |
Inherited from Titanium.UI.Window
Fired when the window is closed.
Inherited from Titanium.UI.View
Fired when the device detects a double click against the view.
| Event properties | Type | Description |
|---|---|---|
| x | Number | X coordinate of the event from the |
| y | Number | Y coordinate of the event from the |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |
Inherited from Titanium.UI.View
Fired when the device detects a double tap against the view.
| Event properties | Type | Description |
|---|---|---|
| x | Number | X coordinate of the event from the |
| y | Number | Y coordinate of the event from the |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |
Inherited from Titanium.UI.Window
Fired when the window gains focus.
keypressed
since Android 3.1.0, iPhone 5.4.0, iPad 5.4.0, macOS 9.2.0Inherited from Titanium.UI.View
Fired when a hardware key is pressed in the view.
| Event properties | Type | Description |
|---|---|---|
| keyCode | Number | The code for the physical key that was pressed. For more details, see KeyEvent. This API is experimental and subject to change. |
Inherited from Titanium.UI.View
Fired when the device detects a long press.
| Event properties | Type | Description |
|---|---|---|
| x | Number | X coordinate of the event from the |
| y | Number | Y coordinate of the event from the |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |
Inherited from Titanium.UI.Window
Fired when the window is opened.
pinch
since 1.8.0Inherited from Titanium.UI.View
Fired when the device detects a pinch gesture.
| Event properties | Type | Description |
|---|---|---|
| scale | Number | The scale factor relative to the points of the two touches in screen coordinates. |
| velocity | Number | The velocity of the pinch in scale factor per second. |
| time | Number | The event time of the current event being processed. |
| timeDelta | Number | The time difference in milliseconds between the previous accepted scaling event and the current scaling event. |
| currentSpan | Number | The average distance between each of the pointers forming the gesture in progress through the focal point. |
| currentSpanX | Number | The average X distance between each of the pointers forming the gesture in progress through the focal point. |
| currentSpanY | Number | The average Y distance between each of the pointers forming the gesture in progress through the focal point. |
| previousSpan | Number | The previous average distance between each of the pointers forming the gesture in progress through the focal point. |
| previousSpanX | Number | The previous average X distance between each of the pointers forming the gesture in progress through the focal point. |
| previousSpanY | Number | The previous average Y distance between each of the pointers forming the gesture in progress through the focal point. |
| focusX | Number | The X coordinate of the current gesture's focal point. |
| focusY | Number | The Y coordinate of the current gesture's focal point. |
| inProgress | Boolean | Returns |
postlayout
since 2.0.0Inherited from Titanium.UI.View
Fired when a layout cycle is finished.
rotate
since 12.7.0Inherited from Titanium.UI.View
Fired when the device detects a two finger rotation.
| Event properties | Type | Description |
|---|---|---|
| rotate | Number | Rotation in degrees. |
Inherited from Titanium.UI.View
Fired when the device detects a single tap against the view.
| Event properties | Type | Description |
|---|---|---|
| x | Number | X coordinate of the event from the |
| y | Number | Y coordinate of the event from the |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |
Inherited from Titanium.UI.View
Fired when the device detects a swipe gesture against the view.
| Event properties | Type | Description |
|---|---|---|
| direction | String | Direction of the swipe--either 'left', 'right', 'up', or 'down'. |
| x | Number | X coordinate of the event's endpoint from the |
| y | Number | Y coordinate of the event's endpoint from the |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |
Inherited from Titanium.UI.View
Fired when a touch event is interrupted by the device.
| Event properties | Type | Description |
|---|---|---|
| x | Number | X coordinate of the event from the |
| y | Number | Y coordinate of the event from the |
| force | Number | The current force value of the touch event. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. |
| size | Number | The current size of the touch area. Note: This property is only available on some Android devices. |
| maximumPossibleForce | Number | Maximum possible value of the force property. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. |
| altitudeAngle | Number | A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. |
| timestamp | Number | The time (in seconds) when the touch was used in correlation with the system start up. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. |
| azimuthUnitVectorInViewX | Number | The x value of the unit vector that points in the direction of the azimuth of the stylus. Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. |
| azimuthUnitVectorInViewY | Number | The y value of the unit vector that points in the direction of the azimuth of the stylus. Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |
Inherited from Titanium.UI.View
Fired when a touch event is completed.
| Event properties | Type | Description |
|---|---|---|
| x | Number | X coordinate of the event from the |
| y | Number | Y coordinate of the event from the |
| force | Number | The current force value of the touch event. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. |
| size | Number | The current size of the touch area. Note: This property is only available on some Android devices. |
| maximumPossibleForce | Number | Maximum possible value of the force property. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. |
| altitudeAngle | Number | A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. |
| timestamp | Number | The time (in seconds) when the touch was used in correlation with the system start up. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. |
| azimuthUnitVectorInViewX | Number | The x value of the unit vector that points in the direction of the azimuth of the stylus. Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. |
| azimuthUnitVectorInViewY | Number | The y value of the unit vector that points in the direction of the azimuth of the stylus. Note: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later. |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |
Inherited from Titanium.UI.View
Fired as soon as the device detects movement of a touch.
| Event properties | Type | Description |
|---|---|---|
| x | Number | X coordinate of the event from the |
| y | Number | Y coordinate of the event from the |
| force | Number | The current force value of the touch event. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. |
| size | Number | The current size of the touch area. Note: This property is only available on some Android devices. |
| maximumPossibleForce | Number | Maximum possible value of the force property. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. |
| altitudeAngle | Number | A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. |
| timestamp | Number | The time (in seconds) when the touch was used in correlation with the system start up. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. |
| azimuthUnitVectorInViewX | Number | The x value of the unit vector that points in the direction of the azimuth of the stylus. Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. |
| azimuthUnitVectorInViewY | Number | The y value of the unit vector that points in the direction of the azimuth of the stylus. Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |
Inherited from Titanium.UI.View
Fired as soon as the device detects a touch gesture.
| Event properties | Type | Description |
|---|---|---|
| x | Number | X coordinate of the event from the |
| y | Number | Y coordinate of the event from the |
| force | Number | The current force value of the touch event. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices. |
| size | Number | The current size of the touch area. Note: This property is only available on some Android devices. |
| maximumPossibleForce | Number | Maximum possible value of the force property. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. |
| altitudeAngle | Number | A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is being used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0. Note: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later. |
| timestamp | Number | The time (in seconds) when the touch was used in correlation with the system start up. Note: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later. |
| azimuthUnitVectorInViewX | Number | The x value of the unit vector that points in the direction of the azimuth of the stylus. Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. |
| azimuthUnitVectorInViewY | Number | The y value of the unit vector that points in the direction of the azimuth of the stylus. Note: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later. |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |
twofingertap
since 3.0.0Inherited from Titanium.UI.View
Fired when the device detects a two-finger tap against the view.
| Event properties | Type | Description |
|---|---|---|
| x | Number | X coordinate of the event from the |
| y | Number | Y coordinate of the event from the |
| obscured | Boolean | Returns This is a security feature to protect an app from "tapjacking", where a malicious app can use a system overlay to intercept touch events in your app or to trick the end-user to tap on UI in your app intended for the overlay. |