With iOS, how to check if URL is empty
Hmm, try
if ([URL isEqualToString:@"The URL?"]) {
if (URL == [NSNull null]) {
//...
} else {
//...
}
Or
if (URL == nil) {
//...
} else {
//...
}
Or Check with length of URL
If the URL object is a string, you can use either,
if([string length] == 0) { //empty }
or
if([string isEqualToString:@""]) { // empty }
If the URL object is an NSURL, you can use:
if([[url absoluteString] isEqualToString:@""]) { //empty }