Wrox Programmer Forums

Need to download code?

View our list of code downloads.

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

You are currently viewing the BOOK: Beginning iPad 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 July 7th, 2010, 05:04 PM
Registered User
 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 3 Page Control & Image Views

When the Page Control & Image view program is run it should load the first image specified in ViewDidLoad, correct?

If so, I cannot get the initial image to load into the view. I have rechecked the code and it compiles ok with no errors.
Reply With Quote
  #2 (permalink)  
Old July 14th, 2010, 01:33 AM
Registered User
 
Join Date: Jul 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You are correct, the first image should load automatically.

Does the first image load if you swipe to the second page, and then back to the first page again? If so, you may have spelled the file name of the image incorrectly in the viewDidLoad method. The program will compile even if the file name is incorrect.

If none of the images load, then you may want to make sure you added the images to the Resources folder.
Reply With Quote
  #3 (permalink)  
Old July 14th, 2010, 02:15 AM
Registered User
 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When it runs in the simulator I have to tap on the third dot for an image to show up initially. After I do that it highlights the second dot and shows the second image. Then I can tap the first dot to view the first image. For whatever reason it will not swipe.

Last edited by programmer2010; July 14th, 2010 at 02:24 AM..
Reply With Quote
  #4 (permalink)  
Old August 24th, 2010, 07:10 AM
Registered User
 
Join Date: Aug 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Same problem

Did you resolve this? I have the same issue, the viewDidLoad code is not displaying an image.
Reply With Quote
  #5 (permalink)  
Old August 24th, 2010, 12:35 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

The project should work as intended. Be careful about the spelling of the image names since the ones in the book do not all match the supplied files, (missing caps on "iMac" in the image files) so code copied directly from the book will not work.
If you haven't resolved your problem yet, email the project folder to
iPadHelper@me.com
and I will try to see what you did wrong. Seeing if I can find bugs is a good way for me to learn.
Reply With Quote
  #6 (permalink)  
Old August 25th, 2010, 09:10 AM
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

I would check how you set the outlets. A fellow traveller with a similar result sent me their project files, and they had inadvertently set both outlets to the same imageView.
so after the
Code:
[imageView2 setHidden:YES];
call, there was nothing to see.
A quick check would be to comment out this call and rerun the program.
(or just recheck the outlets in Interface Builder.)
Reply With Quote
The Following User Says Thank You to thepianoguy For This Useful Post:
nauticalmac (August 25th, 2010)
  #7 (permalink)  
Old September 18th, 2010, 08:09 PM
Registered User
 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i had a similar issue...my imageView1 was imageview1 (note the caps on the V)...that cost me about 30 minutes of grief, then finally my tag attribute...i had the wrong images set at value 1 and 0...once I swapped them, i was good to go... but that took me a good 60minutes of grief....at least i'm learning. slowly but surely.
Reply With Quote
  #8 (permalink)  
Old January 11th, 2011, 11:50 PM
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Simulator shows only gray view

Hi. I've tried coding the page control and image view app several times. Each time the simulator only shows a gray rectangle. Anyone have an idea what I'm doing wrong?
Thanks,
Dov
Reply With Quote
  #9 (permalink)  
Old January 12th, 2011, 12:21 AM
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

The first thing to check would be to make sure that after making all of your connections in Interface Builder, that you saved your work. Xcode doesn't know about IB edits until they have been saved, just as Interface Builder doesn't know of outlets and actions declared in Xcode until they have been saved. This step is missing in the instructions.(Should have been the end of step 9)
If that doesn't help let me know.
Bob
Reply With Quote
  #10 (permalink)  
Old January 12th, 2011, 07:03 AM
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default That worked

I recreated the project from scratch, saving each time I modified a file. It worked!!

Thanks!!!
Dov
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
Chapter 4 - Two Views, not working for me... bigtalk BOOK: Beginning Ruby on Rails 1 January 3rd, 2008 07:30 AM
2 table views in DropDownList control yukijocelyn ASP.NET 2.0 Basics 31 October 1st, 2007 10:16 PM
Chapter 7 - List Views Not Refreshing VBNovice BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 3 January 31st, 2007 08:26 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 07:42 AM.


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