by Ibrahim Ersoy
31. January 2012 00:34
Sorry i was fulfilling my army service a couple of months,so couldnt write a single post!
Last night i was doing some app at Flash Builder 4.6 .And stuck in a point about transitions in an iOS application.
Instead i could have used Add-Delete View plan, i tried another:
navigator.pushView(YourViewNameWithoutExtension);
We have 2 mxml page in our app.
iMediaHomeView and Facebook for example.
FaceBook.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
actionBarVisible="true" color="#FF0000" overlayControls="false" tabBarVisible="true"
title="Facebook">
<fx:Script>
<![CDATA[
function GetBack()
{
navigator.pushView(iMediaHomeView);
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Button x="25" y="734" label="All Sites" color="#000000"/>
<s:Button x="515" y="735" label="Exit" color="#030303"/>
<s:Button x="289" y="734" label="Back" color="#000000" click="GetBack();"/>
</s:View>
iMediaHomeView.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
actionBarVisible="true" color="#FF0000" overlayControls="false" tabBarVisible="true"
title="iMedia">
<fx:Script>
<![CDATA[
function Show_Facebook()
{
navigator.pushView(Facebook);
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Image x="177" y="24" width="128" height="128" scaleMode="stretch" smooth="true"
smoothingQuality="high" source="assets/facebook.png" click="Show_Facebook_();"/>
<s:Button x="515" y="735" label="Exit" color="#030303"/>
</s:View>
Let me show you the output images:
That way i found a way to wander between views.
Hope its useful for you,too.