<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Eon</title>
    <description>The latest articles on DEV Community by Eon (@eonist).</description>
    <link>https://dev.to/eonist</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F27581%2F54621121-320a-40c7-b52a-9e0d8bfc75b8.jpeg</url>
      <title>DEV Community: Eon</title>
      <link>https://dev.to/eonist</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eonist"/>
    <language>en</language>
    <item>
      <title>FlowLayout - A minimal layout kit </title>
      <dc:creator>Eon</dc:creator>
      <pubDate>Sun, 05 Aug 2018 13:30:41 +0000</pubDate>
      <link>https://dev.to/eonist/flowlayout-521i</link>
      <guid>https://dev.to/eonist/flowlayout-521i</guid>
      <description>&lt;h3&gt;
  
  
  Concept:
&lt;/h3&gt;

&lt;p&gt;The idea is to give aspiring app developers a dead simple "vanilla" swift library to start with. Just add some end point calls to instagram and you could literally have a minimal insta client in a day.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frawgit.com%2Fstylekit%2Fimg%2Fmaster%2Fshort.gif" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frawgit.com%2Fstylekit%2Fimg%2Fmaster%2Fshort.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Description:
&lt;/h3&gt;

&lt;p&gt;I wanted to make a very responsive fluid app like instagram or snapchat. But using apples own app framework always ended up feeling kind of outdated and slow. The concept is really simple. It's just 1 horizontal UICollection and 1 vertical UICollection. The current version uses only 1 RootViewController. The CollectionViews are UIViews with delegate handlers. This makes it really easy to transition to another ViewController. And it also enables you to embed FlowLayout in pure UIView setups like an image picker or alike. &lt;/p&gt;

&lt;h3&gt;
  
  
  Pull to refresh:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frawgit.com%2Fstylekit%2Fimg%2Fmaster%2FPhoto%252004-08-2018%2C%252013%252029%252023%2520copy.jpg" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frawgit.com%2Fstylekit%2Fimg%2Fmaster%2FPhoto%252004-08-2018%2C%252013%252029%252023%2520copy.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Compact mode:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frawgit.com%2Fstylekit%2Fimg%2Fmaster%2FPhoto%252004-08-2018%2C%252013%252030%252000%2520copy.jpg" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frawgit.com%2Fstylekit%2Fimg%2Fmaster%2FPhoto%252004-08-2018%2C%252013%252030%252000%2520copy.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Swipe to new pages:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frawgit.com%2Fstylekit%2Fimg%2Fmaster%2FPhoto%252004-08-2018%2C%252013%252029%252043%2520copy.jpg" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frawgit.com%2Fstylekit%2Fimg%2Fmaster%2FPhoto%252004-08-2018%2C%252013%252029%252043%2520copy.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Links:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.producthunt.com/posts/flowlayout" rel="noopener noreferrer"&gt;https://www.producthunt.com/posts/flowlayout&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/eonist/FlowLayout" rel="noopener noreferrer"&gt;https://github.com/eonist/FlowLayout&lt;/a&gt; &lt;/p&gt;

