Declared in UILabel+Initializers.h
UILabel+Initializers.m

Overview

Introduces initializer helpers UILabel.

Class Methods

labelWithFrame:attributedText:font:textColor:textAlignment:

Creates and returns a newly allocated label object with the specified frame rectangle.

+ (instancetype)labelWithFrame:(CGRect)frame attributedText:(NSAttributedString *)attributedText font:(UIFont *)font textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)alignment

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

attributedText

The attributed text.

font

The font set to the font.

textColor

The text color.

alignment

The text alignment of the label.

Return Value

An initialized label object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

labelWithFrame:attributedText:textAlignment:

Creates and returns a newly allocated view object with the specified frame rectangle.

+ (instancetype)labelWithFrame:(CGRect)frame attributedText:(NSAttributedString *)attributedText textAlignment:(NSTextAlignment)alignment

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

attributedText

The attributed text.

alignment

The text alignment of the label.

Return Value

An initialized view object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

labelWithFrame:font:

Creates and returns a newly allocated label object with the specified frame rectangle.

+ (instancetype)labelWithFrame:(CGRect)frame font:(UIFont *)font

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

font

The font set to the font.

Return Value

An initialized label object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

labelWithFrame:font:textColor:

Initializes and returns a newly allocated label object with the specified frame rectangle.

+ (instancetype)labelWithFrame:(CGRect)frame font:(UIFont *)font textColor:(UIColor *)textColor

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

font

The font set to the font.

textColor

The text color.

Return Value

An initialized label object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

labelWithFrame:font:textColor:textAlignment:

Creates and returns a newly allocated view object with the specified frame rectangle.

+ (instancetype)labelWithFrame:(CGRect)frame font:(UIFont *)font textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)alignment

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

font

The font set to the font.

textColor

The text color.

alignment

The text alignment of the label.

Return Value

An initialized view object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

labelWithFrame:text:font:textColor:textAlignment:

Creates and returns a newly allocated label object with the specified frame rectangle.

+ (instancetype)labelWithFrame:(CGRect)frame text:(NSString *)text font:(UIFont *)font textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)alignment

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

text

The text.

font

The font set to the font.

textColor

The text color.

alignment

The text alignment of the label.

Return Value

An initialized label object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

Instance Methods

initWithFrame:attributedText:font:textColor:textAlignment:

Initializes and returns a newly allocated label object with the specified frame rectangle.

- (instancetype)initWithFrame:(CGRect)frame attributedText:(NSAttributedString *)attributedText font:(UIFont *)font textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)alignment

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

attributedText

The attributed text.

font

The font set to the font.

textColor

The text color.

alignment

The text alignment of the label.

Return Value

An initialized label object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

initWithFrame:attributedText:textAlignment:

Creates and returns a newly allocated view object with the specified frame rectangle.

- (instancetype)initWithFrame:(CGRect)frame attributedText:(NSAttributedString *)attributedText textAlignment:(NSTextAlignment)alignment

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

attributedText

The attributed text.

alignment

The text alignment of the label.

Return Value

An initialized view object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

initWithFrame:font:

Initializes and returns a newly allocated label object with the specified frame rectangle.

- (instancetype)initWithFrame:(CGRect)frame font:(UIFont *)font

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

font

The font set to the font.

Return Value

An initialized label object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

initWithFrame:font:textColor:

Initializes and returns a newly allocated label object with the specified frame rectangle.

- (instancetype)initWithFrame:(CGRect)frame font:(UIFont *)font textColor:(UIColor *)textColor

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

font

The font set to the font.

textColor

The text color.

Return Value

An initialized label object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

initWithFrame:font:textColor:textAlignment:

Creates and returns a newly allocated view object with the specified frame rectangle.

- (instancetype)initWithFrame:(CGRect)frame font:(UIFont *)font textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)alignment

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

font

The font set to the font.

textColor

The text color.

alignment

The text alignment of the label.

Return Value

An initialized view object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h

initWithFrame:text:font:textColor:textAlignment:

Initializes and returns a newly allocated label object with the specified frame rectangle.

- (instancetype)initWithFrame:(CGRect)frame text:(NSString *)text font:(UIFont *)font textColor:(UIColor *)textColor textAlignment:(NSTextAlignment)alignment

Parameters

frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it. This method uses the frame rectangle to set the center and bounds properties accordingly.

text

The text.

font

The font set to the font.

textColor

The text color.

alignment

The text alignment of the label.

Return Value

An initialized label object or nil if the object couldn’t be created.

Declared In

UILabel+Initializers.h