All India Exams
Home AptitudeBankEngineeringEnglishGKInterviewOnline TestPlacement PapersReasoning
  • Home
  • Aptitude
  • Bank
  • Engineering
  • English
  • GK
  • Interview
  • Online Test
  • Placement Papers
  • Reasoning

IOS Interview Questions and Answers

Here you can find IOS Interview Questions and Answers.

Why IOS Interview Questions and Answers Required?

In this IOS Interview Questions and Answers section you can learn and practice IOS Interview Questions and Answers to improve your skills in order to face technical inerview by IT companies. By Practicing these interview questions, you can easily crack any IOS interview.

Where can I get IOS Interview Questions and Answers?

AllIndiaExams provides you lots IOS Interview Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download IOS Interview Questions and Answers as PDF files and eBooks.

How to solve these IOS Interview Questions and Answers?

You no need to worry, we have given lots of IOS Interview Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the IOS technical interview.

IOS Interview Questions and Answers

What is init ?

init is an instance method, used to initialize a particular object

IOS Interview Questions and Answers

What is new ?

NSObject implements a class method "new" which simply calls "alloc" and "init"

IOS Interview Questions and Answers

What is the difference between init and new ?

new doesn't support custom initializers (like init With String) alloc-init is more explicit than new

IOS Interview Questions and Answers

What is retain ?

it is retained, old value is released and it is assigned -retain specifies the new value should be sent -retain on assignment and the old value sent -release -retain is the same as strong.apple says if you write retain it will auto converted/work like strong only. -methods like "alloc" include an implicit "retain"

IOS Interview Questions and Answers

What is ARC?

Automatic Reference Counting, or ARC was introduced in iOS 5,is a feature of the new LLVM 3.0 compiler and it completely does away with the manual memory management.you no longer call retain, release and autorelease.With Automatic Reference Counting enabled, the compiler will automatically insert retain, release and autorelease in the correct places in your program ARC is not a runtime feature (except for one small part, the weak pointer system), nor is it *garbage collection* that you may know from other languages.All that ARC does is insert retains and releases into your code when it compiles it. OR 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.

IOS Interview Questions and Answers

What is atomic?

Atomic means only one thread access the variable(static type). Atomic is thread safe. But it is slow in performance. Atomic is default behaviour. Atomic accessors in a non garbage collected environment (i.e. when using retain/release/autorelease) will use a lock to ensure that another thread doesn't interfere with the correct setting/getting of the value. -it is not actually a keyword. Example : @property (retain) NSString *name; @synthesize name;

IOS Interview Questions and Answers

What is nonatomic?

Nonatomic means multiple thread access the variable(dynamic type). Nonatomic is thread unsafe. But it is fast in performance. Nonatomic is NOT default behavior,we need to add nonatomic keyword in property attribute. It may result in unexpected behavior, when two different process (threads) access the same variable at the same time.

IOS Interview Questions and Answers

What is strong (iOS4 = retain ) ?

It says "keep this in the heap until I don't point to it anymore" In other words " I'am the owner, you cannot dealloc this before aim fine with that same as retain" You use strong only if you need to retain the object. -By default all instance variables and local variables are strong pointers. We generally use strong for UIViewControllers (UI item's parents) Strong is used with ARC and it basically helps you , by not having to worry about the retain count of an object. ARC automatically releases it for you when you are done with it. Using the keyword strong means that you own the object. Example: @property (strong, nonatomic) ViewController *viewController; @synthesize viewController;

IOS Interview Questions and Answers

What is weak (iOS4 = unsafe_unretained )?

It says "keep this as long as someone else points to it strongly" -the same thing as assign, no retain or release. A "weak" reference is a reference that you do not retain. We generally use weak for IBOutlets (UIViewController's Childs). This works because the child object only needs to exist as long as the parent object does. A weak reference is a reference that does not protect the referenced object from collection by a garbage collector. Weak is essentially assign, a unretained property. Except the when the object is deallocated the weak pointer is automatically set to nil Example : @property (weak, nonatomic) IBOutlet UIButton *myButton; @synthesize myButton; Explain: Imagine our object is a dog, and that the dog wants to run away (be deallocated). Strong pointers are like a leash on the dog. As long as you have the leash attached to the dog, the dog will not run away. If five people attach their leash to one dog, (five strong pointers to one object), then the dog will not run away until all five leashes are detached. Weak pointers, on the other hand, are like little kids pointing at the dog and saying "Look! A dog!" As long as the dog is still on the leash, the little kids can still see the dog, and they'll still point to it. As soon as all the leashes are detached, though, the dog runs away no matter how many little kids are pointing to it. As soon as the last strong pointer (leash) no longer points to an object, the object will be deallocated, and all weak pointers will be zeroed out. When we use weak? The only time you would want to use weak, is if you wanted to avoid retain cycles (e.g. the parent retains the child and the child retains the parent so neither is ever released).

IOS Interview Questions and Answers

What is retain = strong ?

It is retained, old value is released and it is assigned retain specifies the new value should be sent retain on assignment and the old value sent release -retain is the same as strong. apple says if you write retain it will auto converted/work like strong only. methods like "alloc" include an implicit "retain" Example: @property (nonatomic, retain) NSString *name; @synthesize name;

Home InterviewTechnical Interview Questions and AnswersIOS

IOS Interview Questions and Answers

  • What is init ?
  • What is new ?
  • What is the difference between init and new ?
  • What is retain ?
  • What is ARC?
  • What is atomic?
  • What is nonatomic?
  • What is strong (iOS4 = retain ) ?
  • What is weak (iOS4 = unsafe_unretained )?
  • What is retain = strong ?
  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • »

Mock Tests & Online Quizzes

  • Aptitude Online Test

  • Reasoning Online Test

  • GK Online Test

  • English Online Test

  • RRB Mock Test

  • RBI Mock Test

  • Free SBI Mock Test

  • IBPS Mock Test FREE

  • SSC Mock Test

  • CAT Exam Mock Test

  • GATE Mock Test

  • IT Courses Quiz

Questions and Answers

  • Aptitude Questions
  • Verbal Reasoning Questions
  • Non Verbal Reasoning
  • Logical Reasoning Questions
  • Data Sufficiency Questions
  • Data Interpretation
  • eLitmus Sample Papers
  • ECE Questions and Answers
  • EEE Questions and Answers
  • Verbal Ability Questions
  • GK Questions

Programming Quiz

  • C Programming
  • C++ Programming
  • PHP Programming
  • Java Programming
  • Python Programming
  • DataScience MCQ
  • Hadoop MCQ
  • Mongo DB MCQ
  • MySQL MCQ

Interview Questions

  • Java Interview Questions
  • .Net Interview Questions
  • Networking Interview Questions
  • C Language Interview Questions
  • C++ Interview Questions
  • Testing Interview Questions
  • Android Interview Questions
  • HR Interview Questions
  • Group Discussion Topics

Mock Tests

  • CAT Mock Test
  • SSC Mock Test
  • AMCAT Mock Online Test
  • LIC Mock Test
  • IBPS Mock Test
  • RRB Mock Test
  • RBI Mock Test
  • Free SBI Mock Test
© by AllIndiaExams.in. All Rights Reserved | Copyright | Terms of Use & Privacy Policy