 |
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

July 7th, 2010, 05:04 PM
|
|
Registered User
|
|
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

July 14th, 2010, 01:33 AM
|
|
Registered User
|
|
Join Date: Jul 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

July 14th, 2010, 02:15 AM
|
|
Registered User
|
|
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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..
|
|

August 24th, 2010, 07:10 AM
|
|
Registered User
|
|
Join Date: Aug 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Same problem
Did you resolve this? I have the same issue, the viewDidLoad code is not displaying an image.
|
|

August 24th, 2010, 12:35 PM
|
|
Friend of Wrox
|
|
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
|
|
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
[email protected]
and I will try to see what you did wrong. Seeing if I can find bugs is a good way for me to learn.
|
|

August 25th, 2010, 09:10 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
|
|
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.)
|
|
The Following User Says Thank You to thepianoguy For This Useful Post:
|
|
|

September 18th, 2010, 08:09 PM
|
|
Registered User
|
|
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|

January 11th, 2011, 11:50 PM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

January 12th, 2011, 12:21 AM
|
|
Friend of Wrox
|
|
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
|
|
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
|
|

January 12th, 2011, 07:03 AM
|
|
Registered User
|
|
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
That worked
I recreated the project from scratch, saving each time I modified a file. It worked!!
Thanks!!!
Dov
|
|
 |
|