Tuesday, December 15, 2015

iOS Technical test answers of 2016.

Find Complete and recently updated Correct Question and answers of iOS Technical. All Answers updated regularly with new questions. Upwork iOS Technical test answers of 2016.



Question:* True or False? When you create a new iOS project from a template, the template automatically makes a controller object for you.

Answer: • True

Question:* Automatic migration between Core Data model versions is sufficient for many cases. Which one of the following cases would require additional migration code?

Answer: • A relationship has changed from a 'to-one' to a 'to-many' relationship

Question:* In Objective C, which of the following is group of objects that can be visualized as a physical set of frames?

Answer: • The stack

Question:* How would you add a property to an Objective C Category?

Answer: • Add an associated reference to the category

Question:* What is the minimum iOS version you can support and still have Automatic Reference Counting?

Answer: • iOS 4

Question:* What would be the localized resource name for French?

Answer: • fr.lproj

Question:* In Objective C, what class will allow you to use one or more blocks concurrently?

Answer: • NSBlockOperation

Question:* What is the effect of using 'weak' in the following @property definition: @property (nonatomic, weak) SomeClass *responder; ?

Answer: • The responder object is not retained and the pointer is set to nil when the object is destroyed

Question:* In Core Data, what is the object representation of a record called?

Answer: • NSManagedObject

Question:* What flag prevents the device from turning off wifi if your app is running?

Answer: • UIRequiresPersistentWiFi

Question:* Which 3D Framework was added in iOS since iOS 8?

Answer: • SceneKit

Question:* In Objective C, what happens when you send a message to a variable that is nil?

Answer: • Nothing happens

Question:* Which of the following statements is TRUE?

Answer: • When using Grand Central Dispatch you can create as many serial dispatch queues as you want

Question:* How can you make the following code display with rounded corners? UIView *rectView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; rectView.backgroundColor = [UIColor redColor]; rectView.layer.cornerRadius = 8; [self.view addSubview:rectView];

Answer: • rectView.layer.masksToBounds = YES;

Question:* What object is responsible for launch time initalization and transitions?

Answer: • AppDelegate

Question:* Which of the following best describes the differences between iOS 7 and iOS 6?

Answer: • iOS 7 user interface has been completely redesigned and has 64-Bit Support.

Question:* What structure can be used to define a portion of a series?

Answer: • NSRange

Question:* Which of the following code snippets would work for changing the position of a view?

Answer: • CGPoint center = view.center; center.x = 0; center.y = 100; view.center = center;

Question:* Which of the following objects is considered "the managers in an application" by keeping the other objects in sync?

Answer: • Controller objects

Question:* Which of the follow statements is TRUE of the use of categories?

Answer: • You can also use categories to split the implementation of a complex class across multiple source code files.

Question:* What is used to sort Core Data results?

Answer: • NSSortDescriptor

Question:* What class supports the sharing of small amounts of data such as strings or dates to iCloud?

Answer: • NSUbiquitousKeyValueStore

Question:* What is the preferred way to store paths to files?

Answer: • NSURL

Question:* When do you use the "assign" value for a property?

Answer: • For primitive values such as BOOLs or NSIntegers

Question:* Delegation is an object-oriented approach to:

Answer: • callbacks

Question:* In order to test your application in XCode, which testing frameworks are available?

Answer: • OCMock, OCUnit, XCTest

Question:* What do you use to expose preferences for your app in the Settings section of the device?

Answer: • Settings.bundle

Question:* Which of the following holds data and knows nothing about the user interface?

Answer: • Model objects

Question:* Which statement is NOT true of notifications?

Answer: • Notifications must be registered on the App Delegate

Question:* What is a design pattern?

Answer: • A template for a solution to a common problem faced by programmers

Question:* What is a persistent object store?

Answer: • It represents an external file of persisted data.

Question:* What data type do you initialize if you want a list of items that can change?

Answer: • NSMutableArray

Question:* What function do you call to close the current view and go back to the root?

Answer: • popToRootViewController

Question:* What are the two types of predicates?

Answer: • Comparison and Compound predicates.

Question:* What is a SEL?

Answer: • The C type of a message selector

Question:* Which of the following lines of code will cause a run time crash?

Answer: • NSArray *array = [NSArray arrayWithObject:nil];

Question:* True or False: You can weak link to an entire framework?

Answer: • True

Question:* If you use threading, on which thread should UI Transitions be called?

Answer: • The main thread

Question:* True or False: You need to call retain on ARC enabled properties

Answer: • False

Question:* What is a category?

Answer: • A category is a way to add methods to a class which already exists

Question:* True or False: viewDidLoad comes after viewDidAppear?

Answer: • False

Question:* True or False: A Collection View is another name for a tableView

Answer: • False

