Titanium.UI.iPad.Popover
> Titanium.UI.iPad.Popover

A Popover is used to manage the presentation of content in a popover.

A popover is created using the Titanium.UI.iPad.createPopover method or <Popover> Alloy element.

Popovers are used to present information temporarily, but in a way that does not take over the entire screen in the way that a modal view does. The popover content is layered on top of the existing content in a special type of window. The popover remains visible until the user taps outside of the popover window or it is explicitly dismissed.

Do not add top-level view containers, such as a SplitWindow or TabGroup, to a popover. Adding top-level view containers may have unintended side effects. See the contentView property for more information.

Examples

Simple Popover with a Title and Right Button

In this example, we create a simple popover and position it near the button.

var win = Ti.UI.createWindow({backgroundColor: 'white'});

var button = Ti.UI.createButton({title: 'Open Popover!'});
button.addEventListener('click', function(e){
    popover.show({ view: button });
})
win.add(button);

var rightButton = Ti.UI.createButton({title: 'Robin'});
rightButton.addEventListener('click', function(e){
    alert("But green's the color of spring.");
});

var contentWindow = Ti.UI.createWindow({
    rightNavButton: rightButton,
    title: 'Kermit'
});
contentWindow.add(Ti.UI.createLabel({text: "It's not easy being green."}));

var popover = Ti.UI.iPad.createPopover({
    backgroundColor: 'green',
    contentView: Ti.UI.iOS.createNavigationWindow({
        width: 250,
        height: 100,
        window: contentWindow
    })
});

win.open();

Alloy XML Markup

Previous example as an Alloy project.

app/views/index.xml:

<Alloy>
    <Window>
        <Button id="button" onClick="openPopover">Open Popover!</Button>
    </Window>
</Alloy>

app/controllers/index.js:

function openPopover() {
    var popover = Alloy.createController('popover').getView();
    popover.show({view:$.button});
};

$.index.open();

app/views/popover.xml:

<Alloy>
    <Popover backgroundColor='green'>
        <ContentView>
            <NavigationWindow height='100' width='250'>
                <Window title='Kermit'>
                    <RightNavButton onClick="showAlert" title="Robin" />
                    <Label>It's not easy being green.</Label>
                </Window>
            </NavigationWindow>
        </ContentView>
    </Popover>
</Alloy>

app/controllers/popover.js:

function showAlert(e) {
    alert('But green is the color of spring.');
};

// Prior to Alloy 1.1.0, the rightNavButton property was set in the controller.
// var button = Ti.UI.createButton({title: 'Robin'});
// button.addEventListener('click', showAlert);
// $.popover.rightNavButton = button;
  • 1.2
Defined By

Properties

apiName : Stringreadonly

The name of the API that this proxy corresponds to.

The name of the API that this proxy corresponds to.

The value of this property is the fully qualified name of the API. For example, Button returns Ti.UI.Button.

  • 3.2.0
  • 3.2.0
  • 3.2.0
Titanium.UI.iPad.Popover
arrowDirection : Number

Indicates the arrow direction of the popover.

Indicates the arrow direction of the popover.

Use this property to indicate the popover arrows to use. You can bitwise-OR the constant values together.

Do not set this property to Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_UNKNOWN.

This API can be assigned the following constants:

Titanium.UI.iPad.Popover
: StringCreation-Only
Sets the background color of the popover. ...

Sets the background color of the popover.

It is recommended to set this property to colorize the whole popover instead of only its content view.

Default: undefined (behaves as transparent)

  • 5.2.0

Overrides: Titanium.UI.View.backgroundColor

Disabled background color of the view, as a color name or hex triplet. ...

Disabled background color of the view, as a color name or hex triplet.

For information about color values, see the "Colors" section of Titanium.UI.

Default: Same as the normal background color of this view.

  • 0.9
Disabled background image for the view, specified as a local file path or URL. ...

Disabled background image for the view, specified as a local file path or URL.

Default: If `backgroundDisabledImage` is undefined, and the normal background image `backgroundImage` is set, the normal image is used when this view is disabled.

  • 0.9
Focused background color of the view, as a color name or hex triplet. ...

Focused background color of the view, as a color name or hex triplet.

For information about color values, see the "Colors" section of Titanium.UI.

For normal views, the focused color is only used if focusable is true.

Default: Same as the normal background color of this view.

  • 0.9
Focused background image for the view, specified as a local file path or URL. ...

Focused background image for the view, specified as a local file path or URL.

For normal views, the focused background is only used if focusable is true.

Default: If `backgroundFocusedImage` is undefined, and the normal background image `backgroundImage` is set, the normal image is used when this view is focused.

  • 0.9
