Inherits from NSObject
Declared in SEssentialsTab.h
Availability
Related samples

Overview

SEssentialsTab holds information about a single tab within SEssentialsTabbedView.

It contains a header view, which is an instance of the SEssentialsTabHeaderViewProtocol. The header view controls the appearance of the tab in the tabbed view. The default implementation of the header view is SEssentialsTabHeaderView. If you create a tab and just specify its name and icon in the init method, then the default implementation of the header view is used. You can optionally specify your own header view if you require custom appearance or behavior for your tab.

Warning: Since SEssentialsTab does not adopt the NSCopying protocol it cannot be used as a key in an NSDictionary. Therefore if you wish to have a dictionary of { tabs => content } then you should use NSValue with a pointer to the tab as the key: [NSValue valueWithNonretainedObject: tab]

Note: if the tab is released, the NSValue in the dictionary will become a junk pointer.

Tasks

Other Methods

  •   name

    The name is displayed in the tab, its does not need to be unique

    property
  •   icon

    A UIImage displayed in the tab. The icon is scaled to fit and is displayed in the left side of the tab.

    property
  •   parentTabbedView

    A reference to the containing SEssentialsTabbedView, this is required to access style objects this is set automatically when the SEssentialsTab is added to the SEssentialsTabbedView.

    property
  •   tabHeaderView

    The view that represents this SEssentialsTab in the tab bar.

    property
  •   removable

    Setting this property indicates if the tab can be removed

    property
  •   tag

    The tag property is provided as a convenience when using SEssentialsTab references is not appropriate to the application. e.g. in the dataSource implementation.

    property

Initializing an SEssentialsTab

Properties

icon

A UIImage displayed in the tab. The icon is scaled to fit and is displayed in the left side of the tab.

@property (retain, nonatomic) UIImage *icon

Declared In

SEssentialsTab.h

name

The name is displayed in the tab, its does not need to be unique

@property (retain, nonatomic) NSString *name

Declared In

SEssentialsTab.h

parentTabbedView

A reference to the containing SEssentialsTabbedView, this is required to access style objects this is set automatically when the SEssentialsTab is added to the SEssentialsTabbedView.

@property (assign, nonatomic) SEssentialsTabbedView *parentTabbedView

Declared In

SEssentialsTab.h

removable

Setting this property indicates if the tab can be removed

@property (assign, nonatomic) BOOL removable

Declared In

SEssentialsTab.h

tabHeaderView

The view that represents this SEssentialsTab in the tab bar.

@property (retain, nonatomic) UIView<SEssentialsTabHeaderViewProtocol> *tabHeaderView

Declared In

SEssentialsTab.h

tag

The tag property is provided as a convenience when using SEssentialsTab references is not appropriate to the application. e.g. in the dataSource implementation.

@property (assign, nonatomic) NSInteger tag

Declared In

SEssentialsTab.h

Instance Methods

initWithName:icon:

A SEssentialsTab is typically created like this with the default SEssentialsTabHeaderView being used for display.

- (id)initWithName:(NSString *)name icon:(UIImage *)icon

Parameters

name

the name displayed in the tab header

icon

the icon displayed in the tab header

Declared In

SEssentialsTab.h

initWithName:icon:customTabView:

Use this initialization method to assign a custom SEssentialsTabHeaderView class that implements SEssentialsTabbedHeaderViewProtocol.

- (id)initWithName:(NSString *)name icon:(UIImage *)icon customTabView:(UIView<SEssentialsTabHeaderViewProtocol> *)customTabView

Parameters

name

the name displayed in the tab header

icon

the icon displayed in the tab header

customTabView

the class that implements SEssenialsTabHeaderViewProtocol

Declared In

SEssentialsTab.h