Objective-C Type Casting
April 7, 2009 § Leave a comment
Type casting refers to assign (“cast”) a variable to a different type of variable. Mark the cast in parentheses before the variable that is used.
float a = 10.00;
b = (int) a;
Float value of a is casted into an integer so it can be saved to the integer variable b.