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

2016-02-23 Thread Charles Jenkins
Still struggling with this… My scrollview containing an imageview seems to work just fine: I can scale and crop an image with no problem. But I’m having difficulty getting the desired “crop circle” to hover over the scrollview properly. When I add it to the main view (not the scrollview) at runt

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

2016-02-23 Thread Jonathan Hull
Have you looked at cocoa controls? I am pretty sure I have seen a few open source projects that do this. www.cocoacontrols.com Thanks, Jon > On Feb 23, 2016, at 4:28 AM, Charles Jenkins wrote: > > Still struggling with this… My scrollview containing an imagevie

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

2016-02-23 Thread Quincey Morris
On Feb 23, 2016, at 04:28 , Charles Jenkins wrote: > > My scrollview containing an imageview seems to work just fine: I can scale > and crop an image with no problem. But I’m having difficulty getting the > desired “crop circle” to hover over the scrollview properly. It’s not clear to me exact

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

2016-02-23 Thread Charles Jenkins
Jon: Thanks for that advice. I’ll have a look! Quincey: I start with a screen in the storyboard and its default view I’ll call “superview.” Into the superview I toss a scrollview and a toolbar with Cancel and Crop buttons. I position them with autolayout and wire them up to my Swift view cont

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

2016-02-23 Thread Quincey Morris
On Feb 23, 2016, at 12:32 , Charles Jenkins wrote: > > This is the first time I’ve tried to inject an overlay view into the view > hierarchy, so I’m probably doing it completely wrong or missing something > very basic. I’d suggest you go and watch the WWDC videos about advanced scroll view usa

ARC code in a non ARC app. iOS

2016-02-23 Thread Alex Zavatone
Hi all. I'm in the middle of looking at an interesting problem on the iOS side. We have our code that is ARC and uses external compiled C libs that I'm being asked to plug into another iOS project that's significantly larger than ours. The intent is to run as a little service that can be launch

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Greg Parker
> On Feb 23, 2016, at 1:30 PM, Alex Zavatone wrote: > > Hi all. I'm in the middle of looking at an interesting problem on the iOS > side. > > We have our code that is ARC and uses external compiled C libs that I'm being > asked to plug into another iOS project that's significantly larger tha

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Quincey Morris
On Feb 23, 2016, at 13:30 , Alex Zavatone wrote: > > Now, I'm familiar with the -fno-objc-arc build flags to disable compiling one > file at a time, but is there any possibility to include iOS code that does > use ARC within an app that doesn't? You can mix-and-match ARC source with non-ARC (M

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Alex Zavatone
Yeah, it does. I was thinking about it bassackwardsly. Would it be recommended to package my ARC code with ARC turned off and package that in a framework and then link to that from the non ARC app that will need to load it? Thank you, sir. AZ Sent from my iPhone > On Feb 23, 2016, at 6:16

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Alex Zavatone
Ok. Great. I knew there would be some scariness in there I'd need to know about. Are there any tools in Instruments or approaches to make sure I'm not going to destroy the universe when calling my stuff? I'm planning on starting by loading a placeholder one screen storyboard as an initial test

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Greg Parker
> On Feb 23, 2016, at 3:25 PM, Alex Zavatone wrote: > > Would it be recommended to package my ARC code with ARC turned off and > package that in a framework and then link to that from the non ARC app that > will need to load it? Building a separate dylib or static archive is not necessary, bu

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Alex Zavatone
Aha! Awesome. That will work nicely. Now my concern is the compiled c lib that my code links to. Do I also have to rebuild that with non ARC flags too? Sent from my iPhone > On Feb 23, 2016, at 6:33 PM, Greg Parker wrote: > > >> On Feb 23, 2016, at 3:25 PM, Alex Zavatone wrote: >> >> Wo

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Quincey Morris
On Feb 23, 2016, at 15:25 , Alex Zavatone wrote: > > Would it be recommended to package my ARC code with ARC turned off and > package that in a framework and then link to that from the non ARC app that > will need to load it? This would be a really bad idea. :) Your code has no retains and rel

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Greg Parker
> On Feb 23, 2016, at 3:46 PM, Alex Zavatone wrote: > > Aha! > > Awesome. That will work nicely. > > Now my concern is the compiled c lib that my code links to. Do I also have > to rebuild that with non ARC flags too? The ARC flags only affect the Objective-C and Objective-C++ compilers. P

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Alex Zavatone
Ok time for me to establish base test cases in very simple cases first. Sent from my iPhone > On Feb 23, 2016, at 6:47 PM, Quincey Morris > wrote: > >> On Feb 23, 2016, at 15:25 , Alex Zavatone wrote: >> >> Would it be recommended to package my ARC code with ARC turned off and >> package th

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

2016-02-23 Thread Charles Jenkins
I might’ve solved this. My overlay view works now because 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. I guess the pinning constraints were working all along, but I just couldn’t tell because

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

2016-02-23 Thread Quincey Morris
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 documentation for ‘drawRect’: > The portion of the view’s bounds that ne