johankasperi / SwiftHSVColorPicker

Simple HSV Color Picker for iOS written in Swift.
MIT License
95 stars 34 forks source link

Subviews size fit #5

Closed gunawanlie closed 8 years ago

gunawanlie commented 8 years ago

the subviews of color picker view originally rely only to the superview bounds width, which sometimes cause the subviews frame exceed the superview frame.

i add some calculation to find the biggest subviews frame that is not exceed the superview frame

johankasperi commented 8 years ago

Thanks for your help! Your changes has now been merged and released in the latest version.

gunawanlie commented 8 years ago

Yup, i saw the previous message. Its ok, your welcome, its a cool project, i am using it in my personal project too.

Hopefully one day someone or me, can change the views to use nslayoutconstraint, so it ll be nicer.

On Sunday, 22 May 2016, Johan Kasperi notifications@github.com wrote:

Thanks for your help! Your changes has now been merged and released in the latest version.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/johankasperi/SwiftHSVColorPicker/pull/5#issuecomment-220834273

Cheers, Lie Gunawan

johankasperi commented 8 years ago

Awesome! Glad you like it.

Yeah if you have any future request of improvements then I will gladly merge them into the project.

gunawanlie commented 8 years ago

Actually my pull request hasn't really solve the problem of issue 4 ( https://github.com/johankasperi/SwiftHSVColorPicker/issues/4)

my code changes only help a bit in the case where the height of the Superview is smaller than the width.

but the width itself still referring to the self.bounds.width where this width still depend on the initialize time for the colorpicker

well if they guy who open the issue#4 initialize it at viewDidAppear or using width constraint like in the example, it should be fine.

just fyi

On Sun, May 22, 2016 at 10:11 PM, Johan Kasperi notifications@github.com wrote:

Awesome! Glad you like it.

Yeah if you have any future request of improvements then I will gladly merge them into the project.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/johankasperi/SwiftHSVColorPicker/pull/5#issuecomment-220834533

Cheers, Lie Gunawan

johankasperi commented 8 years ago

Oh I didn't really thought of that. Thanks for the heads up.