Wrox Programmer Forums
|
BOOK: Beginning iOS 4 Application Development
This is the forum to discuss the Wrox book Beginning iOS 4 Application Development by Wei-Meng Lee; ISBN: 978-0-470-91802-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iOS 4 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
 
Old April 14th, 2011, 05:00 PM
Authorized User
 
Join Date: Apr 2011
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Default

One other thing, in your code you center the image, but it's not the case all time, i just want when i (pinch out/ double tape) to comeback to the original display. Thanks.
 
Old April 15th, 2011, 08:39 AM
Friend of Wrox
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

The cocoawithlove site has some very informative articles. The link that you posted addresses zooming and also scaling while rotating the image in tandem with the screen (i.e. at a 45 degree turn the image diagonal has been sized to the screen width). It looks very slick. Handling rotation wasn't part of your original post. Your original post addressed making images go to full screen if not full screen, and reduce to original size if full screen. The cocoawithlove link does this nicely, (as does mine, without the cool rotation and no eyecandy, but I was only trying to demonstrate function not form) but if you have run the code, you can see that the image "fills" the screen with a border. Running the project with different aspect ratio images results in different borders. None of them completely fill the screen. In the cocoawithlove example, even if the image was proportional to the screen (320 x 460), by design he has a black border around the image.
Regarding having images not necessarily being centered, you simply need to store a CGPoint with the original location (either the origin or center) and when doing the CGAffineTransform exiting full screen, set the image's location at that point.

Bob

Last edited by thepianoguy; April 16th, 2011 at 07:09 AM.. Reason: typo
 
Old April 15th, 2011, 05:03 PM
Authorized User
 
Join Date: Apr 2011
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Thanks, you're right in my post i don't said any thing about rotation because i want just a full screen with pinch and tap. Can i integrate a border to fill the screen let's say black border? Thanks.
 
Old April 15th, 2011, 08:05 PM
Registered User
 
Join Date: Apr 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

lose fat, fast weight loss, weight loss program, The biggest deal for people today is how bigger they look and not how much weight they gain.
 
Old April 16th, 2011, 07:13 AM
Friend of Wrox
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

A border can be added. The cocoawithlove link project handles it that way. Check out how the GradientBackgroundView is implemented and used in that example.

Bob
 
Old April 16th, 2011, 09:48 AM
Authorized User
 
Join Date: Apr 2011
Posts: 18
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Thank you very much. my problem is now solved really big thanks for your effort and great code .

Regards.
 
Old April 17th, 2011, 12:00 PM
Friend of Wrox
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

I am glad you have solved your problem.

Bob





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 14, first 'Try It Out' alharlow BOOK: Beginning ASP.NET 4 : in C# and VB 5 March 18th, 2011 05:00 AM
Chapter 13 Gestures thepianoguy BOOK: Beginning iPad Application Development 0 September 20th, 2010 11:30 AM
Chapter 14 example pkumar@ech BOOK: Professional Jakarta Struts 0 November 15th, 2006 09:10 AM
Chapter 14 JonG BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 1 March 21st, 2006 10:04 PM
Chapter 14 Mike Smith BOOK: Professional C#, 2nd and 3rd Editions 2 January 4th, 2004 05:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.