nativescript-cli
nativescript-cli copied to clipboard
List View issue when trying to swipe from left and back with animation effect, on the ios
I put a ListView on the page, then I add a itemTap event to open a detail page.
the pages like these:
ListPage:

Detail Page:

Then I got this:

and this (with swipe but not swipe back):

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 inside
Hello @flowforever , please open an issue in https://github.com/NativeScript/cross-platform-modules - this repo is for the CLI tool.