<?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 Victor Sukochev on Medium]]></title>
        <description><![CDATA[Stories by Victor Sukochev on Medium]]></description>
        <link>https://medium.com/@Victor_Sukochev?source=rss-beb46aa85f98------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*KW9XsDNGOmcvwTmN.png</url>
            <title>Stories by Victor Sukochev on Medium</title>
            <link>https://medium.com/@Victor_Sukochev?source=rss-beb46aa85f98------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 08:58:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Victor_Sukochev/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[Macaw iOS Library: Morphing Animations]]></title>
            <link>https://medium.com/@Victor_Sukochev/macaw-ios-library-morphing-animations-and-touch-events-a4cb1c0be97f?source=rss-beb46aa85f98------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4cb1c0be97f</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Victor Sukochev]]></dc:creator>
            <pubDate>Wed, 10 May 2017 12:21:57 GMT</pubDate>
            <atom:updated>2017-05-10T13:01:30.193Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="http://github.com/exyte/macaw">Macaw</a> is an open source library which makes vector graphics drawing and animation <a href="https://medium.com/exyte/how-friendly-can-drawing-api-be-on-ios-b3a818bf8105#.xz21lyxxr">easy and enjoyable</a>. Not long ago we released the 0.8.2 version with interesting updates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q2i38GVDdP9HywH79KTBUg.png" /></figure><h4>Morphing Animations</h4><p>From the beginning of this project we wanted to implement smooth transformation between shapes. Ability to morph paths into other arbitrary paths provides a way to create complex effects. We introduced a new member of the animation’s family — Morphing Animation.</p><p>Let’s start with a simple transformation of one shape into another:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/95394630df422a7fefd3c7f2e3930ec8/href">https://medium.com/media/95394630df422a7fefd3c7f2e3930ec8/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/179/1*XbSxykZqb5YrZGnUBFYRSQ.gif" /></figure><p>Other shape’s properties can be animated the same way:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6d2fb3c5e10138fbe23e81babea5aaa2/href">https://medium.com/media/6d2fb3c5e10138fbe23e81babea5aaa2/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*K7ugW_uCt-c8gLLXQwTB_Q.gif" /></figure><p>In real cases, a single shape is not enough — we are happy to introduce optimized animation for group contents:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4fd144f7d3cf4ce1d63992764922323a/href">https://medium.com/media/4fd144f7d3cf4ce1d63992764922323a/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/167/1*k7d9pex-Zkj9IGR8TkrzGQ.gif" /></figure><p>With some imagination you can create really wonderful transformations</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c59533b2b93d6f06704d7eed80f4c596/href">https://medium.com/media/c59533b2b93d6f06704d7eed80f4c596/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*cYPI6fKAMvBxTrrPFi0T_Q.gif" /></figure><h4>Touch Events</h4><p>We also made improvements to the existing API. For example, new touch events API additions to make more advanced touch events handling possible:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14af713fad6529be898aaab04f8db2b1/href">https://medium.com/media/14af713fad6529be898aaab04f8db2b1/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*sCYj-W09TqJxt6XDgZMOMA.gif" /></figure><p>We welcome everyone to try and experiment with it on their own.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4cb1c0be97f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How friendly can drawing API be on iOS?]]></title>
            <link>https://medium.com/@Victor_Sukochev/how-friendly-can-drawing-api-be-on-ios-b3a818bf8105?source=rss-beb46aa85f98------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3a818bf8105</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Victor Sukochev]]></dc:creator>
            <pubDate>Wed, 28 Dec 2016 14:10:15 GMT</pubDate>
            <atom:updated>2016-12-28T14:10:15.696Z</atom:updated>
            <content:encoded><![CDATA[<p>My name is Victor Sukochev and I’m an iOS developer at <a href="http://www.exyte.com/">Exyte</a>. Recently we open sourced <a href="https://github.com/exyte/Macaw">Macaw</a> — a library for drawing and animating vector graphics. In this article I’d like to share my thoughts about Macaw’s advantages over native API.</p><p>There is often a necessity to create custom UI controls and repeat the same CoreGraphics routines to achieve even simplest effects:</p><ul><li>Inherit from <em>UIView</em> in order to override <em>drawRect</em> method</li><li>Use outdated drawing API</li></ul><p>Let’s try to build the following custom control and use it as an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*9Ek0cUNSwzZfkGjPwjMujA.gif" /><figcaption>Custom control</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9781beb0ae734d80b03599eb60b9ac7c/href">https://medium.com/media/9781beb0ae734d80b03599eb60b9ac7c/href</a></iframe><p>We decided to get rid of such routine and created Macaw. It can be used to describe a scene in a clear and functional way:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/73f389a8f09063d147c7d9b3068417d8/href">https://medium.com/media/73f389a8f09063d147c7d9b3068417d8/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*mdJUXjAC4YdQUW8ffp6gSA.gif" /><figcaption>Left: Core Graphics, Right: Macaw</figcaption></figure><p>As you can see, our scene is described as a model which can be reused and modified. You can build complex hierarchies with relative characteristics (e.g. position, opacity) by using the <em>Group</em> node type:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/71b46871bdc21cc5a7c99d70cbeee3e8/href">https://medium.com/media/71b46871bdc21cc5a7c99d70cbeee3e8/href</a></iframe><p>I don’t even want to think about maintaining such a hierarchy using pure CoreGraphics. To use the power of Macaw you only need to inherit your control view class from <em>MacawView</em> or use <em>MacawView</em> as a container and let the magic begin. An added benefit is that any change to the scene’s properties will automatically trigger a content update for the view.</p><p>There is one more thing required to produce nice visual effects — animation. In raw CoreGraphics API there are basically two ways of doing this:</p><ul><li><em>CAShapeLayer</em> with <em>CABasicAnimation</em> combination. It’s easy, but code still looks outdated:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f1dae7e874be643bf1340d18deb51f11/href">https://medium.com/media/f1dae7e874be643bf1340d18deb51f11/href</a></iframe><ul><li>Use <em>CADisplayLink</em> callback for manual <em>UIView</em> content redrawing. But as a developer I don’t want to go so far for a simple visual effect.</li></ul><p>With Macaw an animation like this can be achieved with a simpler approach:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3bd125415d7c703f52f2141442213404/href">https://medium.com/media/3bd125415d7c703f52f2141442213404/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*U5k1nPn6P0iPU13ymXrl8w.gif" /><figcaption>Left: Core Graphics, Right: Macaw</figcaption></figure><p>That’s it. All routines are now hidden allowing you to focus on the effect logic. Of course there are more options and mechanisms at your disposal. This is one of my favorite animation combination and sequencing:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/852fd9ffde3090682362493a38676e39/href">https://medium.com/media/852fd9ffde3090682362493a38676e39/href</a></iframe><p>Is there any overhead in comparison with CoreGraphics? Under the hood Macaw uses <em>CAKeyframeAnimation</em> and needs to calculate key frames before animation. Other than that it uses the same Core Graphics calls.</p><p>Ok, what about animation of content? Is there any way to animate the state of the model objects or replace an entire model tree with animation? Unfortunately there is no way to optimize this process, so the only solution is to manually redraw the content of a layer. Good news — Macaw has a really beautiful API for that.</p><p>Let’s refactor our code to make generating a model tree easier:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/016f21a1478f93fd586bc4c7f1c2a54c/href">https://medium.com/media/016f21a1478f93fd586bc4c7f1c2a54c/href</a></iframe><p>Now we can implement content animation by replacing the model subtree content every frame:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a6e6ac950339d4e4e18f760357b3157/href">https://medium.com/media/3a6e6ac950339d4e4e18f760357b3157/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*a2UN5Dz5TzgKEEOIGPKg2Q.gif" /><figcaption>Content animation</figcaption></figure><p>Even with a complex scene only the subtree area will be redrawn via animation.</p><p>We can achieve the same performance with more readable and supportable code by using Macaw. There is still functionality left to cover, but I hope this sneak peek will interest you enough to give Macaw a try in your projects. We are continuously improving it and all suggestions and contributions are welcome.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3a818bf8105" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>