Skip to Content
Beginning iOS 5 Application Development
book

Beginning iOS 5 Application Development

by Wei-Meng Lee
January 2012
Beginner content levelBeginner
655 pages
16h 35m
English
Wrox
Content preview from Beginning iOS 5 Application Development

SUMMARY

This chapter provided a detailed look at the various application templates provided by the iOS SDK: Single View Application, Empty Application, Master-Detail Application, and Tabbed Application. Each one uses a different type of View controller. It is important to have a good understanding of how the various pieces of an iOS project are put together — knowing that enables you to build applications with sophisticated user interfaces.

EXERCISES

  1. Write the code snippet that enables you to create a View controller programmatically.
  2. Write the code snippet that creates a view dynamically during runtime.
  3. Write the code snippet that wires an event of a view to an event handler.
  4. In the EmptyApp project created earlier in this chapter, create an action to display an alert view when the button in the HelloWorldViewController class is pressed.

Answers to the exercises can be found in Appendix D.

image WHAT YOU LEARNED IN THIS CHAPTER

TOPIC KEY CONCEPTS
Types of iPhone/iPad Applications Single View application, Empty application, Master-Detail application, and Tabbed Application
Coding a Label view
label = [[UILabel alloc] initWithFrame:frame];
label.textAlignment = UITextAlignmentCenter;
label.font = [UIFont fontWithName:@“Verdana” size:20];
label.text = @“This is a label”;
Coding a Button view
frame = CGRectMake(20, 60, 280, 50); button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering iOS 12 Programming - Third Edition

Mastering iOS 12 Programming - Third Edition

Donny Wals
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 9781118144251Purchase book