Function

NSPointFromString

Returns a point from a text-based representation.

Declaration

NSPoint NSPointFromString(NSString *aString);

Parameters

aString

A string of the form “{x

, y}”.

Return Value

If aString is of the form “{x

, y}” an NSPoint structure that uses x and y as the x and y coordinates, in that order.

If aString only contains a single number, it is used as the x coordinate. If aString does not contain any numbers, returns an NSPoint object whose x and y coordinates are both 0.

See Also

Managing Points

NSEqualPoints

Returns a Boolean value that indicates whether two points are equal.

NSMakePoint

Creates a new NSPoint from the specified values.

NSStringFromPoint

Returns a string representation of a point.

NSPointFromCGPoint

Returns an NSPoint typecast from a CGPoint.

NSPointToCGPoint

Returns a CGPoint typecast from an NSPoint.