• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UIScrollView - photo viewer like usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UIScrollView - photo viewer like usage


  • Subject: UIScrollView - photo viewer like usage
  • From: Ruotger Skupin <email@hidden>
  • Date: Tue, 10 Feb 2009 12:55:59 +0100

Hi,

this is going to sound like an angry rant but actually it isn't. I'm simply a bit frustrated...

I have been trying to use UIScrollView to build an Photo app-like image viewer. The view is supposed to show photos with swiping between them, zooming and rotating with interface rotation.

It seems this is impossible. When you add more than one subview to UIScrollView, zooming seems to be broken beyond repair with strange behaviour all over the place, no control over the subviews while zooming and weird whizzing of views when the zooming ends. It's hard to post Radar bugs here, because there is only little documentation of what should actually happen or what can be done when

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView: (UIView *)view atScale:(float)scale


is called.

So my questions:

Has anyone done this successfully (with UIScrollView)?
Is it better to re-implement all this with layers to have more control over everything?


To Apple people:
Does it make sense to spend a support incident on this or is it just a waste of everyone's time.


Regards and no offence meant
	Ruotger

P.S.: to see what I mean download the Scrolling sample and add these methods to MyViewController:

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
	CGPoint offset = scrollView.contentOffset;
	int imageIndex = (int)(floorf(offset.x / kScrollObjWidth));

	if (imageIndex >= 0 && imageIndex < [[scrollView1 subviews] count])
		return [[scrollView1 subviews] objectAtIndex:imageIndex];
	return nil;
}

- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView: (UIView *)view atScale:(float)scale
{


}

// and add this to -[MyViewController viewDidLoad]:

	scrollView1.minimumZoomScale = 1;
	scrollView1.maximumZoomScale = 3;
	scrollView1.delegate = self;

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: UIScrollView - photo viewer like usage
      • From: Daryl Thachuk <email@hidden>
  • Prev by Date: Re: NSCollectionView: Different-sized items? Docs?
  • Next by Date: Inserting node in an OutlineView bound to a TreeController and preserve expanded items
  • Previous by thread: Re: ACLs, ACE and ls -e / chmod
  • Next by thread: Re: UIScrollView - photo viewer like usage
  • Index(es):
    • Date
    • Thread