1. @property中的 @synthesize 和 @dynamic 區(qū)別:
@synthesize will generate getter and setter methods for your property.
@synthesize 能夠為你的屬性自動生成getter和setter方法。
@dynamic just tells the compiler that the getter and setter methods are implemented not by the class itself but somewhere else(like the superclass)
@dynamic 會告訴編譯器:getter和setter方法在別處生成了(比如父類中),并沒有在本類生成。
Uses for @dynamic are e.g. with subclasses of NSManagedObject(CoreData) or when you want to create an outlet for a property defined by a superclass that was not defined as an outlet;
運行時動態(tài)創(chuàng)建綁定:主要使用在CoreData的實現(xiàn)NSManagedObject子類時使用,由Core Data框架在程序運行的時動態(tài)生成子類屬性。