如何将我的 NSInteger 放入我的 NSString stringWithFormat:
我的代码:
-(IBAction)main:(id)sender
{
NSAppleScript *script = [[NSAppleScript alloc] initWithSource:@"return the clipboard"];
NSAppleEventDescriptor *clipboardTXT = [[script executeAndReturnError:nil]stringValue];
NSInteger *length = [clipboardTXT.stringValue length];
NSString *mystring = [NSString stringWithFormat:@"%", length];
[mybutton setTitle:mystring];
}
ps 我试过这个,但它对我不起作用。