1.If I call performSelector:
afterDelay: – is the object retained?
Yes the object is retained. It creates a timer that calls a selector on the current thread's run loop.
It may not be 100% precise time-wise as it attempts to dequeue the message from the run loop and perform the selector.
2.What happens when the following code executes?
Ball *ball = [[[[Ball alloc] init] autorelease] autorelease];
It will crash because it’s added twice to the autorelease pool and when it dequeued the autorelease pool calls release more than once.
Top iOS Interview Questions And Answers for Beginners
3. Explain the correct way to manage Outlets memory
Create them as properties in the header that are retained.
In the viewDidUnload set the outlets to nil(i.e self.outlet = nil).
Finally in dealloc make sure to release the outlet.
some key concepts for an iPhone developer to learn as a fresher
What is MVC in iPhone?
4.Whats the NSCoder class used for?
NSCoder is an Abstract Class which represents a stream of data.
They are used in Archiving and Unarchiving objects.
NSCoder objects are usually used in a method that is being implemented so that the class conforms to the protocol.
Some important points About View Controller.
iOS Interview Questions And Answers Part 10
5.Whats an NSOperationQueue and how/would you use it?
The NSOperationQueue class regulates the execution of a set of NSOperation objects.
An operation queue is generally used to perform some asynchronous operations on a background thread so as not to block the main thread.
Basic iOS interview Questions And Answers
Top 5 Frequently Asked iOS Interview Questions And Answers.