在Mountain Lion中设置Safari默认的User Agent
NSString的一些用法
在objective-c中调用terminal命令
概述
You want to use -[NSTask setStandardOutput:] to attach an NSPipe to the task before launching it. A pipe holds two file handles, the task will write to one end of the pipe, and you’ll read from the other. You can schedule the file handle to read all of the data from the background task and notify you when it’s complete.
详细内容
webView中调用JavaScript脚本
NSString *js1 = [NSStringstringWithFormat:@"alert('a'); ""];
[[selfexWebViewer] stringByEvaluatingJavaScriptFromString: js1];
太简单了哇






