iOS TitleWindow Skin

Download: mobiletheme_ios_usage.fxp

I’ve made a minor update to my¬†iOS theme to include a TitleWindow skin that’s styled after the iOS alert dialog (UIAlertView). The updated project also includes a Button skin specifically for use with TitleWindow.

The skin itself implements a closeButton skin part. If controlBarContent is specified for the TitleWindow, the closeButton is removed with the expectation that closing the TitleWindow is handled by some other content/action.

<!-- Use built-in close button -->
<s:TitleWindow id="titleWindow1" title="TitleWindow" close="titleWindow1_closeHandler(event)">
    <s:Label text="Hello World" horizontalCenter="0"/>
<!-- User-provided OK/Cancel button -->
<s:TitleWindow id="titleWindow2" title="TitleWindow OK/Cancel">
    <s:Label text="Hello World" horizontalCenter="0"/>
        <s:Button label="Cancel" width="50%" click="PopUpManager.removePopUp(titleWindow2)"/>
        <s:Button label="OK" emphasized="true" width="50%" click="PopUpManager.removePopUp(titleWindow2)"/>

The mobiletheme_ios_usage.fxp project includes the example shown above as well as the library project “mobiletheme_ios” that you can reuse in your own project. Please note that I’ve made the theme a little more flexible by changing the media queries so that the skins are applied by default regardless of os-platform.

Share on Facebook

One Response to iOS TitleWindow Skin

  1. Mags says:

    Thanks so much for this Jason, really really cool work and much appreciated. FB4.6+AIR3 gold!