Posts

iOS Developers

           iOS Interview questions for beginners 1. What is the difference between atomic and nonatomic? atomic:  It is the default behavior. If an object is declared as atomic then it becomes thread-safe. Thread-safe means, at a time only one thread of a particular instance of that class can have the control over that object. nonatomic:   It is not thread-safe. You can use the non-atomic property attribute to specify that synthesized accessors simply set or return a value directly, with no guarantees about what happens if that same value is accessed simultaneously from different threads. For this reason, it’s faster to access a non-atomic property than an atomic one. 2. What is @Dynamic? It tells the compiler that getter and setter are not implemented by the class but by some other class. May be super class or child class. Example: Core Data The Managed Object classes have properties defined by using @dynamic. 3. What are Properties?