To Print String in xCode:
I am reading a TextField String from xib. (labelName is the name of Label);
Objective C:
NSString *userId = [[NSString alloc] initWithString:labelName.text];
printf("String is %s", [userId UTF8String]);
[userId release];
Swift:
var userId = labelName.text
print(userId?.utf8)
No comments:
Post a Comment