The iOS framework that grows only as fast as its documentation
NIRecyclableView Class Reference

Overview

A simple implementation of the NIRecyclableView protocol as a UIView.

This class can be used as a base class for building recyclable views if specific reuse identifiers are necessary, e.g. when the same class might have different implementations depending on the reuse identifier.

Assuming functionality is consistent for a given class it is simpler not to have a reuseIdentifier, making the view recycler use the class name as the reuseIdentifier. In this case subclassing this class is overkill.

Inheritance diagram for NIRecyclableView:
<NIRecyclableView> NIPagingScrollViewPage NILauncherPageView NIPageView

Tasks

NSString * reuseIdentifier property
 
(id) - initWithReuseIdentifier:
 
(void) - prepareForReuse
 

Method Documentation

reuseIdentifier

This view's reuse identifier.

@property (nonatomic, copy) NSString* reuseIdentifier;
Discussion

Used by NIViewRecycler to pool this view into a group of similar recycled views.

initWithReuseIdentifier:

Initializes a newly allocated view with the given reuse identifier.

- (id)initWithReuseIdentifier:(NSString *)reuseIdentifier;
Discussion

This is the designated initializer.

Parameters
reuseIdentifierThe identifier that will be used to group this view in the view recycler.

prepareForReuse

Called immediately after the view has been dequeued from the recycled view pool.

- (void)prepareForReuse;