Tag: object-c

Xcode Printing NSData to NSLog

In Xcode Object-C to print out NSData to NSLog you might run into rubbish output by just outputting the NSData NSLog(@”%@”, myData); And as output something like this: <3c3f786d 6c207665 7273696f etc… This is not rubbish, though it might look

Tagged with: , ,

Xcode Object-C NSUrl to NSString

In Object-C to convert back and forth from NSUrl and NSString take a look at this example: NSString *urlstring = [NSString stringWithFormat:@”http://spacetech.dk”]; NSURL *url = [NSURL URLWithString:urlstring]; NSLog(@”url = %@”,url); This will first save a NSString, then create a NSUrl

Tagged with: , ,
Top