1.
In the line of code below what is missing?
@interface helloWorld 004ViewController : UIViewController{ IBOutlet UILabel *label;}
Correct Answer
C. A semicolon
Explanation
The correct answer is "A semicolon". In Objective-C, a semicolon is required at the end of a line of code to indicate the end of a statement. In the given line of code, there is a missing semicolon after the declaration of the IBOutlet UILabel *label.
2.
In what file would you import your header into?
Correct Answer
B. The Implementation file
Explanation
The correct answer is the Implementation file because this is where the code implementation for a class is written in Objective-C. Importing the header file into the Implementation file allows the class to access the declarations and definitions specified in the header, ensuring that the class can use the methods, properties, and variables defined in the header.
3.
Where would you save your image files in Xcode?
Correct Answer
A. Resources
Explanation
In Xcode, image files should be saved in the "Resources" folder. This folder is specifically designated for storing various types of resources, including images, that are used in the application. By saving image files in the Resources folder, they can be easily accessed and used within the project.
4.
In what file are functions usually written?
Correct Answer
B. Header
Explanation
Functions are usually written in the header file. The header file contains the function declarations, which include the function name, return type, and parameter types. The actual implementation of the functions is typically written in a separate source file, such as a .cpp file. The header file allows other parts of the program to access and use the functions without needing to know the specific implementation details.
5.
Does an IBoutlet have to have an IBaction associated with it?
Correct Answer
B. NO
Explanation
An IBOutlet does not have to have an IBAction associated with it. IBOutlet is used to establish a connection between a user interface element and the code, allowing the code to access and manipulate the element's properties. IBAction, on the other hand, is used to define a method that gets triggered when a specific event occurs, such as a button tap. While it is common to have an IBAction associated with an IBOutlet, it is not mandatory. An IBOutlet can be used solely for accessing and manipulating the element without any associated actions.
6.
How would you make a view appear fullscreen in your app?
Correct Answer
B. Check "Scale Page to Fit" in interface builder.
Explanation
To make a view appear fullscreen in an app, you would need to check the "Scale Page to Fit" option in the interface builder. This option ensures that the view scales and fits the entire screen, making it appear fullscreen. By enabling this option, the view will automatically adjust its size to fit the screen dimensions, providing a fullscreen experience for the user.
7.
What two terms mean the exact same thing in Xcode
Correct Answer
A. NIB - XIB
Explanation
In Xcode, the terms NIB and XIB mean the exact same thing. NIB stands for NeXT Interface Builder, which was the original file format used by Interface Builder in Xcode. XIB, on the other hand, stands for XML Interface Builder, which is the newer file format used by Interface Builder. Both NIB and XIB files contain the same information and are used to define the user interface of an application.
8.
What is a view based application looking at websites usually use to display those websites?
Correct Answer
C. UIWebView
Explanation
A view-based application looking at websites usually uses a UIWebView to display those websites. UIWebView is a class in iOS that provides a way to embed web content in an application. It allows the application to load and display web pages, handle user interactions with web content, and perform various web-related tasks. Therefore, UIWebView is the correct answer for this question.
9.
A XIB file is the most common place you will be able to rearrange the look of your screen when using objects from interface builder
Correct Answer
A. True
Explanation
An XIB file is a type of file used in Interface Builder, a tool for designing user interfaces in iOS development. In an XIB file, you can arrange and customize the look of your screen by adding and configuring various objects such as buttons, labels, and images. Therefore, it is true that an XIB file is the most common place for rearranging the look of your screen when using objects from Interface Builder.
10.
IF a textbox is going to be showing output from a selection what must be associated with that textbox so that it may display the text?
Correct Answer
A. IBoutlet
Explanation
To display the output from a selection in a textbox, the textbox must be associated with an IBOutlet. IBOutlet is a keyword used in iOS development to establish a connection between the user interface elements and the code. By creating an IBOutlet for the textbox, the code can access and manipulate the textbox's properties, such as setting its text to display the desired output from the selection.