Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

Objective-C and iOS Programming A

Simplified Approach To Developing


Apps for the Apple iPhone and iPad 1st
Edition Arshia Khan Test Bank
Visit to download the full and correct content document: https://testbankdeal.com/dow
nload/objective-c-and-ios-programming-a-simplified-approach-to-developing-apps-for-
the-apple-iphone-and-ipad-1st-edition-arshia-khan-test-bank/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Objective-C and iOS Programming A Simplified Approach


To Developing Apps for the Apple iPhone and iPad 1st
Edition Arshia Khan Solutions Manual

https://testbankdeal.com/product/objective-c-and-ios-programming-
a-simplified-approach-to-developing-apps-for-the-apple-iphone-
and-ipad-1st-edition-arshia-khan-solutions-manual/

Programming with Mobile Applications Android iOS and


Windows Phone 7 1st Edition Duffy Solutions Manual

https://testbankdeal.com/product/programming-with-mobile-
applications-android-ios-and-windows-phone-7-1st-edition-duffy-
solutions-manual/

System Programming With C And Unix 1st Edition Hoover


Solutions Manual

https://testbankdeal.com/product/system-programming-with-c-and-
unix-1st-edition-hoover-solutions-manual/

Introduction to C++ Programming and Data Structures 4th


Edition Liang Solutions Manual

https://testbankdeal.com/product/introduction-to-c-programming-
and-data-structures-4th-edition-liang-solutions-manual/
Introduction to Programming with C++ 3rd Edition Liang
Test Bank

https://testbankdeal.com/product/introduction-to-programming-
with-c-3rd-edition-liang-test-bank/

Building Cross Platform Mobile and Web Apps for


Engineers and Scientists An Active Learning Approach
1st Edition Lingras Solutions Manual

https://testbankdeal.com/product/building-cross-platform-mobile-
and-web-apps-for-engineers-and-scientists-an-active-learning-
approach-1st-edition-lingras-solutions-manual/

Introduction to Programming with C++ 4th Edition Diane


Zak Test Bank

https://testbankdeal.com/product/introduction-to-programming-
with-c-4th-edition-diane-zak-test-bank/

Introduction to MATLAB Programming and Numerical


Methods for Engineers 1st Edition Siauw Solutions
Manual

https://testbankdeal.com/product/introduction-to-matlab-
programming-and-numerical-methods-for-engineers-1st-edition-
siauw-solutions-manual/

Business Communication Developing Leaders for a


Networked World 1st Edition Cardon Test Bank

https://testbankdeal.com/product/business-communication-
developing-leaders-for-a-networked-world-1st-edition-cardon-test-
bank/
Chapter 9: Understanding and Creating User Interfaces

TRUE/FALSE

1. The UIKit framework classes manage the application object, event handling, windows, views, and all
the controls that help create an interactive touch screen user interface.

ANS: T PTS: 1 REF: 236

2. When you have a large number of views displayed at one time, the Xcode window can get crowded;
therefore, it’s helpful to use a large monitor when working with storyboards.

ANS: T PTS: 1 REF: 236

3. Each view in a storyboard has an individual .xib file.

ANS: F PTS: 1 REF: 238

4. An arrow on the right side of a view controller in a storyboard file indicates that this is the project’s
initial view.

ANS: F PTS: 1 REF: 240

5. To open the Object Library in Xcode, click View > Utilities > Show Object Library.

ANS: T PTS: 1 REF: 241

6. In a storyboard file, control-dragging a button from one view to another brings up an options menu for
creating a segue.

ANS: T PTS: 1 REF: 244

7. To embed a navigation controller in a view controller that is being displayed in Interface Builder, first
select the view controller and then, on the Xcode window menu along the top, click Editor >
Embed In > View Controller.

ANS: F PTS: 1 REF: 247

8. When a new navigation controller is added to a project, that navigation controller must be used as the
initial view controller.

ANS: F PTS: 1 REF: 247

9. In Interface Builder, a view controller is graphically connected to its embedded navigation controller
with an arrow that points from the view controller to the navigation controller.

ANS: F PTS: 1 REF: 248

10. To add a title to a navigation bar in Interface Builder, double-click in the center of the navigation bar
and then type the desired title.

ANS: T PTS: 1 REF: 249


11. When a navigation controller is embedded in a view controller on a storyboard, the connections
between the navigation and view controllers are automatically generated.

ANS: T PTS: 1 REF: 249

12. When creating a segue from a view controller to a second view controller using a navigation bar
button, you should use the modal segue option.

ANS: F PTS: 1 REF: 251

13. When a navigation bar is used to transition to a new view, it is important to create a button on the
second view that will return to the original view.

