<?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 Ali Pishvaee on Medium]]></title>
        <description><![CDATA[Stories by Ali Pishvaee on Medium]]></description>
        <link>https://medium.com/@alipishvaee?source=rss-76b8426714d6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*DtZFyMWrus1v8-kGvqhJRA.png</url>
            <title>Stories by Ali Pishvaee on Medium</title>
            <link>https://medium.com/@alipishvaee?source=rss-76b8426714d6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 23:11:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alipishvaee/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[Apple WWDC 2020 -Part 2]]></title>
            <link>https://medium.com/@alipishvaee/apple-wwdc-2020-part-2-d5df0f523bdc?source=rss-76b8426714d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5df0f523bdc</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[apple-wwdc-2020]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[ios-14]]></category>
            <category><![CDATA[ios-development]]></category>
            <dc:creator><![CDATA[Ali Pishvaee]]></dc:creator>
            <pubDate>Fri, 03 Jul 2020 12:01:22 GMT</pubDate>
            <atom:updated>2020-07-03T15:04:33.052Z</atom:updated>
            <content:encoded><![CDATA[<h3>SwiftUI2 new features-Part 2</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ibC1lrwHAAnYrWjdqldb-g.jpeg" /></figure><p><strong>What apple brings for iOS developers.</strong></p><h3><strong>ProgressView</strong></h3><p>One of the the new features apple introduced in WWDC 2020 is the new <strong>ProgressBar and UIActivityIndicatorView </strong>we used earlier in Swift. Now only with writing a short piece of code you can create <strong>UIActivityIndicatorView.</strong></p><p>if you want to add text to it simply just put it into the perenteses like below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3926272b3b8e02a106b7c71dc35100af/href">https://medium.com/media/3926272b3b8e02a106b7c71dc35100af/href</a></iframe><p>And finally we can change this progressView into linear one only by adding few lines of codes. First we create an observable variable and then set it to <strong>value</strong> key of <strong>ProgressView. </strong>Then we set a maximum amount on <strong>total</strong> key and finally for testing, we add a button to increase initial value of loadingValue variable<strong>.</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9c6ebbe4e51e7888fd0b388b56507614/href">https://medium.com/media/9c6ebbe4e51e7888fd0b388b56507614/href</a></iframe><h3><strong>LazyVStack And LazyHStack</strong></h3><p>Most of us are familiar with the concept of <strong>lazy loading</strong>. We used it alot in our current projects and they are so useful. Now apple brings <strong>lazy loading</strong> to VStack.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f2d654bc62cc1cf5e04beb173b5cce2/href">https://medium.com/media/2f2d654bc62cc1cf5e04beb173b5cce2/href</a></iframe><p><strong>LazyVStack</strong> will prevent creating and loading objects before it is necessay. We can use <strong>LazyHStack</strong> but remember to change direction of ScrollView :) .</p><h3><strong>ColorPicker</strong></h3><p>One of the exciting features apple added to <strong>SwiftUI2</strong> is <strong>ColorPicker</strong>. With <strong>ColorPicker</strong>, user can interact with app more easily and change the color of the objects as fast as he/she wants. let’s take a look.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b08861f1efa143f86358541c3ba32c2/href">https://medium.com/media/2b08861f1efa143f86358541c3ba32c2/href</a></iframe><p>We can add title and also change size and other properties to keep the it’s features organized.</p><h3><strong>DatePicker</strong></h3><p>In iOS 14 apple introduced new style for <strong>DatePicker. </strong>To use this feature first of all we create a DatePicker and then set it’s style to <strong>GraphicalDatePickerStyle.</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0001e4670f5efd84111f4b799365d4bc/href">https://medium.com/media/0001e4670f5efd84111f4b799365d4bc/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/1*4ONMfLy2RN-1DaFmnzQjLg.png" /></figure><h3>Link</h3><p>Another new feature apple added to iOS 14 and SwiftUI2 is <strong>Link. </strong>Now we can set url behind the label or text or whatever we want as easy as abc. let see how we can use it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e5114b5bd7cba45266c33c504b831dc9/href">https://medium.com/media/e5114b5bd7cba45266c33c504b831dc9/href</a></iframe><p>As you can see in first paragraph we set the url behind the text and in second paragraph we set url behind the image.</p><h3><strong>VideoPlayer</strong></h3><p>Now in iOS 14 we can simply show online video contents in our application by using new feature called <strong>VideoPlayer</strong>. Also we can even add watermark to our video player. Let’s take a look at some code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/21161500cddd150a58e54c1284e2d623/href">https://medium.com/media/21161500cddd150a58e54c1284e2d623/href</a></iframe><h3><strong>SpriteKit</strong></h3><p>Now we can simply add SpriteKit to our SwiftUI2 application by written code inside Swift View file. In the below code we add a simple and easy to use spriteKit example to show how it works.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fcac942746b852e97b19c8576f1aaba1/href">https://medium.com/media/fcac942746b852e97b19c8576f1aaba1/href</a></iframe><h3>DisclosureGroup</h3><p>Another amazing feature added in iOS 14 is <strong>DisclosureGroup</strong>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ebc6d51e4a88c2926f0bfd95ac5fe66b/href">https://medium.com/media/ebc6d51e4a88c2926f0bfd95ac5fe66b/href</a></iframe><h3>GridView</h3><p>Now we can easily create Grids using new <strong>GridView</strong> feature in iOS14. To do so first of all if we want to use LazyVGrid, we create column. We can set <strong>GridItem</strong> width adaptive so the app will calculate the total width and we put possible columns in it or we can statically add column to <strong>columns constant</strong>.</p><p>Then we will put this column into <strong>LazyVGrid</strong> and we’re done.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e41ceb3231d24d82c3ae76f49c3ea003/href">https://medium.com/media/e41ceb3231d24d82c3ae76f49c3ea003/href</a></iframe><p>So we have discussed a little about <strong>iOS 14 new features </strong>and <strong>How</strong> to use it with a <strong>sample example.</strong></p><p>You can also access the<strong> first part </strong>of this article from this<strong> </strong><a href="https://medium.com/@alipishvaee2/apple-wwdc-2020-cc02bbe13da0"><strong>Link</strong></a>.</p><p><strong>Thanks for reading this article if you enjoyed, please share it with others😊.</strong></p><p><strong>I am waiting to see your comment or recommendation in the comment section.</strong></p><p><strong>Feel free to contact me via</strong> <a href="https://www.linkedin.com/in/AliPishvaee">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5df0f523bdc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apple WWDC 2020]]></title>
            <link>https://medium.com/@alipishvaee/apple-wwdc-2020-cc02bbe13da0?source=rss-76b8426714d6------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc02bbe13da0</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[wwdc-2020]]></category>
            <dc:creator><![CDATA[Ali Pishvaee]]></dc:creator>
            <pubDate>Fri, 26 Jun 2020 16:54:00 GMT</pubDate>
            <atom:updated>2020-07-03T15:05:08.029Z</atom:updated>
            <content:encoded><![CDATA[<h3>SwiftUI2 new features-Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ibC1lrwHAAnYrWjdqldb-g.jpeg" /></figure><p><strong>What apple brings for iOS developers in Apple WWDC 2020?</strong></p><h3><strong>SwiftUI App Life Cycle</strong></h3><p>After holding WWDC 2020, Apple released XCode 12 beta and brings with it a lot of good news and surprises for developers. In these series of articles, we will review some of the new features of Xcode 12 beta.</p><p>If you worked with Xcode 11.5 or below you will find the first change while you are creating a new project. A new item added to this page which is called Life Cycle. you have two options to choose from the first and default is <strong>UIKit App Delegate</strong> and the second one is <strong>SwiftUI App</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*q6APSmi7mFgp42_yFYAoCg.png" /><figcaption>Newly added feature to choose Life Cycle type</figcaption></figure><p>First of all, we choose the UIKit App Delegate and create the project. Now we can see the old Life Cycle of apple’s applications: AppDelegate and SceneDelegate in which the last one added in Xcode 11.</p><p>If we create the project using SwiftUI App Life Cycle, there is no sign of AppDelegate and SceneDelegate but instead, we will see a newly introduced file with the name of the project and the postfix of App word.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*nP8Xmr3KXOFNP1jo_vVeyg.png" /><figcaption>Newly introduced SwiftUI App Life Cycle file in Xcode 12 beta</figcaption></figure><p><strong>Apple</strong> definition for <strong>Scene</strong> file is “A part of an app’s user interface with a life cycle managed by the system.” We create an <strong>SwiftUI application </strong>by combining one or more instances of scenes. Another unfamiliar word in this file is windowGroup which creates a window group with an identifier. The window group uses the given view as a template to form the content of each window in the group. WindowGroup takes two parameter: id and content.</p><p><strong>Id</strong> is a string that identifies the window group in a unique way. remember <strong>Ids</strong> must be unique among the window groups in your app.</p><p><strong>content is </strong>a closure that creates the content for each instance of the group.</p><p>WindowGroup has 8 initializer and the above mentioned is the first and default one. We can also add modifier to WindowGroup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*gQcJPcztqNAG9ZZMJyYTpg.png" /><figcaption><strong>Using more than one window group in SwiftUI App file</strong></figcaption></figure><p>We can also use three modifiers on <strong>WindowGroup: </strong>commands, defaultAppStorage and onChange.</p><p>The last one adds an action to perform when the given value changes. We can use this modifier to trigger a side effect when a value changes, like the value associated with an <strong>SwiftUI/Environment</strong> key or <strong>SwiftUI/Binding</strong>. For example, you can clear a cache when you notice that a scene moves to the background:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*ygXkI42QUqWp6cMyDudq2Q.png" /><figcaption>we can add modifier action to Window Group</figcaption></figure><p>DefaultAppStorage is the default store used by <strong>AppStorage</strong> contained within the view. If unspecified, the default store for a view hierarchy is <strong>UserDefaults.standard </strong>but can be set to a custom one. For example, sharing defaults between an app and an extension can override the default store to one created with <strong>UserDefaults.init(suiteName:_)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*mDvHcnpIxNgRuqa-e4yX8Q.png" /></figure><p><strong>Commands</strong> are realized in different ways on different platforms. On macOS, the main menu uses the available command menus and groups to organize its main menu items. Each menu is represented as a top-level menu bar menu, and each command group has a corresponding set of menu items in one of the top-level menus, delimited by separator menu items.</p><p>On iPadOS, commands with keyboard shortcuts are exposed in the shortcut discoverability HUD that users see when they hold down the Command (⌘) key.</p><p>So we have discussed a little about <strong>SwiftUI App Life Cycle</strong> and <strong>How</strong> to use it with a <strong>simple example.</strong></p><p><strong>Thanks for reading this article if you enjoyed, please share it with others😊.</strong></p><p><strong>I am waiting to see your comment or recommendation in the comment section.</strong></p><p><strong>Feel free to contact me via</strong> <a href="https://www.linkedin.com/in/AliPishvaee">LinkedIn</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc02bbe13da0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>