Re: UI to allow user to scale and crop image within a circle

2016-02-24 Thread David Duncan
> On Feb 23, 2016, at 7:17 PM, Quincey Morris > wrote: > > On Feb 23, 2016, at 18:50 , Charles Jenkins wrote: >> >> I draw based on the overlay view’s frame, NOT based on the rect that gets >> passed in to drawRect(). I must not understand what that parameter is for. > > From the UIView doc

IB and size class-based constraints

2016-02-24 Thread Rick Mann
I have a size class-enabled storyboard with a view controller that contains two view. They are to be stacked in everything except a compact height situation, in which case they should be side-by-side. So, the lower view has two top constraints. One specifies the space to the other view, the oth

Re: ARC code in a non ARC app. iOS

2016-02-24 Thread Dave
Also, beware subclassing a Non-ARC Class in an ARC Project - you have to have the subclass Non-ARC too. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderator

Re: UI to allow user to scale and crop image within a circle

2016-02-24 Thread Charles Jenkins
Good tip! Thanks, Dave and Quincey. I was pretty sure the problem was something embarrassingly basic. The next step is to redesign the CircleOverlayView to fill its view with black except for the center of the circle. I already learned that filling the view with black and then filling the circl

Re: UI to allow user to scale and crop image within a circle

2016-02-24 Thread David Duncan
> On Feb 24, 2016, at 4:08 AM, Charles Jenkins wrote: > > Good tip! Thanks, Dave and Quincey. I was pretty sure the problem was > something embarrassingly basic. > > The next step is to redesign the CircleOverlayView to fill its view with > black except for the center of the circle. I already

When to remove Gesture Recognizers

2016-02-24 Thread Dave
Hi All, I’m adding a Gesture Recognizer to a view in the awakeFromNIB method. This works ok but I’m getting crashes sometimes and I’m wonder it its because I’m not removing it? If so, when is the best place to call RemoveGestureRecognizer? Thanks a lot All the Best Dave __

Re: When to remove Gesture Recognizers

2016-02-24 Thread Quincey Morris
On Feb 24, 2016, at 12:17 , Dave wrote: > > I’m adding a Gesture Recognizer to a view in the awakeFromNIB method. This > works ok but I’m getting crashes sometimes and I’m wonder it its because I’m > not removing it? If so, when is the best place to call > RemoveGestureRecognizer? I add them

Re: UI to allow user to scale and crop image within a circle

2016-02-24 Thread Graham Cox
> On 24 Feb 2016, at 11:08 PM, Charles Jenkins wrote: > > My guess is, you do this by adding a mask layer; but you probably don’t > redraw the mask in drawRect(), hm? It should never need to be refreshed > unless the bounds change. Can you not just use a clipping path? They’re usually much e

Re: UI to allow user to scale and crop image within a circle

2016-02-24 Thread David Duncan
> On Feb 24, 2016, at 1:44 PM, Graham Cox wrote: > > >> On 24 Feb 2016, at 11:08 PM, Charles Jenkins wrote: >> >> My guess is, you do this by adding a mask layer; but you probably don’t >> redraw the mask in drawRect(), hm? It should never need to be refreshed >> unless the bounds change. >

Re: UI to allow user to scale and crop image within a circle

2016-02-24 Thread Quincey Morris
On Feb 24, 2016, at 13:44 , Graham Cox wrote: > > However, if you use a clipping path, you can just create this on the fly as > part of -drawRect: and so it’ll always be correct I don’t recall Charles’s drawing code exactly, but I think this is just part of the solution. It’ll always be correc

Re: UI to allow user to scale and crop image within a circle

2016-02-24 Thread David Duncan
> On Feb 24, 2016, at 3:47 PM, Quincey Morris > wrote: > > On Feb 24, 2016, at 13:44 , Graham Cox > wrote: >> >> However, if you use a clipping path, you can just create this on the fly as >> part of -drawRect: and so it’ll always be correct > > I don’t recall

Re: ARC code in a non ARC app. iOS

2016-02-24 Thread Greg Parker
> On Feb 24, 2016, at 2:31 AM, Dave wrote: > > Also, beware subclassing a Non-ARC Class in an ARC Project - you have to have > the subclass Non-ARC too. This is not true. For example, NSView is not ARC but you can write ARC subclasses of it. -- Greg Parker gpar...@apple.com Runtime

Re: ARC code in a non ARC app. iOS

2016-02-24 Thread Britt Durbrow
Tangentially related: I have a bug ( rdar://10894595 ) open on the Developer Tools (Xcode/clang) to add a #pragma to turn on/off ARC in the source code, for dealing with just such situations. I dunno’ how much work it would be to implement… I imagine not all that much for somebody familiar wi