如何在Swift中获取应用程序名称?
谷歌搜索给了我这个:
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
Run Code Online (Sandbox Code Playgroud)
我把它改成了斯威夫特; 错误 - 方法不存在:
NSBundle.mainBundle().infoDictionary.objectForKey("CFBundleName")
Run Code Online (Sandbox Code Playgroud) let str = "tHIS is A test"
let swapped_case = "This IS a TEST"
Run Code Online (Sandbox Code Playgroud)
Swift noob在这里,如何以编程方式执行第二个语句?