Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Beginning iOS 5 Application Development
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning iOS 5 Application Development
This is the forum to discuss the Wrox book Beginning iOS 5 Application Development by Wei-Meng Lee; ISBN: 978-1-1181-4425-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iOS 5 Application Development section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 14th, 2012, 05:59 AM
Registered User
Points: 26, Level: 1
Points: 26, Level: 1 Points: 26, Level: 1 Points: 26, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default Chapter3: Adding views dynamically using code

While working on the exercises at the end of chapter 3 I noticed that when implementing the loadView method, views added with the Interface Builder are not shown.

(I worked through the exercises all in the same project.)

Can you not combine views created in design time with views created at runtime?
Reply With Quote
  #2 (permalink)  
Old February 14th, 2012, 02:37 PM
Friend of Wrox
Points: 1,671, Level: 16
Points: 1,671, Level: 16 Points: 1,671, Level: 16 Points: 1,671, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

If you haven't done so, it would be worth your while to read the documentation on the -loadView method. You only override -loadView when not using a nib. If no nib is specified, loadView will create a default empty view. If you wish to add objects to a nib outside of Interface Builder, you override the -viewDidLoad method. Customization and alteration of the view, once it is loaded, can be done as needed in response to events as long as you have a reference to it.

Bob
Reply With Quote
The Following User Says Thank You to thepianoguy For This Useful Post:
Brabbeldas (February 15th, 2012)
  #3 (permalink)  
Old February 15th, 2012, 03:38 AM
Registered User
Points: 26, Level: 1
Points: 26, Level: 1 Points: 26, Level: 1 Points: 26, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thanks Bob! I got it working!
I would have expected your sentence "You only override -loadView when not using a nib" somewhere in the book!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding views NOT programmatically reneo BOOK: Beginning iPad Application Development 1 August 23rd, 2010 09:18 PM
Events - Adding Dynamically dash dev C# 2005 2 December 5th, 2007 02:05 PM
Adding Controls Dynamically andyj00 C# 0 March 19th, 2007 08:54 AM
dynamically adding objects shawnvb VB How-To 3 February 14th, 2007 03:12 PM
converting Access 2000 views to Sql views matta Classic ASP Professional 1 January 26th, 2005 03:37 PM



All times are GMT -4. The time now is 11:26 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.