Inherits from NSObject
Conforms to TSNavigationStripDataSource
Declared in TSNavigationStripModel.h

Overview

TSNavigationStripModel is a prototype for TSNavigationStripDataSource.

Properties

customClassForSection

If not set then UIButton class is used. Specify if you want to provide specific draw implementation or additional functionalit for section view.

@property (nonatomic, strong) NSString *customClassForSection

Discussion

Warning: If you provide custom class it should inherit from UIButton. @def nil

Declared In

TSNavigationStripModel.h

leftItems

Menu items located on the left side of TSNavigationStripView.

@property (nonatomic, strong, readonly) NSArray *leftItems

Declared In

TSNavigationStripModel.h

navigationStrip

Instance of TSNavigationStripView which is managed by this data model.

@property (nonatomic, strong, readonly) TSNavigationStripView *navigationStrip

Declared In

TSNavigationStripModel.h

rightItems

Menu items located on the right side of TSNavigationStripView.

@property (nonatomic, strong, readonly) NSArray *rightItems

Declared In

TSNavigationStripModel.h

sections

Navigation sections.

@property (nonatomic, strong, readonly) NSArray *sections

Declared In

TSNavigationStripModel.h

useEdgeInsetsForSections

If YES edge insets are used for section’s content. Need for some UI layouts where graphics from one section should overlap sibling sections. @def NO

@property (nonatomic, assign) BOOL useEdgeInsetsForSections

Declared In

TSNavigationStripModel.h

Instance Methods

initWithNavigationStrip:

Initialize TSNavigationStripModel and provide instance of TSNavigationStripView which would display content of the data model.

- (id)initWithNavigationStrip:(TSNavigationStripView *)navigationStrip

Parameters

navigationStrip

Instance of TSNavigationStripView.

Declared In

TSNavigationStripModel.h

insertNewItem:atIndex:fromLeft:animated:

Insert new menu item at specified position. TSNavigationStripView would be notified about changes in data model.

- (void)insertNewItem:(TSNavigationStripItem *)itemInfo atIndex:(NSInteger)index fromLeft:(BOOL)fromLeft animated:(BOOL)animated

Parameters

itemInfo

Information about new menu item.

index

Insert position.

fromLeft

Specify on which side menu item should be inserted.

animated

If YES item will be appear with animation.

Declared In

TSNavigationStripModel.h

insertNewSection:atIndex:animated:

Insert new section at specified position. TSNavigationStripView would be notified about changes in data model.

- (void)insertNewSection:(TSNavigationStripSection *)sectionInfo atIndex:(NSInteger)index animated:(BOOL)animated

Parameters

sectionInfo

Information about new section.

index

Insert position.

animated

If YES section will be appear with animation.

Declared In

TSNavigationStripModel.h

removeItemAtIndex:fromLeft:animated:

Remove menu item at specified position. TSNavigationStripView would be notified about changes in data model.

- (void)removeItemAtIndex:(NSInteger)index fromLeft:(BOOL)fromLeft animated:(BOOL)animated

Parameters

index

Remove position.

fromLeft

Specify on which side menu item should be removed.

animated

If YES item will be removed with animation.

Declared In

TSNavigationStripModel.h

removeSectionAtIndex:animated:

Remove section at specified position. TSNavigationStripView would be notified about changes in data model.

- (void)removeSectionAtIndex:(NSInteger)index animated:(BOOL)animated

Parameters

index

Remove position.

animated

If YES section will be removed with animation.

Declared In

TSNavigationStripModel.h

setItems:fromLeft:

Set menu items information. TSNavigationStripView would be notified about changes in data model.

- (void)setItems:(NSArray *)items fromLeft:(BOOL)fromLeft

Parameters

items

Array of TSNavigationStripItem objects.

fromLeft

Specify on which side menu items should be updated.

Declared In

TSNavigationStripModel.h

setSections:

Set sections information. TSNavigationStripView would be notified about changes in data model.

- (void)setSections:(NSArray *)sections

Parameters

sections

Array of TSNavigationStripSection objects.

Declared In

TSNavigationStripModel.h