Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-30-2011, 08:39 PM   #1 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 31
bagusflyer is on a distinguished road
Default UIPageViewController and Zoom in/out

There is a new View Controller in iOS 5: UIPageViewController which supports to turn page like a real book. Everything is what I want only one thing, it doesn't support zoom in/out.

For a page in portrait mode (single side) is no problem, I can add a UIScrollView to the controller than I add the page to the UIScrollView. But this method doesn't work for the pages in landscape mode ( 2 pages in this case, double sided). Are there any suggestions for this?

Thanks
bagusflyer is offline   Reply With Quote
Old 10-30-2011, 10:02 PM   #2 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 31
bagusflyer is on a distinguished road
Default

Take the sample code generated by the Xcode page view template as an example. I find a way to enable UIPageViewController to zoom in/out.

I add a scrollview to RootViewController's view. And then add UIPageViewController's view as a subview of this scrollview. Then the zoom in/out works in both portrait and landscape mode. But another problem arise. After I zoom in the view, the page turning gesture doesn't work anymore. I think this may because of the conflict between scrollview's gesture and pageview's gesture. Any way to overcome this? Thanks
bagusflyer is offline   Reply With Quote
Old 10-31-2011, 08:40 PM   #3 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 31
bagusflyer is on a distinguished road
Default

I noticed that there is a statement like this:

Code:
    self.view.gestureRecognizers = self.pageViewController.gestureRecognizers;
So I change it to:


Code:
    self.scrollView.gestureRecognizers = self.pageViewController.gestureRecognizers;
But it crashes, the error message is something like:

*** -[UIScrollViewPanGestureRecognizer setMaximumNumberOfTouches:]: message sent to deallocated instance 0x6b80150

Any idea? Thanks
bagusflyer is offline   Reply With Quote
Old 11-02-2011, 09:10 PM   #4 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 31
bagusflyer is on a distinguished road
Default

Any suggestions, please!
bagusflyer is offline   Reply With Quote
Old 11-06-2011, 09:22 PM   #5 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 31
bagusflyer is on a distinguished road
Default

Nobody use the UIPageViewController? And nobody need it be zoomable?

I think if you use it for a pdf reader, definitely you need to zoom in/out, how do you implement the zoom in/out functions?
bagusflyer is offline   Reply With Quote
Old 11-23-2011, 12:00 AM   #6 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 31
bagusflyer is on a distinguished road
Default

Any idea?
bagusflyer is offline   Reply With Quote
Old 12-02-2011, 05:32 PM   #7 (permalink)
Registered Member
 
zhoukaihang's Avatar
 
Join Date: Jan 2009
Posts: 56
zhoukaihang is on a distinguished road
Default

You found the solution ? Normally don't expect anybody will help you in this forum.
__________________
Why waste money on psychotherapy when you can listen to the B Minor Mass?
zhoukaihang is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 405
13 members and 392 guests
13dario13, 7twenty7, buggen, EvilElf, glenn_sayers, j.b.rajesh@gmail.com, LunarMoon, morterbaher, QuantumDoja, sacha1996, Sami Gh, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,673
Threads: 94,122
Posts: 402,906
Top Poster: BrianSlick (7,990)
Welcome to our newest member, morterbaher
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:31 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0