• 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
Re: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)


  • Subject: Re: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)
  • From: Matt Neuburg <email@hidden>
  • Date: Sat, 18 Jun 2011 09:05:45 -0700

On Sun, 12 Jun 2011 14:30:42 +1000, Brian Bruinewoud <email@hidden> said:
>Hi All,
>
>I have an app that consists of a scroll view subclass which contains a single subview. In the scroll view subclass I override layoutSubviews based on Apple sample code (see below). The intention of layoutSubviews is to centre the subview in the scrollview when the subview is smaller than the scrollview's display area.
>
>There are three circumstances where the layoutSubviews is called but in one of them the visual results are incorrect.

Funny you should mention this, since I was just experimenting with the same issue. What I ended up doing is setting the contentOffset explicitly after the zoomScale changes.

https://github.com/mattneub/Programming-iOS-4-Book-Examples/tree/master/p492zoomCentered

m.

--
matt neuburg, phd = email@hidden, <http://www.apeth.net/matt/>
A fool + a tool + an autorelease pool = cool!
Programming iOS 4!
http://www.apeth.net/matt/default.html#iosbook_______________________________________________

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: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)
      • From: Brian Bruinewoud <email@hidden>
  • Prev by Date: Re: Temporarily enabling layer backing for NSView
  • Next by Date: Re: Writing extremely large RTF or .doc files
  • Previous by thread: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)
  • Next by thread: Re: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)
  • Index(es):
    • Date
    • Thread