ISRectF Class Reference

Inherits from NSObject
Declared in ISRectF.h

Overview

Class used to represent a rectangle defined by 4 float values (left, top, right, bottom) (ex: 0.5/0.5/50.0/150.5).

  left

Left value.

@property (nonatomic, readwrite) float left

Declared In

ISRectF.h

  top

Top value.

@property (nonatomic, readwrite) float top

Declared In

ISRectF.h

  right

Right value.

@property (nonatomic, readwrite) float right

Declared In

ISRectF.h

  bottom

Bottom value.

@property (nonatomic, readwrite) float bottom

Declared In

ISRectF.h

  center

Center of the rectangle.

@property (nonatomic, readwrite) CGPoint center

Declared In

ISRectF.h

  topLeft

Top left point.

@property (nonatomic, readonly) CGPoint topLeft

Declared In

ISRectF.h

  topRight

Top right point.

@property (nonatomic, readonly) CGPoint topRight

Declared In

ISRectF.h

  bottomLeft

Bottom left point.

@property (nonatomic, readonly) CGPoint bottomLeft

Declared In

ISRectF.h

  bottomRight

Bottom right point.

@property (nonatomic, readonly) CGPoint bottomRight

Declared In

ISRectF.h

– initWithLeft:andTop:andRight:andBottom:

Main constructor.

- (instancetype)initWithLeft:(float)left andTop:(float)top andRight:(float)right andBottom:(float)bottom

Parameters

left

Left float value (X coordinate).

top

Top float value (Y coordinate).

right

Right float value (X coordinate).

bottom

Bottom float value (Y coordinate).

Declared In

ISRectF.h

– initWithLeft:andTop:andWidth:andHeight:

Constructor.

- (instancetype)initWithLeft:(float)left andTop:(float)top andWidth:(float)width andHeight:(float)height

Parameters

left

Left float value (X coordinate).

top

Top float value (Y coordinate).

width

Rect float width.

height

Rect float height.

Declared In

ISRectF.h

+ ISRectFWithLeft:andTop:andRight:andBottom:

Static main constructor.

+ (instancetype)ISRectFWithLeft:(float)left andTop:(float)top andRight:(float)right andBottom:(float)bottom

Parameters

left

Left float value (X coordinate).

top

Top float value (Y coordinate).

right

Right float value (X coordinate).

bottom

Bottom float value (Y coordinate).

Declared In

ISRectF.h

+ ISRectFWithCGRect:

Static constructor.

+ (instancetype)ISRectFWithCGRect:(CGRect)rect

Parameters

rect

CGRect to use for instantiate the new one.

Declared In

ISRectF.h

– contains:

Method used to know if the ISRectF contains the given point.

- (Boolean)contains:(CGPoint)point

Parameters

point

Point to test.

Return Value

YES if the ISRectF contains the point, otherwise NO.

Declared In

ISRectF.h

– containsWithX:andY:

Method used to know if the ISRectF contains the given coordinates.

- (Boolean)containsWithX:(float)x andY:(float)y

Parameters

x

X coordinate to test.

y

Y coordinate to test.

Return Value

YES if the ISRectF contains the coordinates, otherwise NO.

Declared In

ISRectF.h

– toCGRect

Method used to convert the ISRectF into CGRect.

- (CGRect)toCGRect

Return Value

The related converted CGRect.

Declared In

ISRectF.h

– centerX

Method used to get the center y coordinate.

- (float)centerX

Return Value

The center y coordinate.

Declared In

ISRectF.h

– centerY

Method used to get the center y coordinate.

- (float)centerY

Return Value

The center y coordinate.

Declared In

ISRectF.h

– width

Method used to get ISRectF width.

- (float)width

Return Value

The ISRect width.

Declared In

ISRectF.h

– height

Method used to get ISRectF height.

- (float)height

Return Value

The ISRect height.

Declared In

ISRectF.h