ANS: F PTS: 1 REF: 253

14. When transitioning from one view to another through a storyboard segue, it is possible to pass data
from the first view to the second view.

ANS: T PTS: 1 REF: 254

15. When two views share a storyboard, they can also share the related View Controller.h and
ViewController.m files.

ANS: F PTS: 1 REF: 255

16. UIViewController is an Objective-C class.

ANS: T PTS: 1 REF: 257

17. To select a view controller in Interface Builder, you should click in its top blue bar, near the battery
icon.

ANS: T PTS: 1 REF: 258

18. When writing code involving segues, you can ensure that you are referring to the correct one in your
code by checking that the identifier attribute of the segue is the expected string.

ANS: T PTS: 1 REF: 262

19. When working with numbers that are entered into textfields, the numbers will be read as strings and
must be explicitly converted to numeric form before performing numeric operations.

ANS: T PTS: 1 REF: 262

20. The createASegue method is automatically generated when a segue is created using the
control-drag method.

ANS: F PTS: 1 REF: 263


MULTIPLE CHOICE

1. The ____ framework is the most important framework in the design and building of an interactive
interface.
a. UIKit c. NavController
b. Storyboard d. DemoKit
ANS: A PTS: 1 REF: 236

2. ____ is a feature that allows the developer to work with all the view controllers in an app at one time.
a. Segueing c. Storyboarding
b. Transitioning d. Modal Building
ANS: C PTS: 1 REF: 236

3. In the Xcode environment, a ____ is a transition between views.


a. canvas c. board
b. segment d. segue
ANS: D PTS: 1 REF: 236

4. The Xcode editor pane that contains a graphic representation of a view is called the ____ canvas.
a. Storyboard c. Assistant Editor
b. Interface Builder d. Segue
ANS: B PTS: 1 REF: 236

5. The accompanying figure shows a portion of the ____ area of the Xcode editor.
a. Object Library c. Identity Inspector
b. Attributes Inspector d. Assistant Editor
ANS: A PTS: 1 REF: 237

6. When creating a project using storyboards, you must select the ____ option in the “Choose options for
your new project” window.
a. Create Automatic Storyboards c. Include Storyboards
b. Use Storyboards d. Generate Storyboards
ANS: B PTS: 1 REF: 239-240

7. To see the graphical view of a project in the Xcode Interface Builder window, click on the ____ file in
the navigation area on the left-hand side of the screen.
a. Main.h c. Main.xib
b. Project.m d. MainStoryboard.storyboard
ANS: D PTS: 1 REF: 240

8. The file extension for a storyboard file is ____.


a. .nib c. .storyboard
b. .xib d. .s
ANS: C PTS: 1 REF: 240

9. The controls that can be dragged into Interface Builder to create a user interface are found in the
Xcode ____.
a. ViewController Library c. Storyboard Library
b. Object Library d. GUI Library
ANS: B PTS: 1 REF: 241

10. In the accompanying figure, the arrow to the left of the blue view signifies that this is the ____ view.
a. modal c. initial
b. child d. segue
ANS: C PTS: 1 REF: 241

11. The button on the blue view of the accompanying figure is an example of a(n) ____.
a. Navigation button c. Information button
b. Oval button d. Round Rect button
ANS: D PTS: 1 REF: 242

12. Control-dragging the “Go to next view” button onto the right view controller in the accompanying
figure will bring up an option menu for choosing a type of ____.
a. view controller c. IBAction
b. IBOutlet d. segue
ANS: D PTS: 1 REF: 243

13. In the accompanying figure, the arrow between the two views shown represents a ____.
a. mode c. shift
b. segue d. method call
ANS: B PTS: 1 REF: 245

14. A ____ segue is typically used for presenting a new view controller without a navigation controller.
a. push c. hierarchical
b. custom d. modal
ANS: D PTS: 1 REF: 244

15. A(n) ____ bar is a horizontal bar with buttons that the user can click to move among view controllers.
a. navigation c. controller
b. action d. title
ANS: A PTS: 1 REF: 247

16. Embedding a(n) ____ adds a navigation bar at the top of a view controller.
a. segue controller c. action controller
b. title controller d. navigation controller
ANS: D PTS: 1 REF: 247

17. The object in a navigation bar that is used to initiate a transition to a new view is called a ____.
a. Nav Button c. Bar Button Item
b. Round Rect Button d. Fixed Button Item
ANS: C PTS: 1 REF: 251

18. The type of segue associated with a navigation controller is a ____ segue.
a. push c. transition
b. modal d. custom
ANS: A PTS: 1 REF: 251

