Developers Group Magazine February/March 2011 Page
TTIWiPhoneList
The TTIWiPhoneList is a list control in the iPhone style (in standard list mode and settings mode), where each item
can have an image, a value, a main caption and a subtext (notes). We can asynchronously insert or delete items from
the list, and respond to click events in a synchronous and asynchronous way using OnItemClick, OnImageClick as
well as OnAsyncItemClick and OnAsyncImageClick. Apart from these click events, there are also
OnAsyncLoadExtraItems, OnAsyncExtraItemsLoaded, and OnRenderListItem events.
The individual items of type TiPhonelistItem have Caption, Data (TStringList), Detail, Image, Name, Notes, Section
and Value properties. The events are triggered at the parent side, passing the ItemIndex of the item or image that was
clicked.
The detail information for the items can be shown using the TIWiPhonePageFlip component.
TTIWiPhoneLocationLabel
The TTIWiPhoneLocationLabel is a special label control that will turn into a “hot” hyperlink if we assign values to the
predefined Location (Latitude and Longitude) and optionally Destination. When you click on it during runtime, the
iPhone maps application will be started, showing your current location and optionally the destination.
TTIWiPhoneMenu
The TTIWiPhoneMenu is a special footer control that can contain a collection of menu items with images and text,
plus the iPhone style status indicators. We can update the status of the menu items, and respond to a user click, both
synchronous and asynchronous.
The Items property of the TIWiPhoneMenu control holds the TiPhoneMenuItems which each contain properties for
Caption, Image, IndicatorCaption, IndicatorVisible, Name, and SelectedImage.
The individual items do not have a click event of their own, but the parent TTIWiPhoneMenu has the OnItemClick or
OnAsyncItemClick events, passing the ItemIndex of the button that was clicked (starting to count at 0).
TTIWiPhoneOnOffButton
The TTIWiPhoneOnOffButton is a special iPhone style button with an “On” mode and an “Off” mode, that can be
displayed in three styles: normal, system and custom. We can use the asynchronous events to update the button and
to respond to the click events. Using the OffCaption and OnCaption you can translate the Off and On captions on this
button.
The actual state of the TTIWiPhoneOnOffButton can be retrieved or set using the ButtonState property, which can be
bsOff or bsOn.
TTIWiPhonePageFlip
The TTIWiPhonePageFlip is a control that can be used to flip between TIWiPhoneRegion controls, featuring
asynchronous updates. Ideal in combination with the TIWiPhoneList component to provide details for a list item.
The TTIWiPhonePageFlip has a FrontRegion and a BackRegion property. Both can be assigned to a
TWIWiPhoneRegion control. Switching between the front region and the back region can be done using the
SlideToFront and SlideToBack methods of the TTIWiPhonePageFlip, or by assigning arFront or arBack to the
ActiveRegion property.
The transition can be controlled using AnimationSpeed and AnimationType (which can be set to atDrop, atFlip,
atSlide, atSwing or atTurn).
TTIWiPhonePhoneLabel
This is a special label control that will turn into a “hot” hyperlink if we assign a value to the TelephoneNumber
property. When you click on it during runtime, the iPhone will make a call to the specified number.
TTIWiPhoneRegion
A region component that we can use to place IntraWeb and TMS iPhone controls, which automatically shows itself at
the correct iPhone, iPod and iPad screen sizes.
The TTIWiPhoneRegion has properties for AutoClientAlignAtRuntime, ClipRegion, Device (which can be set to
iPhone or iPad), DevizeOrientation (oVertical or oHorizontal, although the iPhone and iPad will automatically cause
the orientation to switch),