ios - How to get value before and behind decimal point in NSString? -


nsstring *number = @"34.56";

how 34 , 56

nsarray *items = [number componentsseparatedbystring:@"."]; 

so 34 index 0, , 56 index 1

then can make string, float or int