Selected background color of the view, as a color name or hex triplet. ...

Selected background color of the view, as a color name or hex triplet.

For information about color values, see the "Colors" section of Titanium.UI.

focusable must be true for normal views.

Default: Background color of this view.

  • 0.9
Selected background image url for the view, specified as a local file path or URL. ...

Selected background image url for the view, specified as a local file path or URL.

For normal views, the selected background is only used if focusable is true.

Default: If `backgroundSelectedImage` is undefined, and the normal background image `backgroundImage` is set, the normal image is used when this view is selected.

  • 0.9
Indicates if the proxy will bubble an event to its parent. ...

Indicates if the proxy will bubble an event to its parent.

Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.

Default: true

  • 3.0.0
  • 3.0.0
  • 3.0.0
Titanium.UI.iPad.Popover
: Titanium.UI.View
View to use for the popover content. ...

View to use for the popover content. Must be set before calling the show() method.

Set this property to any Titanium.UI.View object, including a Titanium.UI.Window or Titanium.UI.iOS.NavigationWindow object.

This property does not support the Titanium.UI.iPad.SplitWindow or Titanium.UI.TabGroup objects.

When this property is set to a valid object, the popover does not include the navigation controller unless it is set to a Titanium.UI.iOS.NavigationWindow object.

In an Alloy application, you can specify this property as a <ContentView> child element of the <Popover> element:

<Alloy>
    <Popover>
        <ContentView>
            <Window title="Popover">
                <Label>Popover!</Label>
            </Window>
        </ContentView>
    </Popover>
</Alloy
  • 3.2.0
Base elevation of the view relative to its parent in pixels. ...

Base elevation of the view relative to its parent in pixels.

Requires: Android 5 and later

The elevation of a view determines the appearance of its shadow. Higher elevations produce larger and softer shadows.

Note: The elevation property only works on Titanium.UI.View objects. Many Android components have a default elevation that cannot be modified. For more information, see Google design guidelines: Elevation and shadows.

  • 5.0.0
Whether view should be focusable while navigating with the trackball. ...

Whether view should be focusable while navigating with the trackball.

Default: false

  • 0.9
Titanium.UI.iPad.Popover
: Number/Stringdeprecated
Height of the popover. ...

Height of the popover.

deprecated since 3.4.2

This property is deprecated. Set the height on the contentView property instead.

Defaults to: If undefined, defaults to either Titanium.UI.FILL or Titanium.UI.SIZE depending on the view. See "View Types and Default Layout Behavior" in Transitioning to the New UI Layout System.

Can be either a float value or a dimension string (for example, '50%' or '40dp'). Can also be one of the following special values:

  • Titanium.UI.SIZE. The view should size itself to fit its contents.
  • Titanium.UI.FILL. The view should size itself to fill its parent.
  • 'auto'. Represents the default sizing behavior for a given type of view. The use of 'auto' is deprecated, and should be replaced with the SIZE or FILL constants if it is necessary to set the view's behavior explicitly.

This is an input property for specifying the view's height dimension. To determine the view's size once rendered, use the rect or size properties.

This API can be assigned the following constants:

Overrides: Titanium.UI.View.height

Sets the behavior when hiding an object to release or keep the free space ...

Sets the behavior when hiding an object to release or keep the free space

If setting hiddenBehavior to Titanium.UI.HIDDEN_BEHAVIOR_GONE it will automatically release the space the view occupied. For example: in a vertical layout the views below the object will move up when you hide an object with hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE.

This API can be assigned the following constants:

Default: Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE

  • 6.1.0
Determines whether to keep the device screen on. ...

Determines whether to keep the device screen on.

When true the screen will not power down. Note: enabling this feature will use more power, thereby adversely affecting run time when on battery.

Default: false

  • 0.9
Titanium.UI.iPad.Popover
: Objectdeprecated
Left button in the navigation area of the popover. ...

Left button in the navigation area of the popover.

deprecated since 3.4.2

This property is no longer supported.

Ignored when contentView is set.

In an Alloy application, you can specify this property as a <LeftNavButton> child element of the <Popover> element:

<Alloy>
    <Popover>
        <LeftNavButton>
            <Button onClick='showAlert'>Alert</Button>
        </LeftNavButton>
    </Popover>
</Alloy>

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.

If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.

  • 3.6.0
When on, animate call overrides current animation if applicable. ...

When on, animate call overrides current animation if applicable.

If this property is set to false, the animate call is ignored if the view is currently being animated.

Default: undefined but behaves as false

  • 3.3.0