Question:* What is the function in Objective C that determines what is in the cells of a tableView?

Answer: • cellForRowAtIndexPath

Question:* True or False: You can use %@ to specify a dynamic property in Objectve C.

Answer: • False

Question:* What protocol is used to create an action object?

Answer: • CAAction

Question:* When using ARC, how do you destroy an object in Objective C?

Answer: • Set the variable that points at it to nil

Question:* Can two different applications have the same Identifier For Vendor (aka IDFV)?

Answer: • Yes, because the vendor of the IDFV is defined by the first two parts of the reverse DNS formatted CFBundleIdentifier

Question:* How can you temporarily disable layer actions in a Core Animation?

Answer: • Using the CATransaction class

Question:* NSXMLParser is which kind of parser ?

Answer: • SAX Parser

Question:* What happens if you use fgets and do not give it a size smaller than the buffer?

Answer: • It will overwrite the data past the size

Question:* This code doesn't do much, but which line will call the + (void)initialize method on the class SomeClass 1. - (void)doSomething 2. { 3. [SomeClass someClassMethod]; 4. SomeClass *obj = [[SomeClass alloc] init]; 5. NSString *descriptionString = [obj getNewString]; 6. }

Answer: • line 3

Question:* In Core Data, what is the name of the object representation for the database schema?

Answer: • NSManagedObjectModel

Question:* In Objective C, when an application launches and runs the 'main' function, the frame for 'main' is put at the _____ of the stack.

Answer: • bottom

Question:* True or False: In Objective C, all instance methods are accessors.

Answer: • False

Question:* In which scenario should you use an NSDictionary over an NSArray?

Answer: • When item retrieval should be fast and in constant time

Question:* Which instrument would be most suited to debug whether a view is drawn from cache or redrawn?

Answer: • Core Animation

Question:* Which of the following is true?

Answer: • A class cannot be declared as abstract

Question:* True or False: The main thread handles touch inputs

Answer: • True

Question:* What's the difference between a frame and bounds?

Answer: • Bounds origin is always (0, 0), a frame origin is relative to his container view

Question:* What structure can hold an x and y coordinate that defines a location?

Answer: • CGPoint

Question:* What do you do when you don't need a reference on a object ?

Answer: • [obj release];

Question:* Is it possible to make a full application without using Interface Builder?

Answer: • Yes, on any platform

Question:* Which of the following objects is visible to the user?

Answer: • View objects

Question:* What data object can store a timestamp the best?

Answer: • NSDate

Question:* What file contains configuration data for the app?

Answer: • Info.plist

Question:* An indexPath has a Section and a ____

Answer: • Row or item

Question:* What is Class Extension?

Answer: • A class extension is used to declare additional interface -- methods and properties -- whose implementation contract will be met within the class's primary @implementaiton

Question:* What data type do you initialize if you want a string that can change?

Answer: • NSMutableString

Question:* Methods and instance variables are declared in the ______ file, but the actual code for the methods is placed in the _______ file.

Answer: • header, implementation

Question:* The archive that holds the saved create and configure view objects is known as:

Answer: • XIB

Question:* If an asset is for iPad only, how do you specify it in the file name?

Answer: • ~iPad

Question:* ARC Stands for:

Answer: • Automatic Reference Counting

Question:* Which of the following symbols do you prefix a character string with when you want a hard coded string?

Answer: • @

Question:* What's the difference between NSArray and NSMutableArray?

Answer: • NSArrayʼs contents can not be modified once itʼs been created whereas a NSMutableArray can be modified as needed

Question:* How do you reference your app bundle?

Answer: • [NSBundle mainBundle]

Question:* What is a delegate?

Answer: • A delegate allows one NSObject to send messages to another NSObject, and listen to those messages

Question:* What function is called for each cell in a Table View?

Answer: • cellForRowAtIndexPath

Question:* Which of the following keyboard shortcuts will run your app on the simulator?

Answer: • Command-R

Question:* What is @2x used for?

Answer: • Retina Assets

Question:* True or False? An object with at least one owner can be destroyed.

Answer: • True

Question:* What is the name of the type of SQL Database that iOS Supports?

Answer: • SQLite

Question:* Which scenario will not result in NSOperation throwing an exceptions:

Answer: • When the return value from a completion block is nil.

Question:* When adding objects to NSMutableDictionary, the key...

Answer: • Must conform to the NSCopying protocol

Question:* What class can implement Document Objects?

Answer: • UIDocument

Question:* Which one of the following is true?

Answer: • You can modify Core Animation layers on a background thread



No comments:

HTML5 Upwork (oDesk) TEST ANSWERS 2022

HTML5 Upwork (oDesk) TEST ANSWERS 2022 Question: Which of the following is the best method to detect HTML5 Canvas support in web br...

Disqus for upwork test answers