1. Why we use auto layout in place of autoresize ?
Ans. The main reason for this is that in auto layout we can have parent child relationship between views .
2. Categories over sub classing ?
Ans. If we use subclassing then we need to implement all the methods and then we can add methods to the child class but in Categories there is no overhead of implementing all the methods you can only add methods to the class .
3. If we add a protocol to a class and didn't implemented in .m file what will happen ?
Ans. Once added to the interface of a class the class will always confirm to the protocol , to check weather the class has the particular method we can use a method performSelector on the object.
4. When we use delegations and notifications ?
Ans. If we have related objects only then we use delegations for unrelated objects we use notifications
5. Keyword Assign
Ans. The assign will point to the object and we have take care to make it nil or it will become dangling pointer , if we use strong keyword then when the object is released the value is set to nil once the object is deallocated.
6. Operation queue VS GCD ?
Ans. In GCD we can't add or join operations . And dispatch queues are First In First Out.
7. Why we should use AFNetworking Framework ?
Ans. While
Ans. The main reason for this is that in auto layout we can have parent child relationship between views .
2. Categories over sub classing ?
Ans. If we use subclassing then we need to implement all the methods and then we can add methods to the child class but in Categories there is no overhead of implementing all the methods you can only add methods to the class .
3. If we add a protocol to a class and didn't implemented in .m file what will happen ?
Ans. Once added to the interface of a class the class will always confirm to the protocol , to check weather the class has the particular method we can use a method performSelector on the object.
4. When we use delegations and notifications ?
Ans. If we have related objects only then we use delegations for unrelated objects we use notifications
5. Keyword Assign
Ans. The assign will point to the object and we have take care to make it nil or it will become dangling pointer , if we use strong keyword then when the object is released the value is set to nil once the object is deallocated.
6. Operation queue VS GCD ?
Ans. In GCD we can't add or join operations . And dispatch queues are First In First Out.
7. Why we should use AFNetworking Framework ?
Ans. While
NSURLConnection provides +sendAsynchronousRequest:queue:completionHandler: and+sendSynchronousRequest:returningResponse:error:, there are many benefits to using AFNetworking:AFURLConnectionOperationand its subclasses inherit fromNSOperation, which allows requests to be cancelled, > suspended / resumed, and managed by anNSOperationQueue.AFURLConnectionOperationalso allows you to easily stream uploads and downloads, handle authentication challenges, > monitor upload and download progress, and control the caching behavior or requests.AFHTTPRequestOperationand its subclasses distinguish between successful and unsuccessful requests based on HTTP > status codes and content type.- AFNetworking includes media-specific request operations that transform
NSDatainto more useable formats, like JSON, > XML, images, and property lists. AFHTTPClientprovides a convenient interface to interact with web services, including default headers, authentication, > network reachability monitoring, batched operations, query string parameter serialization, and multipart form requests.UIImageView+AFNetworkingadds a convenient way to asynchronously loads images.
8. Dispatch Queue vs Threads.
Ans.
1. The major advantage of using dispatch queues is that you can focus on the work that need to be performed as compared to the thread where you need to focus on both work and thread creation.
2.The system can scale it dynamically based on the current condition of resources .
3.