nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

List View issue when trying to swipe from left and back with animation effect, on the ios

Open flowforever opened this issue 11 years ago • 1 comments

I put a ListView on the page, then I add a itemTap event to open a detail page. the pages like these: ListPage: 2015-03-22 7 28 41

Detail Page: 2015-03-22 7 35 23

Then I got this:

2015-03-22 7 44 38

and this (with swipe but not swipe back):

2015-03-22 7 47 30

The following are my code: the ListView xml:

<Page xmlns="http://www.nativescript.org/tns.xsd" loaded="pageLoaded">
    <StackLayout>
        <ListView items="{{ listItems }}" itemTap="listViewItemTap">
            <ListView.itemTemplate>
                <Label text="{{ text }}" cssClass="listItem-text" />
            </ListView.itemTemplate>
        </ListView>
    </StackLayout>
</Page>

the ListView viewModel js:

var vmModule = require("./main-page.model");


// Event handler for Page "loaded" event attached in main-page.xml
function pageLoaded(args) {
    var page = args.object;
    page.bindingContext = vmModule.mainViewModel;
}
function listViewItemTap(args){
    var frameModule = require("ui/frame");
    var topmost = frameModule.topmost();
    var navigationEntry = {
        moduleName: "app/detail-page",
        context: {info: "something you want to pass to your page"},
        animated: true
    };
    topmost.navigate(navigationEntry);
}

exports.pageLoaded = pageLoaded;
exports.listViewItemTap = listViewItemTap;

The Detail page js file is empty, and the xml file only has a

flowforever avatar Mar 22 '15 11:03 flowforever

Hello @flowforever , please open an issue in https://github.com/NativeScript/cross-platform-modules - this repo is for the CLI tool.

teobugslayer avatar Mar 23 '15 09:03 teobugslayer