</description>
      <category>ios</category>
      <category>swift</category>
      <category>app</category>
      <category>iphone</category>
    </item>
    <item>
      <title>Prototyping in playground</title>
      <dc:creator>Eon</dc:creator>
      <pubDate>Mon, 31 Jul 2017 02:33:58 +0000</pubDate>
      <link>https://dev.to/eonist/prototyping-in-playground</link>
      <guid>https://dev.to/eonist/prototyping-in-playground</guid>
      <description>&lt;p&gt;Prototyping UI/UX with XCode Playground and Animator a new animation .framework I'm building. The best part? You get native code you can use when building your apps. And it's &lt;a href="https://github.com/gitsync/AnimLib" rel="noopener noreferrer"&gt;OpenSource&lt;/a&gt; .  Check out the examples bellow:&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Let's add some design to it:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fvideo_iphone.gif%3FmaxAge%3D2512168" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fvideo_iphone.gif%3FmaxAge%3D2512168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Peek &amp;amp; Pop is now complete (added dismiss):
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_complete.gif%3FmaxAge%3D2512168" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_complete.gif%3FmaxAge%3D2512168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Modal now remains idle if in prompt state:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_idle.gif%3FmaxAge%3D2512168" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_idle.gif%3FmaxAge%3D2512168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Modal now reveals prompt buttons:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_w_prompt.gif%3FmaxAge%3D2592022" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_w_prompt.gif%3FmaxAge%3D2592022"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Modal now has boundaries w/ log10 (aka slippery friction):
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_log10.gif%3FmaxAge%3D2592003" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_log10.gif%3FmaxAge%3D2592003"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Modal is now draggable w/ easing:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_drag.gif%3FmaxAge%3D2592001" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_drag.gif%3FmaxAge%3D2592001"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Deep click button to activate peek:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_pop.gif%3FmaxAge%3D2592000" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2Fmodal_pop.gif%3FmaxAge%3D2592000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites: (Figure out how ForceTouch works)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2FForceTouchEvent_anim.gif" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2FForceTouchEvent_anim.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources:
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://eon.codes/blog/2017/01/16/playground-and-framework/" rel="noopener noreferrer"&gt;Using Framework files in playground&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article was originally published on my blog &lt;a href="http://eon.codes" rel="noopener noreferrer"&gt;http://eon.codes&lt;/a&gt; &lt;/p&gt;

</description>
      <category>swift</category>
      <category>ios</category>
      <category>ui</category>
      <category>animation</category>
    </item>
    <item>
      <title>ForceTouch in macOS</title>
      <dc:creator>Eon</dc:creator>
      <pubDate>Wed, 26 Jul 2017 12:30:05 +0000</pubDate>
      <link>https://dev.to/eonist/forcetouch-in-macos</link>
      <guid>https://dev.to/eonist/forcetouch-in-macos</guid>
      <description>&lt;p&gt;Here are some handy snippets when dealing with ForceTouch in macOS:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2FForceTouchEvent_anim.gif" class="article-body-image-wrapper"&gt;&lt;img alt="img" src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fstylekit%2Fimg%2Fmaster%2FForceTouchEvent_anim.gif"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Event handler:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;prevStage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="k"&gt;override&lt;/span&gt; &lt;span class="kd"&gt;func&lt;/span&gt; &lt;span class="nf"&gt;pressureChange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;with&lt;/span&gt; &lt;span class="nv"&gt;event&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;NSEvent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="nv"&gt;curStage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kt"&gt;Int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stage&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pressureBehavior&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kt"&gt;NSPressureBehavior&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;primaryDeepClick&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;prevStage&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;curStage&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;curStage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;prevStage&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
            &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="kt"&gt;Swift&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"from idle to clickStage"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="kt"&gt;Swift&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"from clickStage to idle"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="kt"&gt;Swift&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"from clickStage to deepClickStage"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
                &lt;span class="kt"&gt;Swift&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"from deepStage to clickStage"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="c1"&gt;//isn't possible&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="kt"&gt;Swift&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"stageChange"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;prevStage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;curStage&lt;/span&gt;&lt;span class="cm"&gt;/*always set prevStage to curStage on stage change*/&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kt"&gt;Swift&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"pressureChange"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Normalize the pressure:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight swift"&gt;&lt;code&gt;&lt;span class="cm"&gt;/**
 * NOTE: calculates the entire range of the stage pressures so from stage 0 to 1 the pressure goes from 0 to 0.5 and from stage 1 to 2 the linear pressure goes from 0.5 to 1 this makes it easier to scale things in a linear fashion from 0 to 1 in the entire stage range
 */&lt;/span&gt;
&lt;span class="k"&gt;var&lt;/span&gt; &lt;span class="nv"&gt;linearPressure&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kt"&gt;CGFloat&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stage&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stage&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;pressure&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="cm"&gt;/*if stage == 2*/&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pressure&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;UI provided by &lt;a href="https://github.com/eonist/Element" rel="noopener noreferrer"&gt;https://github.com/eonist/Element&lt;/a&gt; &lt;/p&gt;

</description>
      <category>macos</category>
      <category>forcetouch</category>
      <category>ui</category>
      <category>swift</category>
    </item>
  </channel>
</rss>
