Your Great Journey Starts here. (http://www.facebo (http://www.tw (http://www. (https://pl (http:/ (m tw g/2a/5
WaY 2 iOS (http://way2ios.com/)
(mailto:
[email protected])
(http://way2ios.com/feed/
(http://in.linkedin.com/pub/krish-g/2a/561 (https://plus.google.com/109473649914154868748/p (http://www.twitter.com/krish_gu (http://www.facebook.com/way
(http://way2ios.com)
Developmen Developmentt Programming Programming
(http://w (http://way2ios. ay2ios.com/cat com/category egory/deve /developmen lopment/) t/)
OS
(http://wa (http://way2ios. y2ios.com/cat com/category egory/os/) /os/)
(http:/ (http://way2i /way2ios.com os.com/cate /category/r gory/refern efernece/p ece/programm rogramming/) ing/)
Tips & Tricks (http://way2ios.com/category/tips-tricks-2/) Sample code (http://wa (http://way2ios. y2ios.com/cat com/category egory/sample /samplecode/) code/)
Tech News
Reference Reference
(http: (http://way2 //way2ios.com ios.com/cate /category/r gory/refern efernece/) ece/)
(http://way2ios.com/category/tech-news/) (http://way2ios.com/category/tech-ne ws/)
Contact Contact (http://wa (http://way2ios. y2ios.com/te com/tech-su ch-support pport/) /)
iOS Interview Questions & answers for experienced developers
This is continuation post for iOS Interview Questions for fresher (http://way2ios.com/development/ios(http://way2ios.com/development/iosdevelopment-2/ios-interview-questions-with-
ww.wpfruits.com/downloads/wp-
l
i
p-
answers/)‘s.list of iOS interview interview questions questions helped you to clear iOS/iPhone interviews *Q :
_
Explain the options and bars available in xcode 4.x
workspace window ?
=w wa a y2 y2 io io s. s.c om om )
A:
Top Posts
(http://way2ios.com/wp-content/uploads/2013/01/Xcode4Workspace.jpg)
*Q :
If I call performSelector:withObject: performSelector:withObject:afterDelay: afterDelay: – is the
object retained? A:
Yes, the object is retained. It creates a timer that calls a selector on the current threads run loop. It may not be
iOS interview Questions with Answers (http://way2ios.com/developme development-2/ios-interviewquestions-with-answers/)
iOS Interview Questions & answers for experienced developers (http://way2ios.com/developme development-2/ios-interviewquestions-for-experience/)
100% precise time-wise as i t attempts to dequeue the message from the run loop and perform the selector. *Q :
iPhone interview questions with answers part- II (http://way2ios.com/developme development-2/iphoneinterview-question-answers/)
Can you explain what happens when you call
autorelease on an object? What is iBeacons in iOS 7 (http://way2ios.com/developme development-2/ibeacons/)
A:
When you send an object a autorelease message, its retain count is decremented by 1 at some stage in the future. The object is added to an autorelease pool on the current thread. The main thread loop creates an autorelease pool at the beginning of the function, and release it at the end. This establishes a pool fo r the lifetime of the task. However, this als o means that any autoreleased objects created during the lifetime of the task are not disposed of until the task completes. This may lead to the task’s memory footprint increasing unnecessarily. You can also consider creating pools with a narrower scope or use NSOperationQueue with it’s own autorelease pool. (Also important – You only release or autorelease objects you own.) *Q :
Whats the NSCoder class used for?
A:
NSCoder is an abstractClass 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. (which has something like encodeObject and decodeObject methods in them). *Q :
Whats an NSOperationQueue and how/would you use
it? A:
Tags
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. *Q :
Explain the correct way to manage Outlets memory.
Android (http://way2ios.com/tag/android/)
Apple (http://way2ios.com/ Applebyte (http://way2ios.com/tag/applebyte/)
A:
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 d ealloc make sure to release the outlet.
iOS interview Questions for Expert level
AppStore (http://way2ios.com/tag/appstore Beta (http://way2ios.com/tag/beta/) developer
(http://way2ios.com/tag/developer-2/ Enterprise (http://way2ios.com/tag/enterprise/) Free Wif (http://way2ios.com/tag/free-wifi/)Google (http://way2ios.com/tag/google/)Host File (http://way2ios.com/tag/host-file/)iBeacons
ios (http://way2ios.com/t (http://way2ios.com/tag/ibeacons/)
*Q :
What is sandbox?
A: For security reasons, iOS places each app (including its preferences and data) in a sandbox at install time. A sandbox is a set of fine-grained controls that limit the app’s access to files, preferences, network resources, hardware, and so on. As part of the sandboxing process, the system installs each app in its own sandbox directory, which acts as the home for the app and its data.
iOS 6 (http://way2ios.com/tag/ios-6/)
ios 7 (http://way2ios.com/tag/ios7/) ios7 (http://way2ios.com/tag/ios7 Ios Interview (http://way2ios.com/tag/ios interview/) iPa (http://way2ios.com/tag/ipa/) iPad
iPhone (http://way2ios.com/tag 2/) iPhone 6 (http://way2ios.com/tag/iphone-6/) (http://way2ios.com/tag/ipad/)
iPhone interview (http://way2ios.com/tag/iphoneinterview/) iphone unlock (http://way2ios.com/tag/iphone-unlock/) iTunes store (http://way2ios.com/tag/itunes-store/)
Mac (http://way2ios.com/tag/mac2/) Memory management (http://way2ios.com/tag/memory-management/)
Microsoft (http://way2ios.com/tag/micros Obj-c (http://way2ios.com/tag/obj-c/) Obj-c
Interview (http://way2ios.com/tag/obj-cinterview/) Objective-C
(http://way2ios.com/tag/obj c-2/) Rumors (http://way2ios.com/tag/rumors/)
samsung (http://way2ios.com/tag/samsung/)
security (http://way2ios.com/tag/security2/) Support
(http://way2ios.com/tag/ Surface (http://way2ios.com/tag/surface/) SVN
(http://way2ios.com/tag/svn/) URL Scheme (http://way2ios.com/tag/url-scheme/)WWDC
Xcode (http://way2ios.com/tag/xcode (http://way2ios.com/tag/wwdc/)
You tube (http://way2ios.com/tag/you-tube/)
To help apps organize their data, each sandbox directory contains several well-known subdirectories for placing files. Above Figure shows the basic layout of a sandbox directory.
*Q :
Is the delegate for a CAAnimation retained?
A:
Yes it is!! This is one of the rare exceptions to memory management rules. *Q :
What is
dynamic
?
A: You use the @dynamic keyword to tell the compiler that you will fulfill the API contract implied by a property either by providing method implementations directly or at runtime using other mechanisms such as dynamic loading of code or dynamic method resolution. It suppresses the warnings that the compiler would otherwise generate if it can’t find suitable implementations. You should use it only if you know that the methods will be available at runtime.
*Q :
What happens when the following code executes?
Ball *ball = [[[[Ball alloc] init] autorelease] autorelease]; A:
It will crash because it’s added twice to the autorelease pool and when it it dequeued the autorelease pool calls release more than once. *Q :
Explain the di! erence between NSOperationQueue
concurrent and non-concurrent. A:
In the context of an NSOperation object, which runs in an NSOperationQueue, the terms concurrent and nonconcurrent do not necessarily refer to the side-by-side execution of threads. Instead, a non-concurrent operation is one that executes using the environment that is provided for it while a concurrent operation is responsible for setting up its own execution environment. *Q :
Implement your own synthesized methods for the
property NSString *title. A:
Well you would want to implement the getter and setter for the title object. Something like this: view source print? - (NSString*) title // Getter method { return title; } - (void) setTitle: (NSString*) newTitle //Setter method { if (newTitle != title) { [title release]; title = [newTitle retain]; // Or co py, depending on your needs. } } *Q :
Implement the following methods: retain, release,
autorelease. A:
-(id)retain { NSIncrementExtraRefCount(self); return self; } -(void)release { if(NSDecrementExtraRefCountWasZero(self)) {NSDeallocateObject(self); } } -(id)autorelease { // Add the object to the autorelease pool [NSAutoreleasePool addObject:self]; return self; }
*Q :
What are all the newly added frameworks iOS 4.3 to
iOS 5.0? A: Accounts CoreBluetooth CoreImage GLKit GSS NewsstandKit Twitter
*Q :
What is Automatic Reference Counting (ARC) ?
A:
ARC is a compiler-level feature that simplifies the process of managing the lifetimes of Objective-C objects. Instead of you having to remember when to retain or release an object, ARC evaluates the lifetime requirements of your objects and automatically inserts the appropriate method calls at compile time.
*Q :
What is the di! erence between retain & assign?
A:
Assign creates a reference from one object to another without increasing the source’s retain count. if (_variable != object) { [_variable release]; _variable = nil; _variable = object; }
Retain creates a reference from one object to another and increases the retain count of the source object. if (_variable != object) {
[_variable release]; _variable = nil; _variable = [object retain]; }
Page : 3 (http://way2ios.com/development/iosdevelopment-2/iphone-2/iphoneinterview-question-answers-part-2/) Let us know these list of iOS interview questions helped you to clear iOS/iPhone interviews. Share this:
Tweet
2
Share
(http://digg.com/submit?url=http%3A%2F%2Fway2ios.com%2Fdevelopment%2Fios-development-2%2FiosPin It (http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fway2ios.com%2Fdevelopment%2Fios-de interview-questions-forexperience%2F&title=iOS%20Interview%20Questions%20%26%20answers%20for%20experienced%20deve experience%2F&description=iOS%20Interview%20Questions%20%26%20answers%20for%20experienced% content%2Fuploads%2F2013%2F01%2FXcode4Workspace.jpg)
« iPhone interview questions with answers part- II (http://way2ios.com/development/ios-development2/iphone-interview-question-answers/)
Rumor: iPhone 6 and iPhone mini (http://way2ios.com/tech-news/apple/rumor-iphone-6and-iphone-mini/) »
★
3 comments
0
Leave a message...
Best
Share
Community
⤤
⚙
fyell •
I noticed a bug in your code when synthesizing your own getter. You should be returning [[title retain] autorelease] (I'm assuming you're synthesizing a property with a retain attribute since your setter is doing a retain). Since the setter releases the object, you could possibly run into a situation like this: NSString* myTitle = self.title; self.title = @"A Different Title"; NSLog(@"myTitle is %@", myTitle); //the line above will crash because the setter released the object myTitle was referencing
horseshoe7 •
You should really update this article as many of the concepts are out of date. For example, asking questions about pre-ARC. Plus, you also imply that your expert level questions are things that experts need to know. They're not that important.
Bharat Dodeja •
Very well explained. Thanks for sharing.
What's this?
…
… •
•
—
—
…
… •
•
—
—
visitors
Disclaimer
(http://images.apple.com/main/rss/hotnews/hotnews.rss) (http://www2.clustrmaps.com/counter/maps.php? This website is not owned by, is not url=http://way2ios.com)
Latest Apple News
licensed by nor is a subsidiary of Apple I iPhone is a trademark of Apple Inc. The content of this website is not supplied o
(http://www.apple.com/hotnews/)
reviewed by Apple Inc. All articles, imag logos and trademarks in this site are
MacBook Air the Ultimate Laptop (http://www.theverge.com/2013/6/17/4436332/macbook-
KRISH air-review-13-inch-2013) August 9, 2013 (http://gravatar.com/cehchowdary) Apple Reports Third Quarter Results “Knowing is not enough; we must apply.
(http://www.apple.com/pr/library/2013/07/23Apple-
Willing is not enough; we must do.”
Reports-Third-Quarter-Results.html?
property of their respective owners. Plea follow this link to read the complete disclaimer (http://way2ios.com/disclaimer/).
sr=hotnews.rss) July 23, 2013 Apple Unveils Logic Pro X View Full Profile " (http://www.apple.com/logic-pro/? (http://gravatar.com/cehchowdary) sr=hotnews.rss) July 16, 2013 App Store Marks 5 Years of App-ortunity (http://www.usatoday.com/story/tech/columnist/talkingtech/2013/07/09/5years-of-apple-apps/2499299/) July 11, 2013 Ducati Hits the Road Full Throttle with iPad (http://www.apple.com/ipad/business/profiles/ducati/#videoducati?sr=hotnews.rss) July 1, 2013
© WaY
CyberChimps(http://cyberchimps.com/)