tadija/AEConicalGradient

Support for offset angle

davidmuzi opened this issue · 7 comments

Could you add support for setting the starting angle for the GradientLayer?

I got this to work by adding an offset to the angle property in drawRect before calling colorForAngle

I can't even get it to build!

installed correctly with cocoa pods, but when I do a test build in Xcode I get compiler errors. Does anyone have a working version of this? Would be so happy if I could get this up and running.

Hi @scottpgreen1972, it's not yet completely updated for Swift 3, but at least build should work from develop branch (master is still old version).

Hi tadija! brilliant work by the way, really love it! just wish it would compile! I'm using the develop branch in Xcode beta 2 and I'm getting 12 errors. Looking through them, a few are to do with outdated syntax, so probably no major problem - but the one that really stops it appears to be a 'method does not override any method from its superclass' error on the public override class func layerClass() in AEConicalGradientView.swift. I am a complete noob at this, so apologies if I am missing something completely obvious, but I just don't know what to do! Any help you could give would be massively appreciated!

Scott

Hi @davidmuzi, thanks for suggestion, I've added startAngle and endAngle properties in 2.0.0.

@scottpgreen1972 try new version, it's just published now.

Brilliant!

Got it working now. Really excellent work. How can I alter the size of the layer? I don;t want the gradient to fill the whole screen

On 26 Oct 2016, at 22:49, Marko Tadić notifications@github.com wrote:

Hi @davidmuzi https://github.com/davidmuzi, thanks for suggestion, I've added startAngle and endAngle properties in 2.0.0.

@scottpgreen1972 https://github.com/scottpgreen1972 try new version, it's just published now.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #1 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AVg71-fhwi9bhV9q863YVItKvkJWfi2Jks5q38rNgaJpZM4KL4ys.

Thanks, @tadija Ill give it a try.

@scottpgreen1972 can you please create a new issue and continue your discussion there? Lets keep this issue on topic.

Sure thing David.

I’m very new to Github, so apologies while I feel my way around.

On 27 Oct 2016, at 22:09, David Muzi notifications@github.com wrote:

Thanks, @tadija https://github.com/tadija Ill give it a try.

@scottpgreen1972 https://github.com/scottpgreen1972 can you please create a new issue and continue your discussion there? Lets keep this issue on topic.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #1 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AVg717LYnYY0_FcExtCfKIUXubDrkzx0ks5q4RMMgaJpZM4KL4ys.