Hacker News new | past | comments | ask | show | jobs | submit login
Swift Gradient in 4 lines of code (medium.com/adriano_87556)
8 points by atriana26 on April 17, 2019 | hide | past | favorite | 2 comments



Pretty misleading title. This isn't a bit of graphical code golf using Swift. It's a single call to a gradient API, and even that is independent of Swift.


Well yeah, it’s a few Core Graphics calls, just like it has been from Objective C since OS X was born. This is something CG has built-in, not a feature of Swift.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: