Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

border color as gradient #6

Open
ahmedsafadii opened this issue Apr 14, 2019 · 5 comments
Open

border color as gradient #6

ahmedsafadii opened this issue Apr 14, 2019 · 5 comments

Comments

@ahmedsafadii
Copy link

It's possible to make it only for the border of view or image !? it would be something amazing

@dqhieu
Copy link
Owner

dqhieu commented Apr 15, 2019

Hi @ahmedsafadii , this idea is amazing. Unfortunately, the current version doesn't support adding gradient to border.

@ahmedsafadii
Copy link
Author

Well Looks like you are doing it and current version support it you can update the readme file 😂😂 , i try my best to do it and yaaaay it’s works, what you have to do is simple
Example for border gradient and static
https://prnt.sc/nc2o1r

2 simple lines

view.layer.borderWidth = 3
view.layer.borderColor = UIColor.fromGradientWithDirection(.topToBottom, frame: frame, colors: [UIColor.blue, UIColor.green]).?cgColor

😍😍😍😍

Thanks me later 😆😱😆😱

@dqhieu
Copy link
Owner

dqhieu commented Apr 15, 2019

Hi @ahmedsafadii , thank for you help. Anw, I can not see the image on your link 😂

@ahmedsafadii
Copy link
Author

https://ibb.co/WGmHJ83

Try now 🥰

@dqhieu
Copy link
Owner

dqhieu commented Apr 15, 2019

Thank @ahmedsafadii , added to UIGradient 1.4 board: #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants