Assume that I have a String like this:
hello world this may have lots of sp:ace or little space
I would like to seperate this
This has worked for me
NSString * str = @"Hi Hello How Are You ?"; NSArray * arr = [str componentsSeparatedByString:@" "]; NSLog(@"Array values are : %@",arr);