Created
March 16, 2012 22:20
-
-
Save frr149/2053242 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSError *err = nil; | |
NSURL *aURL = [NSURL URLWithString:@"http://www.google.com"]; | |
NSString *contents = [NSString stringWithContentsOfURL:aURL | |
encoding:NSUTF8StringEncoding | |
error:&err]; | |
// Esto sí que es correcto: inspeccionar el valor del retorno | |
if (!contents) { | |
// Seguro que ha habido un error | |
NSLog(@"Ahora sí que se ha producido un error:%@", err.localizedDescription); | |
} | |
objecti |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment