Skip to content
UITableView tableHeaderView additions to nativescript listview.
TypeScript JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
.gitignore
.npmignore
README.MD
ScreenShot.png
nativescript-listview-header.d.ts
nativescript-listview-header.ios.ts
package.json
tsconfig.json

README.MD

Nativescript ListView header plugin.

A plugin for adding headerView i.e. tableHeaderView to ListView for iOS.

Installation

tns plugin add nativescript-listview-header

Examples

Include the plugin in your xml

<Page xmlns="http://schemas.nativescript.org/tns.xsd" 
        loaded="pageLoaded" 
        xmlns:tools="nativescript-listview-header">
    <tools:ListViewWithHeader items="{{items}}" loaded="onListViewLoaded" rowHeight="44">
    </tools:ListViewWithHeader>
</Page>

Set your header view in code behind

var searchBarModule = require("ui/search-bar");
exports.onListViewLoaded = function(args) {
    var listView = args.object;
    listView.tableHeaderView = new searchBarModule.SearchBar();
}

Screen shot

You can’t perform that action at this time.