摘要: 什么是GCD Grand Central Dispatch (GCD)是Apple开发的一个多核编程的解决方法。该方法在Mac OS X 10.6雪豹中首次推出,并随后被引入到了iOS4.0中。GCD是一个替代诸如NSThread, NSOperationQueue, NSInvocationOperation等技术的很高效和强大的技术,它看起来象就其它语言的闭包(Closure)一样(在Swi...阅读全文
摘要: 目前Apple推荐的场景转换的方法有以下几个: 一般的跳转方法: presentViewController Discussion In a horizontally compact environment, the presented view is always full screen. In a horizontally regular environment, the presen...阅读全文
摘要: extension String { var length: Int { return countElements(self) } // Swift 1.1 } extension String { var length: Int { return count(self) } // Swift 1.2 } ...阅读全文
摘要: Here's How: To capture the entire desktop, press Command-Shift-3. The screen shot will be automatically saved as a PNG file on your desktop. To copy the entire desktop, press Command-Control-Shi...阅读全文
摘要: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber length]: unrecognized selector sent to instance 网上参考的他人案例,与我的情况一模一样,所以直接盗用他的图和文章了。 http://...阅读全文