Titanium.UI.iPad.Popover
passthroughViews : Titanium.UI.View[]

Passthrough views to use when the popover is shown.

Passthrough views to use when the popover is shown.

Specify view objects that the user can interact with while the popover is open. While interacting with these view, the popover will not be dismissed.

The preview context used in the 3D-Touch feature "Peek and Pop". ...

The preview context used in the 3D-Touch feature "Peek and Pop".

Requires: iOS 9.0 and later

Preview context to present the "Peek and Pop" of a view. Use an configured instance of Titanium.UI.iOS.PreviewContext here.

Note: This property can only be used on devices running iOS9 or later and supporting 3D-Touch. It is ignored on older devices and can manually be checked using Titanium.UI.iOS.forceTouchSupported.

  • 5.1.0
Titanium.UI.iPad.Popover
: Objectdeprecated
Right button in the navigation area of the popover. ...

Right button in the navigation area of the popover.

deprecated since 3.4.2

This property is no longer supported.

Ignored when contentView is set.

In an Alloy application, you can specify this property as a <RightNavButton> child element of the <Popover> element:

<Alloy>
    <Popover>
        <RightNavButton>
            <Button onClick='showAlert'>Alert</Button>
        </RightNavButton>
    </Popover>
</Alloy>

Clockwise 2D rotation of the view in degrees.

Clockwise 2D rotation of the view in degrees.

Translation values are applied to the static post layout value.

  • 5.4.0

Clockwise rotation of the view in degrees (x-axis).

Clockwise rotation of the view in degrees (x-axis).

Translation values are applied to the static post layout value.

  • 5.4.0

Clockwise rotation of the view in degrees (y-axis).

Clockwise rotation of the view in degrees (y-axis).

Translation values are applied to the static post layout value.

  • 5.4.0

Scaling of the view in x-axis in pixels.

Scaling of the view in x-axis in pixels.

Translation values are applied to the static post layout value.

  • 5.4.0

Scaling of the view in y-axis in pixels.

Scaling of the view in y-axis in pixels.

Translation values are applied to the static post layout value.

  • 5.4.0
Determines keyboard behavior when this view is focused. ...
Titanium.UI.iPad.Popover
: Stringdeprecated
Title of the navigation area of the popover. ...

Title of the navigation area of the popover.

deprecated since 3.4.2

This property is no longer supported.

Ignored when contentView is set.

A material design visual construct that provides an instantaneous visual confirmation of touch point. ...

A material design visual construct that provides an instantaneous visual confirmation of touch point.

Requires: Android 5.0 and later

This is an opt-in feature available from Android Lollipop. Touch feedback is applied only if the backgroundColor is a solid color.

Default: false

  • 6.1.0
Optional touch feedback ripple color. ...

Optional touch feedback ripple color. This has no effect unless touchFeedback is true.

Requires: Android 5.0 and later

Default: Theme provided color.

  • 6.1.0
A name to identify this view in activity transition. ...

A name to identify this view in activity transition.

Requires: Android 5 and later

Name should be unique in the View hierarchy.

  • 5.0.2

Horizontal location of the view relative to its left position in pixels.

Horizontal location of the view relative to its left position in pixels.

Translation values are applied to the static post layout value.

  • 5.0.0

Vertical location of the view relative to its top position in pixels.

Vertical location of the view relative to its top position in pixels.

Translation values are applied to the static post layout value.

  • 5.0.0
Depth of the view relative to its elevation in pixels. ...

Depth of the view relative to its elevation in pixels.

Requires: Android 5 and later

Translation values are applied to the static post layout value.

  • 5.0.0
Titanium.UI.iPad.Popover
: Number/Stringdeprecated
Width of the popover. ...

Width of the popover.

deprecated since 3.4.2

This property is deprecated. Set the width on the contentView property instead.

Defaults to: If undefined, defaults to either Titanium.UI.FILL or Titanium.UI.SIZE depending on the view. See "View Types and Default Layout Behavior" in Transitioning to the New UI Layout System.

Can be either a float value or a dimension string (for example, '50%' or '40dp'). Can also be one of the following special values:

  • Titanium.UI.SIZE. The view should size itself to fit its contents.
  • Titanium.UI.FILL. The view should size itself to fill its parent.
  • 'auto'. Represents the default sizing behavior for a given type of view. The use of 'auto' is deprecated, and should be replaced with the SIZE or FILL constants if it is necessary to set the view's behavior explicitly.

This is an input property for specifying the view's width dimension. To determine the view's size once rendered, use the rect or size properties.

This API can be assigned the following constants:

Overrides: Titanium.UI.View.width

Defined By

