daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError
  2. {
  3.     BOOL readSuccess = NO;
  4.     NSString *fileContents = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
  5.  
  6.     if (!fileContents && outError) {
  7.     *outError = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileReadUnknownError userInfo:nil];
  8.     }
  9.  
  10.     if (fileContents) {
  11.     readSuccess = YES;
  12.  
  13.     [textView setString: fileContents];
  14.     NSLog(@"%@",[textView string]);
  15.     }
  16.     return YES;
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top