• 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: Programmatically pinch a UIView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically pinch a UIView


  • Subject: Re: Programmatically pinch a UIView
  • From: Carl Hoefs <email@hidden>
  • Date: Wed, 11 May 2016 13:56:27 -0700

> On May 11, 2016, at 1:51 PM, Carl Hoefs <email@hidden> wrote:
>
> On May 11, 2016, at 1:45 PM, Carl Hoefs <email@hidden> wrote:
>>
>>> On May 11, 2016, at 1:38 PM, David Duncan <email@hidden> wrote:
>>>
>>>> On May 11, 2016, at 1:32 PM, Carl Hoefs <email@hidden> wrote:
>>>>
>>>> In iOS 9.3, I have a UIView that displays a graph, and the view is pinchable. That works fine but I want to programmatically pinch the UIView so the default display initially shows the graph a bit smaller. How can I do this? Alternately, I've tried setting self.view.contentScaleFactor but this property seems to have no effect.
>>>
>>> contentScaleFactor determines the pixel : point relationship when using -drawRect: on a view. You want to set the transform for something like this (note that this will affect the view’s frame as well).
>>
>> Right, I was hoping there was a way to initially programmatically pinch the view down by 10%, so the view's frame isn't reduced as well. Then the user can pinch it to zoom in/out as desired.
>
> Would it help if I changed my UIView to be a UIScrollView instead? Then I could use -setZoomScale:.

I just tried UIScrollView & -setZoomScale:. No effect.
-Carl



_______________________________________________

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: Programmatically pinch a UIView
      • From: Quincey Morris <email@hidden>
References: 
 >Programmatically pinch a UIView (From: Carl Hoefs <email@hidden>)
 >Re: Programmatically pinch a UIView (From: David Duncan <email@hidden>)
 >Re: Programmatically pinch a UIView (From: Carl Hoefs <email@hidden>)
 >Re: Programmatically pinch a UIView (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: Programmatically pinch a UIView
  • Next by Date: Re: Programmatically pinch a UIView
  • Previous by thread: Re: Programmatically pinch a UIView
  • Next by thread: Re: Programmatically pinch a UIView
  • Index(es):
    • Date
    • Thread