Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove empty space from NSString in iPhone

i am getting one url from the server http: / /www.google.com, however due to space in between them it is not opening, please let me know how to remove the space in between them, so that it should open in safari.

like image 511
user748001 Avatar asked Jun 13 '26 12:06

user748001


1 Answers

To remove empty space:

str = [str stringByReplacingOccurrencesOfString:@" " withString:@""];

Use following to detect site or phone number in text view.

textview.dataDetectorTypes = UIDataDetectorTypeAll;
like image 107
iMOBDEV Avatar answered Jun 15 '26 03:06

iMOBDEV



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!