DZNEmptyDataSetSource Protocol Reference

Conforms to NSObject
Declared in UIScrollView+EmptyDataSet.h

Overview

The object that acts as the data source of the empty datasets.

The data source must adopt the DZNEmptyDataSetSource protocol. The data source is not retained. All data source methods are optional.

– titleForEmptyDataSet:

Asks the data source for the title of the dataset. The dataset uses a fixed font style by default, if no attributes are set. If you want a different font style, return a attributed string.

- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView

Parameters

scrollView

A scrollView subclass informing the data source.

Return Value

An attributed string for the dataset title, combining font, text color, text pararaph style, etc.

Discussion

Asks the data source for the title of the dataset. The dataset uses a fixed font style by default, if no attributes are set. If you want a different font style, return a attributed string.

Declared In

UIScrollView+EmptyDataSet.h

– descriptionForEmptyDataSet:

Asks the data source for the description of the dataset. The dataset uses a fixed font style by default, if no attributes are set. If you want a different font style, return a attributed string.

- (NSAttributedString *)descriptionForEmptyDataSet:(UIScrollView *)scrollView

Parameters

scrollView

A scrollView subclass informing the data source.

Return Value

An attributed string for the dataset description text, combining font, text color, text pararaph style, etc.

Discussion

Asks the data source for the description of the dataset. The dataset uses a fixed font style by default, if no attributes are set. If you want a different font style, return a attributed string.

Declared In

UIScrollView+EmptyDataSet.h

– imageForEmptyDataSet:

Asks the data source for the image of the dataset.

- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView

Parameters

scrollView

A scrollView subclass informing the data source.

Return Value

An image for the dataset.

Discussion

Asks the data source for the image of the dataset.

Declared In

UIScrollView+EmptyDataSet.h

– imageTintColorForEmptyDataSet:

Asks the data source for a tint color of the image dataset. Default is nil.

- (UIColor *)imageTintColorForEmptyDataSet:(UIScrollView *)scrollView

Parameters

scrollView

A scrollView subclass object informing the data source.

Return Value

A color to tint the image of the dataset.

Discussion

Asks the data source for a tint color of the image dataset. Default is nil.

Declared In

UIScrollView+EmptyDataSet.h

– imageAnimationForEmptyDataSet:

Asks the data source for the image animation of the dataset.

- (CAAnimation *)imageAnimationForEmptyDataSet:(UIScrollView *)scrollView

Parameters

scrollView

A scrollView subclass object informing the delegate.

Return Value

image animation

Discussion

Asks the data source for the image animation of the dataset.

Declared In

UIScrollView+EmptyDataSet.h

– buttonTitleForEmptyDataSet:forState:

Asks the data source for the title to be used for the specified button state. The dataset uses a fixed font style by default, if no attributes are set. If you want a different font style, return a attributed string.

- (NSAttributedString *)buttonTitleForEmptyDataSet:(UIScrollView *)scrollView forState:(UIControlState)state

Parameters

scrollView

A scrollView subclass object informing the data source.

state

The state that uses the specified title. The possible values are described in UIControlState.

Return Value

An attributed string for the dataset button title, combining font, text color, text pararaph style, etc.

Discussion

Asks the data source for the title to be used for the specified button state. The dataset uses a fixed font style by default, if no attributes are set. If you want a different font style, return a attributed string.

Declared In

UIScrollView+EmptyDataSet.h

– buttonImageForEmptyDataSet:forState:

Asks the data source for the image to be used for the specified button state. This method will override buttonTitleForEmptyDataSet:forState: and present the image only without any text.

- (UIImage *)buttonImageForEmptyDataSet:(UIScrollView *)scrollView forState:(UIControlState)state

Parameters

scrollView

A scrollView subclass object informing the data source.

state

The state that uses the specified title. The possible values are described in UIControlState.

Return Value

An image for the dataset button imageview.

Discussion

Asks the data source for the image to be used for the specified button state. This method will override buttonTitleForEmptyDataSet:forState: and present the image only without any text.

Declared In

UIScrollView+EmptyDataSet.h

– buttonBackgroundImageForEmptyDataSet:forState:

Asks the data source for a background image to be used for the specified button state. There is no default style for this call.

- (UIImage *)buttonBackgroundImageForEmptyDataSet:(UIScrollView *)scrollView forState:(UIControlState)state

Parameters

scrollView

A scrollView subclass informing the data source.

state

The state that uses the specified image. The values are described in UIControlState.

Return Value

An attributed string for the dataset button title, combining font, text color, text pararaph style, etc.

Discussion

Asks the data source for a background image to be used for the specified button state. There is no default style for this call.

Declared In

UIScrollView+EmptyDataSet.h

– backgroundColorForEmptyDataSet:

Asks the data source for the background color of the dataset. Default is clear color.

- (UIColor *)backgroundColorForEmptyDataSet:(UIScrollView *)scrollView

Parameters

scrollView

A scrollView subclass object informing the data source.

Return Value

A color to be applied to the dataset background view.

Discussion

Asks the data source for the background color of the dataset. Default is clear color.

Declared In

UIScrollView+EmptyDataSet.h

– customViewForEmptyDataSet:

Asks the data source for a custom view to be displayed instead of the default views such as labels, imageview and button. Default is nil. Use this method to show an activity view indicator for loading feedback, or for complete custom empty data set. Returning a custom view will ignore -offsetForEmptyDataSet and -spaceHeightForEmptyDataSet configurations.

- (UIView *)customViewForEmptyDataSet:(UIScrollView *)scrollView

Parameters

scrollView

A scrollView subclass object informing the delegate.

Return Value

The custom view.

Discussion

Asks the data source for a custom view to be displayed instead of the default views such as labels, imageview and button. Default is nil. Use this method to show an activity view indicator for loading feedback, or for complete custom empty data set. Returning a custom view will ignore -offsetForEmptyDataSet and -spaceHeightForEmptyDataSet configurations.

Declared In

UIScrollView+EmptyDataSet.h

– offsetForEmptyDataSet:DZNEmptyDataSetDeprecated:

Asks the data source for a offset for vertical and horizontal alignment of the content. Default is CGPointZero.

- (CGPoint)offsetForEmptyDataSet:(UIScrollView *)scrollView DZNEmptyDataSetDeprecated

Parameters

scrollView

A scrollView subclass object informing the delegate.

Return Value

The offset for vertical and horizontal alignment.

Discussion

Asks the data source for a offset for vertical and horizontal alignment of the content. Default is CGPointZero.

Declared In

UIScrollView+EmptyDataSet.h

– spaceHeightForEmptyDataSet:

Asks the data source for a vertical space between elements. Default is 11 pts.

- (CGFloat)spaceHeightForEmptyDataSet:(UIScrollView *)scrollView

Parameters

scrollView

A scrollView subclass object informing the delegate.

Return Value

The space height between elements.

Discussion

Asks the data source for a vertical space between elements. Default is 11 pts.

Declared In

UIScrollView+EmptyDataSet.h