Methods

Titanium.UI.iPad.Popover
( view )removed
Adds a child to the popover. ...

Adds a child to the popover.

This method has been removed since 3.4.2

Use the <Titanium.UI.iPad.Popover.contentView> property to modify the content of the popover.

The child view is added as the last child in this view's hierarchy.

Although all views inherit from Titanium.UI.View, not all views are capable of containing other views. In particular:

  • Some views are not designed to be containers at all.
  • Some views are special-purpose containers that can only contain certain other views.
  • Some views are top-level containers that cannot (or should not) be added to other views.

Non-Container Views

The following views are not intended to act as containers that can hold other views:

Adding children to the these views may be supported on some platforms, but is not guaranteed to work across platforms. Where it is supported, it may not work as expected.

For maximum portability, these views should be treated as if they do not support children. Instead of adding children to these views, applications can positon other views as siblings. For example, instead of adding a button as a child of a WebView, you can add the button to the web view's parent such that it appears on top of the web view.

Special-Purpose Containers

A few view objects act as special-purpose containers--that is, they only manage certain types of children, and many of them support a special means of adding these children, instead of the general add method. These containers include:

  • ButtonBar and TabbedBar are designed to hold their own internally-created buttons, assigned by adding strings to the "labels" array. Views added using the add method are displayed on top of these buttons.

  • Picker. Can only hold PickerRows and PickerColumns, which are added using the add method. Adding other types of views to a Picker is not supported.

  • TableView is a specialized container for TableViewSection and TableViewRow objects. These objects must be added using the properties and methods that TableView provides for adding and removing sectons and rows.

    On some platforms, it is possible to add arbitrary child views to a table view using the add method. However, this is not guaranteed to work on all platforms, and in general, should be avoided.

  • TableViewSection is a specialized container for TableViewRow objects, which are added using the add method. The add method on TableViewSection can only be used to add TableViewRow objects.

  • Toolbar is designed to hold buttons and certain other controls, added to its items array. Views added using the add method are displayed on top of the controls in the items array.

  • The Tab, TabGroup, NavigationWindow and SplitWindow objects are special containers that manage windows. These are discussed in the "Top-Level Containers" section.

Top-Level Containers

There are certain top-level containers that are not intended to be added as the children of other views. These top-level containers include Titanium.UI.Window, Titanium.UI.iPad.SplitWindow, Titanium.UI.iOS.NavigationWindow, and Titanium.UI.TabGroup. Other types of views must be added to a top-level container in order to be displayed on screen.

The special containers Titanium.UI.iOS.NavigationWindow, Titanium.UI.iPad.SplitWindow, Titanium.UI.Tab, and Titanium.UI.TabGroup manage windows. These managed windows may be referred to as children of the container, but they are not added using the add method.

Tab is another kind of special container: it is not itself a top-level container, but can only be used within a TabGroup. You cannot add a Tab to an arbitrary container.

Parameters

Returns

  • void

Overrides: Titanium.UI.View.add

Adds the specified callback as an event listener for the named event. ...

Adds the specified callback as an event listener for the named event.

Parameters

  • name : String

    Name of the event.

  • callback : Callback<Object>

    Callback function to invoke when the event is fired.

Returns

  • void
Applies the properties to the proxy. ...

Applies the properties to the proxy.

Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • props : Dictionary

    A dictionary of properties to apply.

Returns

  • void
Finishes a batch update of the View's layout properties and schedules a layout pass of the view tree. ...

Finishes a batch update of the View's layout properties and schedules a layout pass of the view tree.

deprecated since 3.0.0

Use the <Titanium.Proxy.applyProperties> method to batch-update layout properties.

Since the layout pass scheduled is asynchronous, the rect and size values may not be available immediately after finishLayout is called.

To be notified when the layout pass completes, add a listener for the postlayout event.

  • 2.0.0
  • 2.0.0
  • 2.0.0

Returns

  • void
Fires a synthesized event to any registered listeners. ...

Fires a synthesized event to any registered listeners.

Parameters

  • 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.

Returns

  • void
Gets the value of the apiName property. ...

Gets the value of the apiName property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Returns

  • String
Titanium.UI.iPad.Popover
( ) : Number
Gets the value of the arrowDirection property. ...

Gets the value of the arrowDirection property.

Returns

  • Number
Titanium.UI.iPad.Popover
( ) : String
Gets the value of the backgroundColor property. ...

Gets the value of the backgroundColor property.

  • 5.2.0

Returns

  • String

Overrides: Titanium.UI.View.getBackgroundColor

Gets the value of the backgroundDisabledColor property. ...