19. When looking for a specific control in the Object Library of Xcode, you can type at least part of the
name of the control in the ____ of the library to display matching controls.
a. object finder c. finder
b. control search d. search field
ANS: D PTS: 1 REF: 251
20. If the accompanying figure shows the main storyboard for an app , what is the first thing displayed
when running the app?
a. A view with the label “Navigation Controller”
b. An empty black view with a navigation bar
c. An empty white view with a navigation bar
d. A view with the label “Navigation Controller - View”
ANS: B PTS: 1 REF: 252-253

21. In the accompanying figure, the arrow to the left of the View Controller with the label “View 1” in the
navigation bar represents a(n) ____.
a. modal segue c. initial view
b. embedded navigation controller d. push segue
ANS: B PTS: 1 REF: 252

22. In the accompanying figure, the object labelled “Next” is an example of a ____ item.
a. segue button c. bar button
b. controller button d. nav button
ANS: C PTS: 1 REF: 251

23. The accompanying figure shows an example of a(n) ____ bar.


a. navigation c. controller
b. view d. action
ANS: A PTS: 1 REF: 253

24. To create a new set of .h and .m files, you can choose File > New > ____ from the Xcode menu bar.
a. View Controller c. Class
b. File d. Open
ANS: B PTS: 1 REF: 255

25. When creating a file that is to contain a view controller, you should select the ____ template from the
template menu.
a. Objective-C class extension c. Objective-C class
b. Objective-C category d. Objective-C protocol
ANS: C PTS: 1 REF: 256

26. When creating a new view controller file, you would normally choose ____ from the Subclass of
dropdown list in the “Choose options for your new file” menu.
a. UIView c. UIController
b. UIViewController d. UINavigationController
ANS: B PTS: 1 REF: 257

27. Which of the following icons represents the Identity Inspector in the Xcode editor?
a. c.
b. d.

ANS: C PTS: 1 REF: 258

28. The accompanying figure shows the ____, which allows you to change the class of a selected view
controller in a storyboard.
a. Identity Inspector c. Assistant Editor
b. Object Library d. Organizer
ANS: A PTS: 1 REF: 258

29. To see a graphic representation of a view controller alongside its associated code in Xcode, you can
first select the storyboard file in the navigation area and then open the ____ pane.
a. Identity Inspector c. Object Library
b. Organizer d. Assistant Editor
ANS: D PTS: 1 REF: 258
30. You can create an IBOutlet for a label control by control-dragging the label from Interface Builder
to its associated ____ file.
a. .xib c. .m
b. .h d. .storyboard
ANS: B PTS: 1 REF: 259

31. The code statement, @synthesize total;, would appear in a ____ file.
a. .xib c. .m
b. .h d. .storyboard
ANS: C PTS: 1 REF: 260

32. You can name a segue by selecting the segue and typing the desired name in the ____ field of the
Attributes Inspector.
a. Title c. Name
b. Label d. Identifier
ANS: D PTS: 1 REF: 261-262

33. The name of the method used to pass data between two views via a segue is ____.
a. loadNewSegue c. prepareForSegue
b. transitionToSegue d. startSegue
ANS: C PTS: 1 REF: 262

1 -(void) prepareForSegue:(UIStoryboardSegue *)segue


2 sender:(id)sender
3 {
4 if ([segue.identifier isEqualToString:@"sum"])
5 {...}
6 }

34. When working with a view controller named ViewController,in which of the following files
would the accompanying code segment appear?
a. ViewController.h c. ViewController.storyboard
b. ViewController.m d. MainStoryboard.storyboard
ANS: B PTS: 1 REF: 262

35. In the accompanying code segment, segue on line 4 refers to a(n) ____.
a. class c. IBOutlet
b. method parameter d. IBAction
ANS: B PTS: 1 REF: 262

36. To reference the view controller being transitioned to during a segue, you can use the method call
____.
a. [segue ToNewViewController];
b. [beginSegueTransition destination]
c. [segue destinationViewController];
d. [segue getViewController2];
ANS: C PTS: 1 REF: 262
37. An integer can be converted to a string using a(n) ____
a. IntegerConverter c. StringFormatter
b. StringCast d. NSNumberFormatter
ANS: D PTS: 1 REF: 263

38. In the following code segment, myInt is an integer.What is the type of the result returned?

NSNumberFormatter *format=[[NSNumberFormatter alloc] init];


[format stringFromNumber:[NSNumber numberWithInt:myInt]];

a. int c. string
b. NSNumber d. float
ANS: C PTS: 1 REF: 263

39. Which of the following statements could be used to return an integer value from a textfield called
myField?
a. [myField.text intValue];
b. myfield.text;
c. [myField.value stringToInt];
d. [myField.value toInt];
ANS: A PTS: 1 REF: 263

