TableView

A basic TableView component that can render iOS table view. It renders header, footer and children which can be RowItem components.

TableView component

Example usage:

import { ScrollView, TableView } from 'react-native-ios-kit';
<ScrollView>
<TableView header="Header" footer="footer...">
<RowItem
icon="ios-map-outline"
title="Navigation"
/>
<RowItem
icon="ios-settings"
title="Settings"
/>
</TableView>
<TableView footer="PrivacyPolicy" onFooterPress={() => alert('Hello')}>
<RowItem title="No Icon" />
</TableView>
</ScrollView>

TableView rows

There are few ready for use row components:

Theme

Uses following theme properties:

  • footnoteBackgroundColor - background color of header and footer
  • footnoteColor - text color of header and footer
  • primaryColor - text color of footer if there is onFooterPress prop

Props

children

type: React.ChildrenArray<*>

Children of TableView. Could be RowItem components.

footer (optional)

type: string

Footer text of TableView

footerStyle (optional)

type: Object

Custom footer style.

header (optional)

type: string

Header text of TableView.

headerStyle (optional)

type: Object

Custom styles for header.

onFooterPress (optional)

type: () => void

Invoked on footer press.

theme (optional)

type: Theme

Custom theme for component. By default provided by the ThemeProvider.

withoutHeader (optional)

type: boolean

Indicates whether render empty header or not. If true it won't render header.

withoutFooter (optional)

type: boolean

Whether render empty footer or not. If true it won't render footer.