Gets the value of the backgroundDisabledColor property.

  • 0.9

Returns

  • String
Gets the value of the backgroundDisabledImage property. ...

Gets the value of the backgroundDisabledImage property.

  • 0.9

Returns

  • String
Gets the value of the backgroundFocusedColor property. ...

Gets the value of the backgroundFocusedColor property.

  • 0.9

Returns

  • String
Gets the value of the backgroundFocusedImage property. ...

Gets the value of the backgroundFocusedImage property.

  • 0.9

Returns

  • String
Gets the value of the backgroundSelectedColor property. ...

Gets the value of the backgroundSelectedColor property.

  • 0.9

Returns

  • String
Gets the value of the backgroundSelectedImage property. ...

Gets the value of the backgroundSelectedImage property.

  • 0.9

Returns

  • String
Gets the value of the bubbleParent property. ...

Gets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Returns

  • Boolean
Titanium.UI.iPad.Popover
( ) : Titanium.UI.View
Gets the value of the contentView property. ...

Gets the value of the contentView property.

  • 3.2.0

Returns

Gets the value of the elevation property. ...

Gets the value of the elevation property.

  • 5.0.0

Returns

  • Number
Gets the value of the focusable property. ...

Gets the value of the focusable property.

  • 0.9

Returns

  • Boolean
Titanium.UI.iPad.Popover
( ) : Number/Stringdeprecated
Gets the value of the height property. ...

Gets the value of the height property.

deprecated since 3.4.2

This property is deprecated. Set the height on the contentView property instead.

Returns

  • Number/String

Overrides: Titanium.UI.View.getHeight

Gets the value of the hiddenBehavior property. ...

Gets the value of the hiddenBehavior property.

  • 6.1.0

Returns

  • Number
Gets the value of the keepScreenOn property. ...

Gets the value of the keepScreenOn property.

  • 0.9

Returns

  • Boolean
Titanium.UI.iPad.Popover
( ) : Objectdeprecated
Gets the value of the leftNavButton property. ...

Gets the value of the leftNavButton property.

deprecated since 3.4.2

This property is no longer supported.

Returns

  • Object
Gets the value of the lifecycleContainer property. ...

Gets the value of the lifecycleContainer property.

  • 3.6.0

Returns

Gets the value of the overrideCurrentAnimation property. ...

Gets the value of the overrideCurrentAnimation property.

  • 3.3.0

Returns

  • Boolean
Titanium.UI.iPad.Popover
( ) : Titanium.UI.View[]
Gets the value of the passthroughViews property. ...

Gets the value of the passthroughViews property.

Returns

Gets the value of the previewContext property. ...

Gets the value of the previewContext property.

  • 5.1.0

Returns

Titanium.UI.iPad.Popover
( ) : Objectdeprecated
Gets the value of the rightNavButton property. ...

Gets the value of the rightNavButton property.

deprecated since 3.4.2

This property is no longer supported.

Returns

  • Object
Gets the value of the rotation property. ...

Gets the value of the rotation property.

  • 5.4.0

Returns

  • Number
Gets the value of the rotationX property. ...

Gets the value of the rotationX property.

  • 5.4.0

Returns

  • Number
Gets the value of the rotationY property. ...

Gets the value of the rotationY property.

  • 5.4.0

Returns

  • Number
Gets the value of the scaleX property. ...

Gets the value of the scaleX property.

  • 5.4.0

Returns

  • Number
Gets the value of the scaleY property. ...

Gets the value of the scaleY property.

  • 5.4.0

Returns

  • Number
Gets the value of the softKeyboardOnFocus property. ...

Gets the value of the softKeyboardOnFocus property.

  • 0.9

Returns

  • Number
Titanium.UI.iPad.Popover
( ) : Stringdeprecated
Gets the value of the title property. ...

Gets the value of the title property.

deprecated since 3.4.2

This property is no longer supported.

Returns

  • String
Gets the value of the touchFeedback property. ...

Gets the value of the touchFeedback property.

  • 6.1.0

Returns

  • Boolean
Gets the value of the touchFeedbackColor property. ...

Gets the value of the touchFeedbackColor property.

  • 6.1.0

Returns

  • String
Gets the value of the transitionName property. ...

Gets the value of the transitionName property.

  • 5.0.2

Returns

  • String
Gets the value of the translationX property. ...

Gets the value of the translationX property.

  • 5.0.0

Returns

  • Number
Gets the value of the translationY property. ...

Gets the value of the translationY property.

  • 5.0.0

Returns

  • Number
Gets the value of the translationZ property. ...

Gets the value of the translationZ property.

  • 5.0.0