40. The ____ method is generated when a segue is created using the control-drag method.
a. createSegue c. pushSegue
b. prepareForSegue d. startSegue
ANS: B PTS: 1 REF: 263
Another random document with
no related content on Scribd:
he often lays his hand lightly on
those who use him well.

Barnaby Rudge.

Second-hand cares, like second-hand clothes,


come easily off and on.

A Tale of Two Cities.

It’s much easier to talk


than to bear.

Madam Mantalini.
Twenty-fourth Day.

here’s the good of putting


things off?
Strike while the iron’s hot.

Barnaby Rudge.

Money ... some people find their gratification


in storing it up,
and others in parting with it.

Martin Chuzzlewit.

Only the wisdom that holds the clue to


all hearts and all mysteries
can surely know to what extent a man can
impose upon himself.

Little Dorrit.

Every man came into this world for something.

Gabriel Varden.
Twenty-fifth Day.

Perfect coolness and self-possession


... are indispensable
accomplishments of a great mind.

Pickwick Papers.

The hill has not lifted its face to Heaven yet,


that perseverance will not
gain the summit of at last.

Nicholas Nickleby.

If you can’t get to be uncommon


through going straight, you’ll never get to do it
through being crooked.
Great Expectations.
Twenty-sixth Day.

heerful of spirit and guiltless


of affectation true practical
Christianity ever is.

The Uncommercial Traveller.

Live at least, in peace, and trust in God


to help.

Nicholas Nickleby.

Reflect upon your present blessings—


of which every man has many—not on your
past misfortunes,
of which all men have some.

Sketches by Boz.

All other swindlers upon earth are nothing


to the self-swindlers.

Great Expectations.
Twenty-seventh Day.

here’s a moral in everything, if


we would
only avail ourselves of it.

Dombey and Son.

It is the highest part of the highest creed


to forgive before
memory sleeps, and ever to remember how the
good overcame the evil.

Haunted Man.

There is nothing, no, nothing innocent or


good that dies and is forgotten.

Old Curiosity Shop.

It does not follow that the more talkative a


person becomes
the more agreeable he is.

Dickens.
Twenty-eighth Day.

Blustering assertion goes for proof half


over the world.

Little Dorrit.

From rough outsides serene and gentle influences


often proceed.

Dickens.

A generous nature is not prone to strong


aversions, and is slow
to admit them even dispassionately.

Little Dorrit.
Twenty-ninth Day.

ork: don’t make fine playing


speeches about
bread, but earn it.

Ralph Nickleby.

If I do my duty, I do what I ought, and


do no more than all the rest.

Dombey and Son.

Do not strive and struggle to enrich


yourselves or to get the better of each other.

Martin Chuzzlewit.

People accustomed from infancy to lie on


down feathers,
have no idea how hard a paving-stone
is without trying it.

Hard Times.
Thirtieth Day.

Memory, however sad, is the


best and purest
link between this world and a better.

Nicholas Nickleby.

It’s enough for a man to understand his


own business,
and not to interfere with other people’s.

Christmas Carol.

It’s a world full of hearts, and a serious world


with all its folly.

Battle of Life.
Thirty-first Day.

ur judgments are so liable to be


influenced by many
considerations, which almost
without our knowing it, are unfair,
that it is necessary to keep a guard upon them.

Little Dorrit.

There are chords in the human heart—


strange varying strings—
which are only struck by accident.

Old Curiosity Shop.

It is well for a man to respect his own vocation,


whatever it is;
and to think himself bound to uphold it, and
to claim for it the respect it deserves.

Little Dorrit.
Transcriber’s note
Minor punctuation errors have been changed
without notice. The following printer errors have
been changed.
CHANGED FROM TO
“always some thing “always something
Page 12:
to be” to be”
Page 19: “Go in an win” “Go in and win”
“An Uncommercial “The Uncommercial
Page 26:
Traveller.” Traveller.”
Page 31: “what ever it is” “whatever it is”
*** END OF THE PROJECT GUTENBERG EBOOK HOLLY
BERRIES FROM DICKENS ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright
in these works, so the Foundation (and you!) can copy and
distribute it in the United States without permission and without
paying copyright royalties. Special rules, set forth in the General
Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree to
abide by all the terms of this agreement, you must cease using
and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project
Gutenberg™ works in compliance with the terms of this
agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms
of this agreement by keeping this work in the same format with
its attached full Project Gutenberg™ License when you share it
without charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it
away or re-use it under the terms of the Project Gutenberg
License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country where
you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of the
copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.
1.E.5. Do not copy, display, perform, distribute or redistribute
this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information

You might also like