Assignment 1A - Hello Stanford!
This assignment is due by 11:59 PM, October 1.
This assignment requires no coding. It is intended to get you situated with the tools we’ll be
using in the class. You will use Xcode to create a project and Interface Builder to construct a
very simple user interface.
• In Xcode, create a new Window-Based iPhone application.
• Open the project’s MainWindow.xib file with Interface Builder.
• Add the following user interface elements to the view:
• a text label
• an image view
• Set the following properties on the text label:
• text value should be “Hello Stanford!” (or something suitably amusing)
• text alignment should be centered
• adjust the size to make the text large
• any other properties that catch your eye (color, font, etc)
• Back in Xcode, add an image (.png or .jpg) to your project. You can either drag the image in
from the Finder into your project (e.g. into the Resources folder) or you can use the Project >
Add to Project... menu to select an image. Note: Be sure to check the “Copy items into desti-
nation group’s folder (if needed)” checkbox. If you don’t do this, the resource won’t be inside
of your project directory and when you submit your assignment the resources will not be in-
cluded in the submission.
• Once your image is in the project, return to MainWindow.xib, select the image view and set
the image for the image view that you dragged in previously using the Attributes Inspector.
• configure the image view’s “Mode” to be “Aspect Fit” so that the entire image is scaled to
fit inside the image view’s bounds while preserving the aspect ratio of the image. If a dif-
ferent mode works better for your picture, set it accordingly.
• In Xcode, build and run your project in the simulator. Your interface should look something
like the following:
Page 1 of 2
In most assignments testing of the application is the primary objective. This is a very important