<?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 Mohammed Imthathullah on Medium]]></title>
        <description><![CDATA[Stories by Mohammed Imthathullah on Medium]]></description>
        <link>https://medium.com/@imthath?source=rss-a361beddb63f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6WTjReXWL4RT1EPX54NsIA.jpeg</url>
            <title>Stories by Mohammed Imthathullah on Medium</title>
            <link>https://medium.com/@imthath?source=rss-a361beddb63f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 14 Jul 2026 02:37:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@imthath/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[Productivity boost: Stop wasting time on YouTube, use AI instead to get info from videos quickly]]></title>
            <link>https://medium.com/swlh/productivity-boost-stop-wasting-time-on-youtube-use-ai-instead-to-get-info-from-videos-quickly-81ae5af0727d?source=rss-a361beddb63f------2</link>
            <guid isPermaLink="false">https://medium.com/p/81ae5af0727d</guid>
            <category><![CDATA[youtube]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[diy]]></category>
            <dc:creator><![CDATA[Mohammed Imthathullah]]></dc:creator>
            <pubDate>Mon, 17 Apr 2023 08:00:41 GMT</pubDate>
            <atom:updated>2023-04-17T08:00:41.189Z</atom:updated>
            <content:encoded><![CDATA[<h3>Stop wasting time on YouTube</h3><p>Are you tired of spending hours watching YouTube videos? Do you wish there was a way to quickly extract the most important information from those videos without wasting your time?</p><p><strong>Artificial intelligence</strong> might just be the solution you’re looking for. AI can help you filter through hours of content to find the most relevant information in just a matter of minutes by generating <strong>concise summaries</strong>.</p><p>AI summaries can come in handy when you want to,</p><ul><li>Quickly review the highlights of a long <strong>lecture</strong> or presentation.</li><li>Get the gist of a <strong>news</strong> segment or documentary.</li><li>Take notes of a <strong>recipe</strong> or any DIY video.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-2l4EVJ6z6HVrkyFZy1GgA.jpeg" /><figcaption>Read summaries in Skryb AI to find the information you need in the shortest time</figcaption></figure><p>One iOS app that’s leading in this space is <a href="https://apps.apple.com/app/apple-store/id6445832915?pt=121370849&amp;ct=medium&amp;mt=8"><strong>Skryb AI</strong></a>. This app generates <strong>easy-to-read, bullet-point summaries</strong> of videos with a simple and intuitive user interface. You can quickly browse through summaries of multiple videos to find the exact information you’re looking for.</p><p>Not only it saves you time, but also helps you retain more information by providing succinct summaries. You can quickly review key points and better understand the content of the video. Also, <strong>all summaries are saved locally</strong> on your device and you can use the search revisit info quickly even when you forget.</p><p>In conclusion, if you’re tired of wasting time on YouTube and want a more efficient way to consume video content, AI technology and apps like Skryb AI are the way to go. <a href="https://apps.apple.com/app/apple-store/id6445832915?pt=121370849&amp;ct=medium&amp;mt=8"><strong>Get it for free from here</strong></a> and see how much time you can save. You can upgrade only if you find it useful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81ae5af0727d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/productivity-boost-stop-wasting-time-on-youtube-use-ai-instead-to-get-info-from-videos-quickly-81ae5af0727d">Productivity boost: Stop wasting time on YouTube, use AI instead to get info from videos quickly</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Looking for way to Learn and Retain Quran]]></title>
            <link>https://imthath.medium.com/looking-for-way-to-learn-and-retain-quran-7eda58b69198?source=rss-a361beddb63f------2</link>
            <guid isPermaLink="false">https://medium.com/p/7eda58b69198</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[quran]]></category>
            <category><![CDATA[memorization]]></category>
            <category><![CDATA[muslim]]></category>
            <dc:creator><![CDATA[Mohammed Imthathullah]]></dc:creator>
            <pubDate>Sun, 30 May 2021 11:50:26 GMT</pubDate>
            <atom:updated>2021-06-17T04:40:48.952Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*eJHYUvphMMDENNszUai1SA.jpeg" /><figcaption>Developer’s Mantra</figcaption></figure><p>Last month, I had idea for a new app and as usual, just wanted to build it. But this time, I want to build in public.</p><p>Before starting, I wanted to spend some time finding out if there are any apps out there, that would help me solve the problem.</p><p>A short article about my findings!</p><p>First let me explain the problem.</p><p>As muslims, we get a Imaan boost every Ramadan. And for the past few Ramadans, I try to listen to some Tafsir of the Quran (mostly by <a href="http://twitter.com/noumanbayyinah">@noumanbayyinah</a>, <a href="http://twitter.com/YasirQadhi">@YasirQadhi</a> or <a href="http://twitter.com/muftimenk">@muftimenk</a>) and try to memorize those surahs/ayats.</p><p>But after Ramadan is over, we hardly keep revising what we learned and end up forgetting it by next year. So this time, I was thinking of how to NOT forget whatever I learn.</p><p>As an app developer, for every problem the first solution that comes to mind is an App.</p><p>¯\_ (ツ)_/¯</p><p>What I would like the App to do is to track what all parts of the Quran I have memorized and remind me when I want to revise which part, so I that I don’t forget it.</p><p>And recently, one of friends was talking how a Spaced Repetition app has helped him learn a new language. 👏</p><p>I’ve known spaced repetition to be a good technique for learning and retaining what you learned. It makes sense that we do the same with memorizing Quran. I spent some time reading about it and I agreed more with that thought.</p><p>After all, this is what the Ustaadhs in most Hifdh madarsas have been doing for centuries. Make students revise particular portions at specific time intervals. They just didn’t come up with this nice name for the technique. ¯\_(ツ)_/¯</p><p>I searched in the App Store to find out apps that would help me track Quran learning and also remind me to revise it at spaced intervals. I couldn’t find any. 😞</p><p>Most of the apps which are out there for memorizing Quran just play recitation of selected verses repeatedly.</p><p>While that certainly helps in memorization, not so much in retention. Irrespective of whatever keyword I used for searching, I couldn’t find more than a handful of apps. Some apps were not even in English.</p><p>I think the state would be different in Play Store. Maybe.</p><p>I came to conclusion that iOS certainly needs more apps for Muslims. Well, that way, it helps me work on something and feel good about it as well. Because this could also be spending in Allah’s path 🤩.</p><p>But anyways, I started looking the other way around. Tried a few Spaced Repetition apps and saw if I could use them to revise Quran, instead of just some flash cards with new words.</p><p>Theoretically, that should work. Practically, it was cumbersome.</p><p>If any of you know apps that would help me solve the problem I described here, kindly let me know. Even though I’m halfway through my app, I would gladly try any existing solutions first.</p><p>Inspiration from <a href="http://twitter.com/ThePillarsApp">@ThePillarsApp</a> helped me not delay building or think too much. A couple of weeks ago, I started working on it and AlhamthuLillah, it has turned out good. And I’m trying to use it regularly.</p><p>I’ll post another article about the progress, maybe after I have some pretty screen shots. 😉</p><p><em>Update June 17, 2021: I made a basic MVP of this idea and shared the iOS app beta via TestFlight with a few users. If you are interested in trying out the beta, kindly </em><a href="http://twitter.com/imthath_m"><em>DM me on Twitter</em></a><em> or </em><a href="mailto:mimthath4@hotmail.com?subject=Regarding%20Haafidh%20beta%20from%20Medium%20post"><em>email me</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7eda58b69198" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Sidebar in SwiftUI Without a NavigationView]]></title>
            <link>https://medium.com/better-programming/using-sidebar-in-swiftui-without-a-navigationview-94f4181c09b?source=rss-a361beddb63f------2</link>
            <guid isPermaLink="false">https://medium.com/p/94f4181c09b</guid>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Mohammed Imthathullah]]></dc:creator>
            <pubDate>Mon, 09 Nov 2020 16:47:08 GMT</pubDate>
            <atom:updated>2020-11-09T16:47:08.216Z</atom:updated>
            <content:encoded><![CDATA[<h4>Get to know SwiftUI’s new sidebar</h4><figure><img alt="Apple music app screen with a sidebar" src="https://cdn-images-1.medium.com/max/1024/1*v3zMmBZ1F4lCGYPhZhy44w.png" /><figcaption><a href="https://www.apple.com/in/ipados/ipados-14/">Apple showcasing the sidebar</a> in its music app</figcaption></figure><p>SwiftUI is really easy and fast for prototyping UI. This opinion has been expressed by many developers in different wordings.</p><p>But how does SwiftUI fare against the complex requirements of a real-world project? At present, it has been in production for only just over a year, and we can’t find many SwiftUI apps in the App Store.</p><p>But if there is any good time to build and ship SwiftUI apps, it is right now.</p><p>Disclaimer: Your app’s minimum target needs to be iOS 13.</p><p>Even though most of the SwiftUI features which make it production-ready have shipped only with iOS 14, you can build a decent app for iOS 13 which becomes exceptional when the user updates.</p><p>Take the common requirement of a collection view in many apps. You can use the new lazy grids for iOS 14 and drop down to a combination of VStack and HStack as Paul explains in <a href="https://www.hackingwithswift.com/quick-start/swiftui/how-to-position-views-in-a-grid-using-lazyvgrid-and-lazyhgrid">this article</a> for iOS 13. Also, if your requirement can just be fulfilled using a list, then go for it in iOS 13.</p><p>But if your requirements are complex or you want to tweak the default behavior a little bit, you might find it difficult. Today we’ll tackle one such scenario where I want some tweaks to the default behavior. Over the coming weeks, we’ll see many more.</p><p>SidebarListStyle was introduced this year, and makes it so easy to get the default sidebar behavior in your app.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6229fdf7770e774bd0467d3281fa13e8/href">https://medium.com/media/6229fdf7770e774bd0467d3281fa13e8/href</a></iframe><p>Just with those few lines, you get the default behavior of the sidebar in a nice master detail layout.</p><figure><img alt="diagram showing layout of sidebar items to the left of the detail view portion of the screen" src="https://cdn-images-1.medium.com/max/976/1*xbkj032-yh6tOe7kbnxGCw.png" /><figcaption>A sidebar with default behavior</figcaption></figure><p>You get a lot of things out of the box: a sidebar with spaced out list items, no separators, a nice indication for the selection, and a button to toggle the visibility of the sidebar. If you use the new Label for the list item, the images will be in the accentColor. So cool, with just a few lines of code! Now my requirement is to have the sidebar and the detail view, but I don&#39;t want them to be inside a NavigationView. Sounds simple, right? Let’s try.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1eb8b0bb0984e0a99556c7625f246a50/href">https://medium.com/media/1eb8b0bb0984e0a99556c7625f246a50/href</a></iframe><p>And the output is…</p><figure><img alt="screen with sidebar selections but no items in the detail view" src="https://cdn-images-1.medium.com/max/979/1*eF7MTxXNyyQAZWWn_RXHsA.png" /></figure><p>Not what I expected to see from the above code. But SwiftUI views react to the environment; you can say that SwiftUI views are dependent on the environment. We got the spaced-out list items without a separator but no selection and hence no highlighting when tapped, and we need to frame the views in the required size.</p><p>I have no clue why removing the NavigationLink stops the List selection from working. You can get it to work by adding an onTapGesture to the Text. The selection parameter in the list in no longer required. You can fix the sidebar width by using the frame modifier.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/70b265e8b8b19c82e841ce9f4742bfa3/href">https://medium.com/media/70b265e8b8b19c82e841ce9f4742bfa3/href</a></iframe><p>Let’s try our luck this time.</p><figure><img alt="screen showing sidebar items with the message “nothing is selected”" src="https://cdn-images-1.medium.com/max/978/1*47plevq39Y6ULU2_Ib_uWQ.png" /></figure><p>Again, this is not what I expected, but SwiftUI did its job perfectly. We can fix this easily by adding a Spacer() before and after detailView.</p><p>The functionality is working properly, so you can tap any item to select it. But there is no visual indication of which item is currently selected. To highlight the selection, add a background with accentColor.</p><p>Here’s the final output.</p><figure><img alt="screen showing sidebar items, with item 2 highlighted, and the message “2 is selected”" src="https://cdn-images-1.medium.com/max/1024/1*dK1oUJHuxat8G67px8NtqQ.png" /><figcaption>The Desired Result</figcaption></figure><p>And here’s the code to get that output.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/69d80fb956a29eeb4cd95aefcbfdc20e/href">https://medium.com/media/69d80fb956a29eeb4cd95aefcbfdc20e/href</a></iframe><p>We’ve used an HStack and a contentShape modifier so that tapping anywhere on the list item enables selection.</p><p>This is not the perfect solution, but this works. It took me some mental preparation to share working solutions publicly rather than waiting for the perfect solution all the time.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94f4181c09b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/using-sidebar-in-swiftui-without-a-navigationview-94f4181c09b">Using Sidebar in SwiftUI Without a NavigationView</a> was originally published in <a href="https://betterprogramming.pub">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding SwiftUI Modifiers]]></title>
            <link>https://medium.com/better-programming/understanding-swiftui-modifiers-83ebfbc3f94?source=rss-a361beddb63f------2</link>
            <guid isPermaLink="false">https://medium.com/p/83ebfbc3f94</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[swiftui]]></category>
            <dc:creator><![CDATA[Mohammed Imthathullah]]></dc:creator>
            <pubDate>Mon, 07 Sep 2020 15:24:26 GMT</pubDate>
            <atom:updated>2020-10-29T16:13:06.451Z</atom:updated>
            <content:encoded><![CDATA[<h4>And why the order of your modifiers matters</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bTlXGq0LztqSQaPf" /><figcaption>Photo by <a href="https://unsplash.com/@1eemingwell?utm_source=medium&amp;utm_medium=referral">Jonas Lee</a> on <a href="https://unsplash.com?utm_source=medium&amp;utm_medium=referral">Unsplash</a>.</figcaption></figure><p>A major paradigm shift is in progress in the Apple development world. For years, we were used to the imperative programming style of UIKit and AppKit. Even though there were many attempts by third parties with different styles, this imperative style of UI frameworks remained the same and most developers liked it.</p><p>When Apple introduced SwiftUI in 2019, the future looked distinctly different. It’s all declarative now. Not everyone was ready to jump in from the onset, but for those who dove into SwiftUI, it is a fun if occasionally frustrating journey. With the <a href="https://www.hackingwithswift.com/articles/221/whats-new-in-swiftui-for-ios-14">improvements SwiftUI is getting in 2020</a>, more developers are set to begin their journey with a declarative UI framework.</p><p>Let’s try to explore the workings of one of the most important parts of SwiftUI: modifiers<strong>.</strong></p><p>A View can have any number of modifiers. They can be added to the view just like you would chain multiple function calls. Each modifier returns a View that the succeeding modifier will act on. Hence, when working with modifiers, the order in which you add them is really important. Let’s look at that with an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe85bc93f906c3d9872988e609ebed5e/href">https://medium.com/media/fe85bc93f906c3d9872988e609ebed5e/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*2z1m_rQ9QJw9wmdA87tpNg.png" /></figure><p>As you can see from the code and preview above, cornerRadius is applied to the inner rectangle and the whole view is rotated, as the rotationEffect modifier is the last. Now let’s change the order of the modifiers:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/58257dd9bd68afc3e3b6fbb338fcdc8d/href">https://medium.com/media/58257dd9bd68afc3e3b6fbb338fcdc8d/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*-BtANvQ0wVzO4hbLFIMrHA.png" /></figure><p>We’ve now interchanged the positions of rotationEffect and cornerRadius. You can observe the difference in the resulting view. The inner rectangle is now rotated and the outer rectangle is rounded.</p><p>In these two examples, we’ve applied background and padding modifiers more than once. Each time, they modified the view. Now let’s explore another set of modifiers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ge0ozO6LXdJG0Rsqhj-KTQ.png" /><figcaption>Can you tell how these modifiers are different from what we have seen above?</figcaption></figure><p>In some cases, when you apply the same modifier twice, SwiftUI only takes the first one. This is clearly demonstrated by the foregroundColor modifier in the example above. This behavior is exactly opposite to how normal functions (and most of the SwiftUI modifiers) behave.</p><p>My understanding of this behavior is that when a modifier cannot have more than one effect on a view (e.g. any view can have only one foreground color), the one closest to the view is applied.</p><p>I was not able to find any documentation on why this is the case and which modifiers behave like this, but I’ve come to this understanding by working with SwiftUI for more than a year now.</p><p>How great would it be if Xcode provided us with a warning when adding such redundant modifiers more than once? Well, for that to happen, Xcode will need a SwiftUI compiler in addition to the existing Swift and Objective-C compilers.</p><p>But we can surely achieve these when we build apps that work with SwiftUI modifiers. When I first thought of <a href="https://medium.com/swlh/re-imagining-sf-symbols-into-xcode-c2ebf92550d9">solving the problems I had when working with SF Symbols</a>, I envisioned a tool that does a better than job than the combined workflow of SF Symbols Mac app and Xcode.</p><p><a href="https://apps.apple.com/app/id1525226399?platform=ipad"><strong>Swimbols</strong></a> lets you add modifiers instantly, edit or reorder modifiers to suit your needs and switch symbols with just a click after applying modifiers. All with real-time preview and you can copy the code when you are done.</p><p>When it doesn’t make sense for the modifier to be added more than once, Swimbols doesn’t show them in the list. And you can add as many of the other type of modifiers we discussed earlier in the post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zX2p_oKLIq1vNi4Wbox0lA.png" /><figcaption>Add modifiers easily and reorder them intuitively.</figcaption></figure><p>You can play around with <a href="https://apps.apple.com/app/id1525226399?platform=ipad">Swimbols</a> and visually reorder the modifiers to see how they affect the view instantly.</p><p>As SwiftUI improves, it is good to have a strong understanding of the basic building blocks. I hope it is now clear how the order of modifiers affects the view and why it doesn’t make sense for some modifiers to be used more than once.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83ebfbc3f94" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/understanding-swiftui-modifiers-83ebfbc3f94">Understanding SwiftUI Modifiers</a> was originally published in <a href="https://betterprogramming.pub">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Re-Imagining SF Symbols Into Xcode]]></title>
            <link>https://medium.com/swlh/re-imagining-sf-symbols-into-xcode-c2ebf92550d9?source=rss-a361beddb63f------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2ebf92550d9</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[sf-symbols]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Mohammed Imthathullah]]></dc:creator>
            <pubDate>Tue, 11 Aug 2020 14:00:40 GMT</pubDate>
            <atom:updated>2020-11-21T17:42:52.046Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*diDX86v8RJZZI1LVKlPjcQ.png" /><figcaption>A shortcut from SF Symbol to Swift</figcaption></figure><p>Ever since Apple introduced, SF Symbols life has been so easy for developers. Particularly, for those who do not a have a design team to back them up.</p><p>The pros of using SF Symbols has been documented well over the last year. There is no need to manage assets and the app size remains same irrespective of the number of symbols used. Seems like an all rosy path.</p><p>But we have one good old problem. It can even be attributed to muscle memory. To copy the symbol’s name to Xcode, we end up pressing <em>Cmd + C, </em>most of the time<em>. </em>And Xcode stops compiling when our code looks like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/359/1*bAbaQ-dEgN93orZacpvucw.png" /><figcaption>Its quite hard to rewire ourselves, only when working with SF Symbols app.</figcaption></figure><p>After successfully copying the symbol’s name, we modify the symbol to make is more suited for our app. Every time we add modifiers, we hope Xcode helps us with auto completion or we remember the modifiers exactly and type them correctly, so that the live preview remains live.</p><p>Then there will be times, when we might want to play around with multiple symbols, after applying your desired modifiers. So, we go the SF Symbols app, search or browse for the symbol, copy the symbol’s <em>name</em>, paste it into Xcode and again, hope that we did nothing to break the live preview.</p><p>Don’t you think this entire workflow needs some improvement? Here comes “<strong><em>Swimbols</em></strong>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6hU87qeS5fhvsW0YidGm-w.png" /><figcaption><strong>Swimbols — A swifty way to add SF Symbols into Xcode</strong></figcaption></figure><p><em>Swimbols</em> helps you overcome the pain points explained above and improve your workflow, there by giving you a productivity boost.</p><p>Here’s how your workflow will look like with <em>Swimbols</em>.</p><p>Browse through the categories or search for a symbol, select one and start applying modifiers. The preview is live. Just swipe left to delete any modifier. Drag and drop to re-order modifiers. Whenever you want to change the symbol, just select it. All your modifiers are applied and you can see changes without any delay. When you are happy with the design, copy code to use in your SwiftUI/UIKit project.</p><p><a href="https://apps.apple.com/app/id1525226399?platform=mac"><strong>Swimbols is available on the App Store</strong></a> for Mac, iPad and iPhone. Check it out and let us know what you think.</p><p>The roadmap for Swimbols is <a href="https://github.com/imthath-m/Swimbols/issues"><em>here</em></a> and you can suggest features or post issues. Keep an eye on <a href="https://twitter.com/skydevz">our Twitter handle</a> for future updates.</p><p>Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2ebf92550d9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/re-imagining-sf-symbols-into-xcode-c2ebf92550d9">Re-Imagining SF Symbols Into Xcode</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using iOS 14’s Menu as a Picker in SwiftUI]]></title>
            <link>https://medium.com/better-programming/using-ios-14s-menu-as-a-picker-in-swiftui-b036c772037?source=rss-a361beddb63f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b036c772037</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[swiftui]]></category>
            <dc:creator><![CDATA[Mohammed Imthathullah]]></dc:creator>
            <pubDate>Tue, 28 Jul 2020 14:47:58 GMT</pubDate>
            <atom:updated>2020-07-28T14:47:58.305Z</atom:updated>
            <content:encoded><![CDATA[<h3>Using iOS 14&#39;s Menu as a Picker in SwiftUI</h3><h4>Working with Apple’s all-new pickers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RM2QEC1OejmADHcAqP5lQw.jpeg" /><figcaption>A mouth-watering menu to get us started! Photo by <a href="https://unsplash.com/@sunrisephotography?utm_source=medium&amp;utm_medium=referral">Sunrise Photos</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a>.</figcaption></figure><p>Up until iOS 13, the options available for inline pickers felt limited. We could show the wheel inline, but that doesn’t look great in table views, lists, and forms. The other option was to use the navigation stack. But if we didn’t want to use the navigation stack, handling pickers could be painful.</p><p>Apart from those two options supported directly by iOS, many apps tried to solve this problem by showing the wheel in the keyboard area. Some apps even decided to use an action sheet, which in my opinion is a bad design choice.</p><p>Will iOS 14 help us solve this problem? If we look at the documentation for <a href="https://developer.apple.com/documentation/swiftui/pickerstyle">PickerStyle</a>, there is no update for iOS 14. Where else can we look?</p><p>I was watching the <a href="https://developer.apple.com/videos/play/wwdc2020/10205/">Design with iOS Menus and Pickers session</a> for WWDC 20 and there was a mention of using menus for selection.</p><p>Here’s how a simple menu looks in Xcode:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4438974d7ee735bf9dca44d66fe52889/href">https://medium.com/media/4438974d7ee735bf9dca44d66fe52889/href</a></iframe><p>Here’s how it translates to the iPhone:</p><figure><img alt="iPhone Screen shot showing sample menu in iOS 14" src="https://cdn-images-1.medium.com/max/750/1*lUzOJ26NsGVh8hIuyLzpSQ.png" /><figcaption>iOS 14 screenshot of sample menu</figcaption></figure><p>Well, this can solve the inline picker problem, but I found no help <a href="https://developer.apple.com/documentation/swiftui/menu">in the documentation</a> regarding how to use it for selection.</p><p>Here’s my attempt to use the menu as a picker:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b6ce06958fbbe92d9be24f6ad0e64f84/href">https://medium.com/media/b6ce06958fbbe92d9be24f6ad0e64f84/href</a></iframe><p>We can pass in an array of values that can be mapped to a View and an integer referring to the currently selected index.</p><p>The core work for using Menu happens between lines 30-53. When the menu is to be shown, we loop through the array and show the view for its respective index. Near the view for the selected index, we add a checkmark.</p><p>The initializer takes in an optional string, just like the good old Picker. If you want to show a name near the selected value, it will be helpful.</p><figure><img alt="MenuPicker in action." src="https://cdn-images-1.medium.com/max/750/1*7HQyrduxrWuMPRMoEMvtrw.png" /><figcaption>Our custom MenuPicker in action</figcaption></figure><p>This can work well in most cases where our old picker was not helpful. And to top it off, we can even do this in the navigation bar and it works the same.</p><figure><img alt="MenuPicker in the navigation bar" src="https://cdn-images-1.medium.com/max/750/1*HMl6cPpSbUVa_x-pWE7p2Q.png" /></figure><p>Now, we can go ahead and use this new MenuPicker wherever we need an inline option to select from a list of values. The full code can be seen on <a href="https://gist.github.com/imthath-m/469cee5dde579d7892e4233811f7b17c">GitHub</a>.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b036c772037" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/using-ios-14s-menu-as-a-picker-in-swiftui-b036c772037">Using iOS 14’s Menu as a Picker in SwiftUI</a> was originally published in <a href="https://betterprogramming.pub">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Appreciation Matters?]]></title>
            <link>https://imthath.medium.com/why-appreciation-matters-f9616ccb3711?source=rss-a361beddb63f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9616ccb3711</guid>
            <category><![CDATA[appreciation]]></category>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[improvement]]></category>
            <dc:creator><![CDATA[Mohammed Imthathullah]]></dc:creator>
            <pubDate>Wed, 20 May 2020 17:47:52 GMT</pubDate>
            <atom:updated>2020-05-20T17:47:52.917Z</atom:updated>
            <content:encoded><![CDATA[<h4>Especially when it comes from close quarters.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NiTh_-gGeVANPItDIxnE5Q.jpeg" /></figure><p>Everyone appreciates being appreciated. We can even say most people long for it. But hardly a few people will people confess how much they like being appreciated.</p><p>I’m not talking about false praise in the face. Like when a bad and corrupt politician for almost his entire life becomes President and suddenly everyone is saying how good he is and how he is the best. Seriously people? Get a life.</p><p>The kind of appreciation you get from the people who are close to you and are part of your every day life for very simple things. Your family appreciating you for getting the groceries or doing the laundry. Your manager or colleagues appreciating you for doing what you get paid to do. Your friends in class appreciating you for explaining a simple concept to them.</p><p>These are very small things and, in most cultures, nowadays they are taken for granted. You don’t expect your manager to appreciate you for doing what you are paid to do. And your manager feels no need for it, most likely does not even think about. Same inside the family or among the friends. Over time, you even stop expecting them to appreciate you for the petty things.</p><p>So, the situation is, everyone likes it, no one does it and to top it all, no one even expects it.</p><p>Where has this gone wrong? I think we lack gratitude. We will never appreciate things that we are not grateful for. We will not understand the value of such things while we take them for granted.</p><p>We have to be grateful. Someone might ask “to who?”. That is for every single person to figure out. Someone might also ask “for what?”. I think there is no point in trying to convince such a person, who might think that luxuries of life are his/her birth right. They’ll understand when they lose some.</p><p>But guess what, the other question is not so complicated. Who you should appreciate? The answer is simple. Everyone around you. Everyone you interact with often. What should you appreciate them for? For whatever good they do.</p><p>Just let people know, that you appreciate what they do and maybe even how they do. I’m sure they’ll like it and do it better next time. But don’t make a big fuss out of it. If it is dramatic, it will not be real and won’t cause any good. Just casually let them know.</p><p>To change the world for better, you can start with appreciating people. Whatever good they are doing, they’ll try to make it better.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9616ccb3711" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Standing Still]]></title>
            <link>https://imthath.medium.com/standing-still-90d965dc7f38?source=rss-a361beddb63f------2</link>
            <guid isPermaLink="false">https://medium.com/p/90d965dc7f38</guid>
            <category><![CDATA[covid-diaries]]></category>
            <category><![CDATA[reflections]]></category>
            <category><![CDATA[time]]></category>
            <dc:creator><![CDATA[Mohammed Imthathullah]]></dc:creator>
            <pubDate>Sun, 10 May 2020 07:18:54 GMT</pubDate>
            <atom:updated>2020-05-10T07:18:54.015Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TqF68fsXIXe4ixK-axG2VQ.jpeg" /></figure><p>What is it like to stare at a wall? A ceiling? The endless blue sky? or the dark night sky?</p><p>When was the last time you did so? If you are a millennial, I may have to rephrase the question to “<em>Have you ever done so in your life”</em>?</p><p>In this era, no one even has to look at their loved ones in the face and talk with kindness for more than five minutes. Because you know, the next notification from the new social media app will pop up and the mobile is always with in reaching distance.</p><p>Technology has made us more distracted than ever before. Tech companies have made us full time consumers. We consume content all the time, be it written, audio, video or interactive (games and social media).</p><p>Most of us never knew before what it is like to live through an outbreak of a contagious disease which has no known medicine. The pandemic and epidemic are fancy, short terms to refer to such diseases and again, most of us have not even heard these terms before.</p><p>But our ancestors have lived through it many times. And it has happened at all levels, from a village to a nation to the globe. In most places, it has been only a few weeks or months since the lock down started, and we already feel like it has been years.</p><p>Time flies — this is what we have heard and experienced all our life. And we kept complaining all the time that there is no time to do this, to achieve that. Now it feels like, for a change time stopped in its tracks, turned around, looked at you in the eye and said “Ok, I will stand still, you go ahead”.</p><p>And guess what, we are still complaining, “when will all this end?”, “when can we go back to normal?” — the very normal life which you dreaded all your life has suddenly become like a vacation spot which you want to go as soon as possible.</p><p>So now we have to step back and ask the question “who’s the one with problem here — time or me?”</p><p>Sadly, the ability the ask questions to oneself and finding answers from within is becoming a lost trait. When an online search gives us all the answers we need in the blink of an eye, why should we even care to think, reflect and seek answers from within?</p><p>All the while we were complaining that we don’t have enough time to do stuff, now we are complaining we are not having enough stuff do.</p><p>By standing still, time has given us the opportunity to look at our lives and improve it. The opportunity to think. The opportunity to change. The opportunity to clear all the clutter we have accumulated in our minds and in our homes (just give away whatever you have not used in the last six months to those who need it).</p><p>The opportunity to be human again and not be slaves of technology, faking a busy but empty life.</p><p>After all, still water reflects you better than muddled water.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90d965dc7f38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Best Way to Use Environment Objects in SwiftUI]]></title>
            <link>https://medium.com/better-programming/the-best-way-to-use-environment-objects-in-swiftui-d9a88b1e253f?source=rss-a361beddb63f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9a88b1e253f</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[swiftui]]></category>
            <dc:creator><![CDATA[Mohammed Imthathullah]]></dc:creator>
            <pubDate>Tue, 21 Apr 2020 22:56:04 GMT</pubDate>
            <atom:updated>2020-05-02T13:13:18.343Z</atom:updated>
            <content:encoded><![CDATA[<h4>A deep dive into the use and power of environment objects</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6iorECPNRd8yivYOB76zNg.jpeg" /><figcaption>We should minimize our impact on the environment, even in our SwiftUI app. Photo by <a href="https://unsplash.com/@joren78?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Joren</a> on <a href="https://unsplash.com/s/photos/environment?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>The <a href="https://developer.apple.com/videos/play/wwdc2019/226/">data flow in SwiftUI</a> apps is different from what we have been working on for years with any other earlier imperative UI frameworks from Apple such as UIKit or AppKit.</p><p>In SwiftUI, we can just declare views and it always stays in sync with the data.</p><p>The properties in your views can be wrapped with State, Binding, or Observed <a href="https://www.swiftbysundell.com/articles/property-wrappers-in-swift/">property wrappers</a>. Whenever the value of the properties provided by these wrappers changes, the view is redrawn accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oG-BoAYYQOMKrHalRr5q_A.png" /><figcaption>Property wrappers to share data between SwiftUI views. Slide 82 of <a href="https://devstreaming-cdn.apple.com/videos/wwdc/2019/226mq9pvm28zqfqer2a/226/226_data_flow_through_swiftui.pdf?dl=1">this presentation</a> updated.</figcaption></figure><p>Ideally, views should be small and have private State properties, with one or few Binding or Observed properties. Because, we would not want to re-draw your view often.</p><p>But then, Apple provided us with EnvironmentObject. As the name goes, an environment object can let us know of something that happens anywhere in the app to a lot of unrelated views.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6-p2mRHYlmXvIGwtXwpFBA.png" /><figcaption>How EnvironmentObject shares data across views PC: <a href="https://devstreaming-cdn.apple.com/videos/wwdc/2019/226mq9pvm28zqfqer2a/226/226_data_flow_through_swiftui.pdf?dl=1">Apple</a></figcaption></figure><p>Apple provided us with a<a href="https://developer.apple.com/documentation/swiftui/environmentvalues"> long list</a><em> </em>of<em> </em>environment<em> </em>values.</p><p>In the good old times, we got to know about these changes via ViewController life cycle methods, like when a user changes theme (yeah, triatCollectionDidChange), and NotificationCenter, like when a user changes the device orientation.</p><p>These environment values can be injected into any view easily.</p><pre>@Environment(\.presentationMode) var presentationMode</pre><p>The above property in a view can help to know the current presentation mode or to dismiss the view manually.</p><p>We can also create our own classes conforming to ObservableObject and then make them EnvironmentObjects.</p><p>It has been touted as the next level of <a href="https://cocoacasts.com/nuts-and-bolts-of-dependency-injection-in-swift">dependency injection</a>. We can inject whatever you want, wherever you want. Sounds familiar? First, let us see what the <a href="https://developer.apple.com/documentation/swiftui/environmentobject">Apple documentation</a> says.</p><blockquote>“An environment object invalidates the current view whenever the observable object changes. If you declare a property as an environment object, be sure to set a corresponding model object on an ancestor view by calling its <em>environmentObject(_:)</em> method.”</blockquote><p>Does anything smell bad? What does “be sure to set a corresponding model object on an ancestor view” mean? A runtime check? What if the check fails? We’ll find out in a minute.</p><p>OK, here is a simple example for using EnvironmentObject from a <a href="https://www.hackingwithswift.com/quick-start/swiftui/how-to-use-environmentobject-to-share-data-between-views">Hacking with Swift</a><em> </em>tutorial.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/064f96eaedda57c5114d54883233dac5/href">https://medium.com/media/064f96eaedda57c5114d54883233dac5/href</a></iframe><p>We have two views, one to change the score and another to display the score. Both views read/write the score to the same environment object.</p><p>For this to work properly, we have to inject the environment object in the root view of the hosting controller in the scene delegate as mentioned in the tutorial.</p><p>But what will happen if we don’t inject the environment object in the root view?</p><pre>Fatal error: No ObservableObject of type UserSettings found. A View.environmentObject(_:) for UserSettings may be missing as an ancestor of this view.</pre><p>No prizes for guessing correctly. The app crashes with the above error. Why so?</p><p>The environment object could be nothing but an implicitly unwrapped optional, we do not know its implementation details.</p><p>But the error message closely resembles the errors thrown when you force unwrap a nil object. Also, it is quite hard to think of any other implementation for achieving the same functionality.</p><p>Now back to optionals. There has been an argument since time immemorial in the Apple developer community whether it is a good practice to use these implicitly unwrapped optional properties.</p><p>Without getting into that debate, let us find a way to ensure that these environment objects are initialized when the app is launched and ready to use in any view without crashing.</p><p>Remember, we talked about the ability to use Environment values in any view of your app. Did it sound familiar to you? The good old <a href="https://cocoacasts.com/what-is-a-singleton-and-how-to-create-one-in-swift">Singleton</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1d5ae009ba3cc51f3f626bcd65bcff5d/href">https://medium.com/media/1d5ae009ba3cc51f3f626bcd65bcff5d/href</a></iframe><p>Here, we are making UserSettings a Singleton class, i.e. It is initialized on app launch and ready to use everywhere.</p><p>We have already conformed it to the ObservableObject protocol and so we can use the ObserveredObject property wrapper in the views for the UserSettings property instead of EnvironmentObject.</p><p>This ensures that whenever there are changes to the score in the shared UserSettings object, all the views that are observing it will be notified and each view is updated accordingly.</p><p>This ObservableSingleton behaves exactly like the EnvironmentObject except that it won’t crash if you fail to inject. Actually, the former provides you with compile-time safety. The code that compiles properly, should run properly — no unexpected runtime errors.</p><p>So, if compile-time safety is your top priority or you are working on a large SwiftUI project with many developers (this may not happen in the near future), Singleton classes conforming to the Observable protocol might serve you better than EnvironmentObjects.</p><p>But, do you know what the best way is to use EnvironmentObject?</p><p>Do not use it or at least reduce the usage of it. Because, both the EnvironmentObject and the ObservableSingleton stay in the memory (RAM) all the time when your app is running.</p><p>Hence, design your app in such a way that it requires very few properties to be shared across multiple views and make sure that these properties are primitive types and lightweight.</p><p>If you can design your app without any such properties, it is better for you and the app.</p><p>Happy Swifting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9a88b1e253f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/the-best-way-to-use-environment-objects-in-swiftui-d9a88b1e253f">The Best Way to Use Environment Objects in SwiftUI</a> was originally published in <a href="https://betterprogramming.pub">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SwiftUI — Passcode field for OTP and Pin entry]]></title>
            <link>https://imthath.medium.com/swiftui-passcode-field-for-otp-and-pin-entry-b61ba663dc31?source=rss-a361beddb63f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b61ba663dc31</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Mohammed Imthathullah]]></dc:creator>
            <pubDate>Mon, 30 Mar 2020 14:13:48 GMT</pubDate>
            <atom:updated>2020-04-06T09:09:46.890Z</atom:updated>
            <content:encoded><![CDATA[<h3>SwiftUI — Passcode field for OTP and Pin entry</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EbtrNXbKSP8FEEybHxv3DA.png" /></figure><p>You have seen the iOS lock screen, every time your phone misses to recognize your face or fingerprint. Do you want to implement the same for your app?</p><p>Let’s get started!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gNKPmh2bGyCGrtdXjzA22A.png" /></figure><p>We are going to implement the above screen today. It can be used for entering a passcode, pin, OTP and many more.</p><p>Once you learn how this is implemented you can change the circles with squares, dashes or asterisks to suit your requirement. I implemented this primarily for OTP and circles seem the best fit for me.</p><p>Let me share the full code and explain the pieces in it, one by one.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3c3be103a4bf1e0ab8d077abbb75287f/href">https://medium.com/media/3c3be103a4bf1e0ab8d077abbb75287f/href</a></iframe><p>The core idea is that a text field and the circle images are added to a ZStack at the same position, with textField above the images in Z axis and the elements in the textField are set clear color.</p><p>The images equal to the number of maxDigits, which defaults to four, are inside a HStack . Based on the number of characters the user has entered, we show a circle border or a filled circle. Tapping the showPin button which looks like an eye, will show the numbers which the user has entered.</p><p>There is no delegate to get changes as the user types in the textField. Hence, we are using this workaround of a Binding&lt;String&gt;. Even this entire PasscodeField is a workaround. If Apple provides a proper way to conform to TextFieldStyle <a href="https://developer.apple.com/documentation/swiftui/textfieldstyle">protocol</a>, none of this might be required. ButtonStyle, ToggleStyle protocols are super cool and make life much easier.</p><p>Let us get back to the code now. Every time the value changes, we call a method and check if the user has entered maximum digits. If yes, we disable the textField and call the completion handler block.</p><p>If you can notice, contrary to many implementations of UITextField for SwiftUI out in the web, I implemented this using SwiftUI’s TextField. UITextField is required only for making it the first responder on appearing as mentioned in the comments of the gist, so other things should work across all SwiftUI supported platforms.</p><p>By the way, the<a href="https://github.com/siteline/SwiftUI-Introspect"> Introspect library</a> I’ve used for making it the first responder is useful in other cases also. You can check it out.</p><p>Happy Swifting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b61ba663dc31" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>