Returns

  • Number
Returns the matching view of a given view ID. ...

Returns the matching view of a given view ID.

  • 6.1.0
  • 6.1.0
  • 6.1.0

Parameters

  • id : String

    The ID of the view that should be returned. Use the id property in your views to enable it for indexing in this method.

Returns

Titanium.UI.iPad.Popover
( ) : Number/Stringdeprecated
Gets the value of the width property. ...

Gets the value of the width property.

deprecated since 3.4.2

This property is deprecated. Set the width on the contentView property instead.

Returns

  • Number/String

Overrides: Titanium.UI.View.getWidth

Titanium.UI.iPad.Popover
( options )
Hides the popover. ...

Hides the popover.

Parameters

  • options : PopoverParams

    Display properties to use when hiding the popover.

Returns

  • void

Overrides: Titanium.UI.View.hide

Inserts a view at the specified position in the children array. ...

Inserts a view at the specified position in the children array.

Useful if the layout property is set to horizontal or vertical.

  • 3.3.0
  • 3.3.0
  • 3.3.0

Parameters

  • params : Dictionary

    Pass an object with the following key-value pairs:

    • view (Titanium.UI.View): View to insert
    • position (Number): Position in the children array to insert the view. If omitted, inserts the view to the end of the array.

Returns

  • void
Titanium.UI.iPad.Popover
( view )removed
Removes a child from the popover. ...

Removes a child from the popover.

This method has been removed since 3.4.2

Use the <Titanium.UI.iPad.Popover.contentView> property to modify the content of the popover.

Parameters

Returns

  • void

Overrides: Titanium.UI.View.remove

Removes the specified callback as an event listener for the named event. ...

Removes the specified callback as an event listener for the named event.

Multiple listeners can be registered for the same event, so the callback parameter is used to determine which listener to remove.

When adding a listener, you must save a reference to the callback function in order to remove the listener later:

var listener = function() { Ti.API.info("Event listener called."); }
window.addEventListener('click', listener);

To remove the listener, pass in a reference to the callback function:

window.removeEventListener('click', listener);

Parameters

  • name : String

    Name of the event.

  • callback : Callback<Object>

    Callback function to remove. Must be the same function passed to addEventListener.

Returns

  • void
Replaces a view at the specified position in the children array. ...

Replaces a view at the specified position in the children array.

Useful if the layout property is set to horizontal or vertical.

  • 3.3.0
  • 3.3.0
  • 3.3.0

Parameters

  • params : Dictionary

    Pass an object with the following key-value pairs:

    • view (Titanium.UI.View): View to insert
    • position (Number): Position in the children array of the view elment to replace.

Returns

  • void
Titanium.UI.iPad.Popover
( arrowDirection )
Sets the value of the arrowDirection property. ...

Sets the value of the arrowDirection property.

Parameters

  • arrowDirection : Number

    New value for the property.

Returns

  • void
Titanium.UI.iPad.Popover
( backgroundColor )
Sets the value of the backgroundColor property. ...

Sets the value of the backgroundColor property.

  • 5.2.0

Parameters

  • backgroundColor : String

    New value for the property.

Returns

  • void

Overrides: Titanium.UI.View.setBackgroundColor

Sets the value of the backgroundDisabledColor property. ...

Sets the value of the backgroundDisabledColor property.

  • 0.9

Parameters

  • backgroundDisabledColor : String

    New value for the property.

Returns

  • void
Sets the value of the backgroundDisabledImage property. ...

Sets the value of the backgroundDisabledImage property.

  • 0.9

Parameters

  • backgroundDisabledImage : String

    New value for the property.

Returns

  • void
Sets the value of the backgroundFocusedColor property. ...

Sets the value of the backgroundFocusedColor property.

  • 0.9

Parameters

  • backgroundFocusedColor : String

    New value for the property.

Returns

  • void
Sets the value of the backgroundFocusedImage property. ...

Sets the value of the backgroundFocusedImage property.

  • 0.9

Parameters

  • backgroundFocusedImage : String

    New value for the property.

Returns

  • void
Sets the value of the backgroundSelectedColor property. ...

Sets the value of the backgroundSelectedColor property.

  • 0.9

Parameters

  • backgroundSelectedColor : String

    New value for the property.

Returns

  • void
Sets the value of the backgroundSelectedImage property. ...

Sets the value of the backgroundSelectedImage property.

  • 0.9

Parameters

  • backgroundSelectedImage : String

    New value for the property.

Returns

  • void
Sets the value of the bubbleParent property. ...

Sets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • bubbleParent : Boolean

    New value for the property.

Returns

  • void
