<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rodrigo Giglio on Medium]]></title>
        <description><![CDATA[Stories by Rodrigo Giglio on Medium]]></description>
        <link>https://medium.com/@rodrigofgiglio?source=rss-8c8697f25ad0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*GINcHtTv04ppTobX.jpg</url>
            <title>Stories by Rodrigo Giglio on Medium</title>
            <link>https://medium.com/@rodrigofgiglio?source=rss-8c8697f25ad0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 11:15:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rodrigofgiglio/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to create a UIProgressView with gradient progress in Swift]]></title>
            <link>https://medium.com/academy-poa/how-to-create-a-uiprogressview-with-gradient-progress-in-swift-2d1fa7d26f24?source=rss-8c8697f25ad0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d1fa7d26f24</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift-programming]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[uikit]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Rodrigo Giglio]]></dc:creator>
            <pubDate>Wed, 05 Aug 2020 16:49:38 GMT</pubDate>
            <atom:updated>2025-04-04T08:53:11.862Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to create a UIProgressView with gradient progress in UIKit</h3><p>I am an iOS engineer, and last week I was converting a UI design into a screen on Xcode&#39;s interface builder, when I faced this layout:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*Ge0Q4E5FGqETGqC0YfD7dA.png" /><figcaption>Interface design with a progres view containing a gradient fill.</figcaption></figure><p>So, the designer wanted a progress view containing a gradient fill, and this is how I built it on code:</p><p>First of all, I&#39;ve created a UIImage extension to initiate it with an array of UIColor, which will be turned into a gradient. Also, I created a GradientOrientation enum to specify if the gradient is vertical or horizontal. This way, we can use the UIImage init in other UI components, such as UIImageView.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d4c12139c1ac437710263c3be4ea96e7/href">https://medium.com/media/d4c12139c1ac437710263c3be4ea96e7/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f67a0526acdf115e0832f58974b40e6/href">https://medium.com/media/7f67a0526acdf115e0832f58974b40e6/href</a></iframe><p>Finally I&#39;ve created the GradientProgressView, a class extended from UIProgressView which contains firstColor and secondColor. These variables were marked as IBInspectable, so they can be assigned at the Interface Builder. By changing these colors either on storyboard or on code, the progress view&#39;s progressImage will be set as a gradient starting at firstColor and ending at secondColor.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d6168448f0ac6c76202477e94f110caf/href">https://medium.com/media/d6168448f0ac6c76202477e94f110caf/href</a></iframe><p>That being done, we just need to change the GradientProgressView&#39;s first and second colors and <em>voilà</em>, our progress views are now gradient-ready.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*yLnATbORGk40kTX9Israzg.png" /><figcaption>Gradient progress view examples</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d1fa7d26f24" width="1" height="1" alt=""><hr><p><a href="https://medium.com/academy-poa/how-to-create-a-uiprogressview-with-gradient-progress-in-swift-2d1fa7d26f24">How to create a UIProgressView with gradient progress in Swift</a> was originally published in <a href="https://medium.com/academy-poa">Swift Developer Academy Porto Alegre</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>