<?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[wag it - Medium]]></title>
        <description><![CDATA[wag it — a startup lab - Medium]]></description>
        <link>https://medium.com/wag-it?source=rss----d01c8642dab7---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>wag it - Medium</title>
            <link>https://medium.com/wag-it?source=rss----d01c8642dab7---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 16:27:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/wag-it" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Baya, a Layout Framework for Swift.]]></title>
            <link>https://medium.com/wag-it/baya-a-layout-framework-for-swift-d9fc5203fe56?source=rss----d01c8642dab7---4</link>
            <guid isPermaLink="false">https://medium.com/p/d9fc5203fe56</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Markus Riegel]]></dc:creator>
            <pubDate>Mon, 22 Jan 2018 10:52:58 GMT</pubDate>
            <atom:updated>2018-01-22T10:52:57.934Z</atom:updated>
            <content:encoded><![CDATA[<p>Thoughts and a benchmark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*NEijzukenuX_mf0HD1R05g.png" /><figcaption>The Baya Weaver is a pretty cool bird.</figcaption></figure><h3>The idea.</h3><p>The idea for <a href="https://github.com/getwagit/Baya">Baya</a> goes back to June 2016. Ironically to <a href="http://androidbackstage.blogspot.de/2016/06/episode-50-constraint-layout.html">episode 50 of the Android Developer Backstage Podcast</a> which was — on top of that — about ContraintLayout, a concept completely different from Baya.</p><p>Around 15 minutes into the episode, the discussion shifts to some underlying principles, like separating the view hierarchy from the layout hierarchy and a concept they call “virtual view groups”. Chet sums that part up with:</p><blockquote>“So it gives you the encapsulation that you get from ViewGroups or separate layouts without the extra overhead in the view hierarchy of these, these nested things”</blockquote><p>But here’s the thing. I really like looking at layout code and being able to quickly infer what the layout will look like. Using a ContraintLayout takes that away from you, at least to some extend. I mostly end up working with a visual editor when using a system like that.</p><p>The dream was keeping the readability but separating the layout and view hierarchy. The Problem with Android and Java was, that we either had to extend View when implementing a layout class that could fit in with the existing system, and thus not flattening the view hierarchy at all, or subclass every View class we would want to use with our layout system in order to have them implement a new Interface. Neither option made much sense, so that was that.</p><p>All of this changed with Swift, when <a href="https://medium.com/u/1ba9786c08b8">Joachim Fröstl</a> and I started developing for iOS.</p><p>Lightweight <a href="https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/ClassesAndStructures.html#//apple_ref/doc/uid/TP40014097-CH13-ID82">Structures</a> and the ability to add <a href="https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Protocols.html#//apple_ref/doc/uid/TP40014097-CH25-ID267">Protocol conformance using Extensions</a> were exactly what we needed. We started with writing a simple Protocol and a few Extensions to makes our lives easier — it didn’t take long and <a href="https://github.com/getwagit/Baya/commit/403b5f4c096a581f9ddfe1db1194373d026993eb">Baya was born</a>.</p><h3>The concept.</h3><p>Baya is build around a few principles. They all originate form the core idea except the last one, which was more of a performance thing.</p><ul><li>A flat view hierarchy by separating the layout logic.</li><li>Readability by encapsulating layout code in Structures with descriptive names.</li><li>Extendability by being Protocol-oriented. One should be able to write custom encapsulated layout logic and just plug it in.</li><li>Separation of layout definition, the measure phase and the layout phase.</li></ul><h3>An example.</h3><p>Every UIView is a BayaLayoutable. You call Extension functions on a BayaLayoutable or an array of BayaLayoutables to create layouts. These layouts also implement BayaLayoutable.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba9fba91b9507218198c032babe7a31d/href">https://medium.com/media/ba9fba91b9507218198c032babe7a31d/href</a></iframe><p>Using semantically named variables can improve the readability of your layout code. Here‘s the layout for an action bar. UsinglayoutAsFrame() groups the elements together.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8699b11e5f4a3788c30b827a0101accc/href">https://medium.com/media/8699b11e5f4a3788c30b827a0101accc/href</a></iframe><p>These layouts are then combined into a tree structure. In most cases you want to do this once when the view is created. Here’s an example of the layout code used for the benchmark later on. The root layout is saved in a stored property of either the UIView or the UIViewController.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0cdc15cba153ee48432293815ca614d1/href">https://medium.com/media/0cdc15cba153ee48432293815ca614d1/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*0ogBQMgqXUaBW_kW-VjZWQ.png" /><figcaption>A screenshot of what the layout defined above would look like.</figcaption></figure><p>Finally you kick off the layout routine either in layoutSubviews() or viewWillLayoutSubViews() by calling layout?.startLayout(with: bounds). If you need the result of the measure pass, e.g. in sizeThatFits(), call layout?.startMeasure(with: size).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a6de7f348d9ae4b17090b3ec92ba841d/href">https://medium.com/media/a6de7f348d9ae4b17090b3ec92ba841d/href</a></iframe><p>More information about the concept and a cookbook can be found in the <a href="https://github.com/getwagit/Baya/wiki">project wiki</a>.</p><h3>Performance.</h3><p>Even though our focus was readability, testing the performance of Baya is something I wanted to do for a long time. We stumbled upon <a href="https://github.com/layoutBox/LayoutFrameworkBenchmark">LayoutFrameworkBenchmark</a> which seemed like a fast way to do that. The dependencies were <a href="https://github.com/marcorei/LayoutFrameworkBenchmark/tree/framework-baya">updated</a> before adding Baya. But the repository is a bit older — keep that in mind when looking at the data.</p><p>The results surprised me a bit. I did hope Baya would do well and I was fairly confident that it could beat AutoLayout. Here are the results of running the benchmark on an iPhone X.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUqdx_x7ZMdsBpOPk8wlTw.png" /><figcaption>Benchmark results on an iPhon X (January 11, 2018)</figcaption></figure><p>With 19 milliseconds at 100 subviews, it looks like Baya is the fasted of the bunch using the implementation above. Not by much, mind you, but we’re right down there with PinLayout. Here’s another one with the iPhone 6Plus (I had that one laying around).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I6nHdGyLCppC1_zoKrurbQ.png" /><figcaption>Benchmark results on an iPhone 6 Plus (January 11, 2018)</figcaption></figure><p>I don’t think these few milliseconds make a huge difference, so take that benchmark for what it’s worth. And if you’re interested, check out <a href="https://github.com/marcorei/LayoutFrameworkBenchmark/tree/framework-baya">the repo</a> — leave a comment below if you think I cheated somewhere!</p><h3>Thanks for reading!</h3><p>I hope you enjoyed reading this article. It was fun writing these thoughts down before they’re forgotten.</p><p>Baya is still in version 0.2.0 as of the time writing this article. We used it in two of our projects and enjoyed working with it. A few layout challenges made us improve the API a few times though. Since we’ve mostly been using Baya ourselves we haven’t gotten much feedback and don’t want to lock the API in just yet.</p><blockquote>Found embarrassing mistakes in the code base? <br>Thoughts on the concept or the cool bird in the logo? <br>Drop an answer below!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9fc5203fe56" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wag-it/baya-a-layout-framework-for-swift-d9fc5203fe56">Baya, a Layout Framework for Swift.</a> was originally published in <a href="https://medium.com/wag-it">wag it</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why so grey, Medium?]]></title>
            <link>https://medium.com/wag-it/why-so-grey-medium-1bc6e24edb75?source=rss----d01c8642dab7---4</link>
            <guid isPermaLink="false">https://medium.com/p/1bc6e24edb75</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[branding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[medium]]></category>
            <dc:creator><![CDATA[Markus Riegel]]></dc:creator>
            <pubDate>Thu, 11 Jan 2018 08:30:19 GMT</pubDate>
            <atom:updated>2017-10-09T16:03:21.813Z</atom:updated>
            <content:encoded><![CDATA[<h4>The Medium app icon on the App Store is grey. Here is why that could be an error.</h4><blockquote>Disclaimer: The grey icon may well be intended. This article is based on my own experience with iTunes Connect and black &amp; white icons.</blockquote><p>The new medium logo is black. Everywhere. Take a look at the official <a href="https://medium.design/logos-and-brand-guidelines-f1a01a733592">brand guidelines</a> and the <a href="https://medium.design/rebooting-the-medium-identity-6fb8d5a47fc1">blog post</a> about their new identity. Not a single grey logo. Even the app icon on the home screen is black.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ycsvDCOmlKCN-CfQFZe7wA.png" /><figcaption>the medium app icon is black. yet on the app store it’s grey.</figcaption></figure><p>So why is the app store icon grey? Could this be a mistake?</p><p>I think it is. At <a href="https://onepicture.co/"><em>one picture</em></a><em> </em>we had <a href="https://stackoverflow.com/questions/46565682/ios-app-displayed-with-grey-icon-in-testflight">a similar problem</a>. In our case, iTunes Connect rendered certain variants of the app icon grey.</p><p>We tried everything: exporting with different color profiles, embedding vs not embedding them, using different tools for exporting. Nothing seemed to work. Then we added different colored numbers to the image assets for debugging and the issue disappeared. We removed the numbers — the issue reappeared. Turns out just a few colorful pixels solve the problem.</p><p>Our fix was a small red dot in the corner of the app icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*3GWcUFyvcIaEpnLWy2l2TA.png" /><figcaption>before and after the fix. without and with the invisible red dot.</figcaption></figure><p>The rounded corners of the app icon hide the red dot so that it’s not visible to the user. Now our app icon is black even in the App Store and on Testflight.</p><p>What do you think? Could Medium have the same problem we faced or is the grey icon intended?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bc6e24edb75" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wag-it/why-so-grey-medium-1bc6e24edb75">Why so grey, Medium?</a> was originally published in <a href="https://medium.com/wag-it">wag it</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What if every smartphone could only take a single picture?]]></title>
            <link>https://medium.com/wag-it/what-if-every-smartphone-could-only-take-a-single-picture-9794a8c9ca2d?source=rss----d01c8642dab7---4</link>
            <guid isPermaLink="false">https://medium.com/p/9794a8c9ca2d</guid>
            <category><![CDATA[experiment]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Markus Riegel]]></dc:creator>
            <pubDate>Thu, 11 Jan 2018 08:29:43 GMT</pubDate>
            <atom:updated>2017-10-06T16:45:15.523Z</atom:updated>
            <content:encoded><![CDATA[<h4>An iOS experiment.</h4><p>What if we could only take one picture? <br>What if instead of capturing five billion photos each day, every user had to decide what her/his one picture would be?<br>How would a social network like that look like?<br>Would it be full of cat pictures?<br>Or would we see personal stories?<br>Pictures of loved ones or selfies?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/1*7YgDmRDsY6O_Spmiv1DArg.png" /></figure><p>On our quest to rethink communication at <em>wag it</em>, this was one of the questions we were asking ourselves. So we stopped browsing reddit for a moment, closed Instagram and paused scrolling through our endless twitter feed — and started the experiment “<a href="https://onepicture.co/">one picture</a>”.</p><p>“One picture” is a simple iOS app. You can take <em>one</em> single picture and upload it. And you can browse through the “one pictures” of others. That’s it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JR6qBKmcmbXNoiTr-fK8xg.jpeg" /><figcaption>one picture — the app</figcaption></figure><p>But we are very exited what this experiment could become. Maybe we’ll end up with a gallery full of unique stories and pictures that are important to the ones who posted them. Maybe the idea has no place between the masses of content.</p><p>If you’re interested, check it out at <a href="https://onepicture.co/">onepicture.co</a>.<br>We can’t wait to see what’s your one picture!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9794a8c9ca2d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wag-it/what-if-every-smartphone-could-only-take-a-single-picture-9794a8c9ca2d">What if every smartphone could only take a single picture?</a> was originally published in <a href="https://medium.com/wag-it">wag it</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>