Titanium.UI.iPad.Popover
( contentView )
Sets the value of the contentView property. ...

Sets the value of the contentView property.

  • 3.2.0

Parameters

Returns

  • void
Sets the value of the elevation property. ...

Sets the value of the elevation property.

  • 5.0.0

Parameters

  • elevation : Number

    New value for the property.

Returns

  • void
Sets the value of the focusable property. ...

Sets the value of the focusable property.

  • 0.9

Parameters

  • focusable : Boolean

    New value for the property.

Returns

  • void
Titanium.UI.iPad.Popover
( height )deprecated
Sets the value of the height property. ...

Sets the value of the height property.

deprecated since 3.4.2

This property is deprecated. Set the height on the contentView property instead.

Parameters

  • height : Number/String

    New value for the property.

Returns

  • void

Overrides: Titanium.UI.View.setHeight

Sets the value of the hiddenBehavior property. ...

Sets the value of the hiddenBehavior property.

  • 6.1.0

Parameters

  • hiddenBehavior : Number

    New value for the property.

Returns

  • void
Sets the value of the keepScreenOn property. ...

Sets the value of the keepScreenOn property.

  • 0.9

Parameters

  • keepScreenOn : Boolean

    New value for the property.

Returns

  • void
Titanium.UI.iPad.Popover
( leftNavButton )deprecated
Sets the value of the leftNavButton property. ...

Sets the value of the leftNavButton property.

deprecated since 3.4.2

This property is no longer supported.

Parameters

  • leftNavButton : Object

    New value for the property.

Returns

  • void
Sets the value of the lifecycleContainer property. ...

Sets the value of the lifecycleContainer property.

  • 3.6.0

Parameters

Returns

  • void
Sets the value of the overrideCurrentAnimation property. ...

Sets the value of the overrideCurrentAnimation property.

  • 3.3.0

Parameters

  • overrideCurrentAnimation : Boolean

    New value for the property.

Returns

  • void
Titanium.UI.iPad.Popover
( passthroughViews )
Sets the value of the passthroughViews property. ...

Sets the value of the passthroughViews property.

Parameters

Returns

  • void
Sets the value of the previewContext property. ...

Sets the value of the previewContext property.

  • 5.1.0

Parameters

Returns

  • void
Titanium.UI.iPad.Popover
( rightNavButton )deprecated
Sets the value of the rightNavButton property. ...

Sets the value of the rightNavButton property.

deprecated since 3.4.2

This property is no longer supported.

Parameters

  • rightNavButton : Object

    New value for the property.

Returns

  • void
Sets the value of the rotation property. ...

Sets the value of the rotation property.

  • 5.4.0

Parameters

  • rotation : Number

    New value for the property.

Returns

  • void
Sets the value of the rotationX property. ...

Sets the value of the rotationX property.

  • 5.4.0

Parameters

  • rotationX : Number

    New value for the property.

Returns

  • void
Sets the value of the rotationY property. ...

Sets the value of the rotationY property.

  • 5.4.0

Parameters

  • rotationY : Number

    New value for the property.

Returns

  • void
Sets the value of the scaleX property. ...

Sets the value of the scaleX property.

  • 5.4.0

Parameters

  • scaleX : Number

    New value for the property.

Returns

  • void
Sets the value of the scaleY property. ...

Sets the value of the scaleY property.

  • 5.4.0

Parameters

  • scaleY : Number

    New value for the property.

Returns

  • void
Sets the value of the softKeyboardOnFocus property. ...

Sets the value of the softKeyboardOnFocus property.

  • 0.9

Parameters

  • softKeyboardOnFocus : Number

    New value for the property.

Returns

  • void
Titanium.UI.iPad.Popover
( title )deprecated
Sets the value of the title property. ...

Sets the value of the title property.

deprecated since 3.4.2

This property is no longer supported.

Parameters

  • title : String

    New value for the property.

Returns

  • void
Sets the value of the touchFeedback property. ...

Sets the value of the touchFeedback property.

  • 6.1.0

Parameters

  • touchFeedback : Boolean

    New value for the property.

Returns

  • void
Sets the value of the touchFeedbackColor property. ...

Sets the value of the touchFeedbackColor property.

  • 6.1.0

Parameters

  • touchFeedbackColor : String

    New value for the property.

Returns

  • void
Sets the value of the transitionName property. ...

Sets the value of the transitionName property.

  • 5.0.2

Parameters

  • transitionName : String

    New value for the property.

Returns

  • void
Sets the value of the translationX property. ...

Sets the value of the translationX property.

  • 5.0.0

Parameters

  • translationX : Number

    New value for the property.

