Question

I Hope some one can help,

I'm am trying to keep the same GUI across platform and I would like to have a back button on the top of the child pages so that a user can return to the previous page on both iOS & android.

I have implemented a method that works on android but the same code crash on iOS, i will post the code later but I am just wondering if any one already has a good example, no point re inventing the wheel and all that.

Thanks everyone

Was it helpful?

Solution

Never mind found the cause, if some one dose have a good example i would love to see it as mine seem like a hack at the moment.

Header view

<Alloy>
<View id="container">
    <View id="back">
        <ImageView id="backImage"/>
    </View>

</View>

Child View

<Alloy>
<Window>
    <View id="mainView">
        <Require src="header" id="header"/>
        <View id="scroller"></View>
        <View id="MsgText">
            <Label id="lblUpcomingEventsMsg" textid="UpcomingEventsMsg" />
            <Label id="lblPleaseSelect" textid="PleaseSelect" />
        </View>
        <View id="TableContainer">
            <TableView id="Eventstable" dataCollection="events" dataFilter="whereFunction" dataTransform="transformFunction">
                <Require src="Eventrow"/>
            </TableView>
        </View>
    </View>
</Window>

header JS

$.back.addEventListener('click', function() {
    if ($.back.enabled) { 
        $.trigger('back'); 
        }

});

$.back.on causes exception in ios works on android

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top