Returns

  • void
Sets the value of the translationY property. ...

Sets the value of the translationY property.

  • 5.0.0

Parameters

  • translationY : Number

    New value for the property.

Returns

  • void
Sets the value of the translationZ property. ...

Sets the value of the translationZ property.

  • 5.0.0

Parameters

  • translationZ : Number

    New value for the property.

Returns

  • void
Titanium.UI.iPad.Popover
( width )deprecated
Sets the value of the width property. ...

Sets the value of the width property.

deprecated since 3.4.2

This property is deprecated. Set the width on the contentView property instead.

Parameters

  • width : Number/String

    New value for the property.

Returns

  • void

Overrides: Titanium.UI.View.setWidth

Titanium.UI.iPad.Popover
( params )
Displays the popover. ...

Displays the popover.

Parameters

  • params : PopoverParams

    Display properties to use when displaying the popover.

Returns

  • void

Overrides: Titanium.UI.View.show

Starts a batch update of this view's layout properties. ...

Starts a batch update of this view's layout properties.

deprecated since 3.0.0

Use the <Titanium.Proxy.applyProperties> method to batch-update layout properties.

To prevent a layout pass each time a property is modified, call startLayout before changing any properties that may change this view's layout. This initiates a batch update mode where layout changes are deferred.

Call finishLayout to end batch update mode and trigger a layout pass. For example:

view.startLayout();
view.top = 50;
view.left = 50;
view.finishLayout();

Note that any property changes made during the batch update may be deferred until finishLayout is called. This may vary somewhat by platform. For example, changing the text of a label may trigger a layout pass. In iOS, updating the label text is deferred.

See also: updateLayout, finishLayout, postlayout event.

  • 2.0.0
  • 2.0.0
  • 2.0.0

Returns

  • void
( params )deprecated
Performs a batch update of all supplied layout properties and schedules a layout pass after they have been updated. ...

Performs a batch update of all supplied layout properties and schedules a layout pass after they have been updated.

deprecated since 3.0.0

Use the <Titanium.Proxy.applyProperties> method to batch-update layout properties.

This is another way to perform a batch update. The updateLayout method is called with a dictionary of layout properties to perform the batch update. For example:

view.updateLayout({top:50, left:50});

This is equivalent to the following:

view.startLayout();
view.top = 50;
view.left = 50;
view.finishLayout();

See also: startLayout, finishLayout, postlayout event.

  • 2.0.0
  • 2.0.0
  • 2.0.0

Parameters

  • params : Dictionary

    Layout properties to be updated.

Returns

  • void
Defined By

Events

Fired when the view element gains focus. ...

Fired when the view element gains focus.

This event only fires when using the trackball to navigate.

  • 0.9

Properties

  • source : Object

    Source object that fired the event.

    •  
    •  
    •  
  • type : String

    Name of the event fired.

    •  
    •  
    •  
  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
Titanium.UI.iPad.Popover
Fired when the popover is hidden. ...

Fired when the popover is hidden.

Properties

  • source : Object

    Source object that fired the event.

    •  
    •  
    •  
  • type : String

    Name of the event fired.

    •  
    •  
    •  
  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
Fired when a hardware key is pressed in the view. ...

Fired when a hardware key is pressed in the view.

A keypressed event is generated by pressing a hardware key. On Android, this event can only be fired when the property focusable is set to true. On iOS the event is generated only when using Ti.UI.TextArea, Ti.UI.TextField and Ti.UI.SearchBar.

  • 3.1.0

Properties

  • keyCode : Number

    The code for the physical key that was pressed. For more details, see KeyEvent. This API is experimental and subject to change.

  • source : Object

    Source object that fired the event.

    •  
    •  
    •  
  • type : String

    Name of the event fired.

    •  
    •  
    •  
  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •  
Fired when the device detects a long click. ...

Fired when the device detects a long click.

A long click is generated by touching and holding on the touchscreen or holding down the trackball button.

The event occurs before the finger/button is lifted.

A longpress and a longclick can occur together.

As the trackball can fire this event, it is not intended to return the x and y coordinates of the touch, even when it is generated by the touchscreen.

A longclick blocks a click, meaning that a click event will not fire when a longclick listener exists.

  • 0.9

Properties

  • source : Object

    Source object that fired the event.

    •  
    •  
    •  
  • type : String

    Name of the event fired.

    •  
    •  
    •  
  • bubbles : Boolean

    True if the event will try to bubble up if possible.

    •  
    •  
    •  
  • cancelBubble : Boolean

    Set to true to stop the event from bubbling.

    •  
    •  
    •