<?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 Laura Carvalho on Medium]]></title>
        <description><![CDATA[Stories by Laura Carvalho on Medium]]></description>
        <link>https://medium.com/@laura.carvalho?source=rss-3fff0e6e7ad2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*kQoEpZMo2IVzJDFw.jpg</url>
            <title>Stories by Laura Carvalho on Medium</title>
            <link>https://medium.com/@laura.carvalho?source=rss-3fff0e6e7ad2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 23:32:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@laura.carvalho/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[Xcode Previews speed up app UI development and testing]]></title>
            <link>https://medium.com/arctouch/xcode-previews-speed-up-app-ui-development-and-testing-8acb32ef1f77?source=rss-3fff0e6e7ad2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8acb32ef1f77</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[best-practices]]></category>
            <dc:creator><![CDATA[Laura Carvalho]]></dc:creator>
            <pubDate>Wed, 18 May 2022 16:02:58 GMT</pubDate>
            <atom:updated>2022-05-18T16:02:58.848Z</atom:updated>
            <content:encoded><![CDATA[<p>At <a href="https://developer.apple.com/videos/play/wwdc2019">WWDC in 2019</a>, Apple introduced a powerful new way to create user interfaces for their iOS, iPadOS and macOS platforms: SwiftUI. This allows <a href="https://arctouch.com/services/ios-developers/">iOS developers</a> to build user interfaces in a state-driven declarative style. As Apple states, it’s a modern and faster way to design UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*OymSMS60scY6Y8NR368zVQ.png" /></figure><p>Along with all the exciting changes Apple added with SwiftUI, one specific item really stood out: Xcode Previews.</p><p>As a more visual thinker, I’ve always liked Storyboards because I could see the user interface as I was building it (regardless of the extra build time and merge issues when working in a big team). Using ViewCode was hard at the beginning without having a preview of what I was building. With regular use I improved, but it was still taking too long to see the screen being built when making trivial changes like the background color or adding some button padding. So I was very happy when I saw that Apple combined the best features of the two worlds into Xcode Previews!</p><h3>What is the Xcode Preview tool?</h3><p>Xcode Preview is a tool that displays a preview of the view’s content that stays in sync with changes to the view’s code. It provides a real representation of the UI you’re developing showed in a canvas next to your code.</p><p>To use the Xcode’s canvas, you need to make your view conform to the PreviewProvider protocol and Xcode will take care of the rest:</p><blockquote><em>it will statically discover preview providers in your project and generates previews for any providers currently open in the source editor. Xcode generates the preview using the current run destination as a hint for which device to display. </em>(<a href="https://developer.apple.com/documentation/swiftui/previewprovider">PreviewProvider doc</a><em>)</em></blockquote><h3>Why Xcode Preview is cool?</h3><p>Since<em> </em>it’s a tool to display a real presentation of what is in your code, you can easily change the view’s code and see those changes reflected in the canvas. This makes the view always visible and editable at all times.</p><p>This reduces the time to get UI feedback on code changes. You can also speed up development through Xcode Preview by quickly trying all different possible user configurations like dark mode, localization, larger fonts, portrait/landscape orientation, and different device size without the need to run the code every time to see each configuration.</p><h3>The PreviewProvider Protocol</h3><p>Xcode knows what view and what file you are currently working on at all times, so it uses Swift’s dynamic replacement feature to compile just that file and inject that implementation back into your live preview.</p><p>All you need to do is implement a small type that conforms to a <em>PreviewProvider</em> protocol, which is a part of a SwiftUI framework. This type is the one responsible for producing the view previews and the only required property for this protocol is the `previews` variable. The return of this variable is completely up to the developer, as long it is a view.</p><p>Once the <em>previews</em> variable is implemented, Xcode detects its provider and generates a preview of the implementation using the current run destination (the device we select to run our code on) as a hint for which device to display in the Canvas.</p><p>When you create a new SwiftUI View, Xcode automatically inserts a preview structure at the bottom of the file, like this:</p><pre>import SwiftUI</pre><pre>struct HelloWorldView: View {<br>  var body: some View {<br>    Text(“Hello, World!”)<br>  }<br>}</pre><pre>struct HelloWorldView_Previews: PreviewProvider {<br>  static var previews: some View {<br>    HelloWorldView()<br>  }<br>}</pre><p>Another way to have this preview boilerplate added to your code is using the menu Editor &gt; Create Preview option. However, this option will only be available to you if the selected file has imported SwiftUI.</p><h3>Using Xcode Previews to speed up UI Development</h3><p>Xcode Previews has modifiers which help speed up UI development and testing. Here’s some of the favorites that our <a href="https://arctouch.com/services/ios-developers/">iOS developers</a> use every day.</p><h4>Color Scheme</h4><p>Starting on iOS 13, users now can choose to adopt a dark system-wide appearance called Dark Mode. Since then most of our apps are designed for two kinds of color schemes: light and dark mode. With previews, we can develop (and see) our views in both schemes at the same time inside the Canvas by using the <em>.preferredColorScheme </em>modifier<em>.</em></p><p>The Light Mode is the default color scheme.</p><figure><img alt="Screenshot of Xcode environment with a SwiftUI view presenting a Hello Word text and using the preferredColorScheme modifier" src="https://cdn-images-1.medium.com/max/1024/0*M3BooiK6N5xpLy_u" /><figcaption>The Xcode Preview color scheme modifier shows your UI in either dark or light mode.</figcaption></figure><blockquote><strong>ps</strong>: The <em>previewLayout</em> modifier is a very helpful one when you want to limit the size of the view used in the preview. If you don’t use it, Xcode will use the current run destination of our app. <em>previewLayout</em> has 3 options:<br>- <strong>sizeThatFits</strong>: fits the preview to the size of your content<br>- <strong>fixedSize</strong>(width: .., height: ..): display a fixed size, in which you define its width and height, to display our content<br>- <strong>device</strong>: shows the preview using the device set as the run destination</blockquote><h4>Portrait/Landscape</h4><p>Another cool modifier that allows us to see our view being built in different interface orientations is the <em>previewInterfaceOrientation</em>. This modifier accepts the 4 available values. Preview always uses Portrait as its default interface orientation.</p><figure><img alt="Screenshot of Xcode environment with a SwiftUI view presenting a Hello Word view and using the previewInterfaceOrientation modifier" src="https://cdn-images-1.medium.com/max/1024/0*Zc8R4VkNv1ARUsFE" /><figcaption>The Xcode Preview orientation modifier shows your UI in either portrait or landscape.</figcaption></figure><p>This is a much faster way to see your view in multiple orientations versus having to run your code and rotate the simulator or device.</p><h4>Multiple Devices</h4><p>You can also save up some developing/running time using the <em>previewDevice</em> to see the views on different devices with different screen sizes. Xcode will try to use the device set in the run destination, but you can also define your own device to be used by the Preview.</p><p><em>previewDevice</em> modifier receives a PreviewDevice object as a parameter. The PreviewDevice object receives a String as a parameter which represents the name of the simulator in the list of simulators.</p><p>For example, if you want to see a preview in an iPhone 13 mini you declare a PreviewDevice(rawValue: “iPhone 13 mini”). Xcode handles the rest for you. There’s no limit to creating previews, so you can add as many different device previews as you want.</p><figure><img alt="Screenshot of Xcode environment with a SwiftUI view presenting a Hello Word view and using the previewDevice modifier. In de Canvas there is an iPhone 13 simulator and an iPod 7th gen simulator." src="https://cdn-images-1.medium.com/max/1024/0*PJuOd5DVwY4-4a5n" /><figcaption>The Xcode Preview device preview modifier shows your UI in various devices and screen sizes.</figcaption></figure><h4>Pin Previews</h4><p>One of the great SwiftUI highlights is how easy it is to create small view components and compose them to form a larger view. This helps reuse components and makes it easier to define a design system for apps.</p><p>Let’s say you are working on a view that is composed of other views. You need to change something in one of those views and would like to see this change right away on the complete screen. Of course, you could go to the view’s file, edit it, and then come back to the composing screen, but there’s a better way.</p><p>Inside the Canvas, there is a Pin Preview button located at the bottom left corner. It pins the current preview to the Canvas. As you make changes, you’ll see them updated in the view’s preview and the pinned preview.</p><figure><img alt="Screenshot of Xcode environment with a SwiftUI view presenting a Hello Word view. There is also a green circle at the left bottom corner of the Canvas, showing where the Pin button is located." src="https://cdn-images-1.medium.com/max/1024/0*KF_T3yBFTXteFfER" /><figcaption>The Pin Preview button in Xcode pins your preview to the Canvas.</figcaption></figure><h3>UIKit and Previews</h3><p>Although the PreviewProvider protocol is part of the SwiftUI framework, it doesn’t mean that it only works with SwiftUI code. In order to make this tool available to UIKit views as well, there are two other protocols designed to bridge the differences between UIKit and SwiftUI: <em>UIViewRepresentable</em> and <em>UIViewControllerRepresentable</em>.</p><p>Including those protocols in UIKit elements converts the code into something that SwiftUI understands and is able to simulate in the preview. If you have a UIView you’ll have to create a struct that implements <em>UIViewRepresentable</em>. Use <em>UIViewControllerRepresentable</em> if you are working with view controllers.</p><p>Here’s an example of the <em>UIViewRepresentable</em> implementation, but for a <em>UIViewControllerRepresentable</em> implementation is essentially the same thing.</p><p>The <em>BadgeView</em> example below contains a globe icon from SF Symbols and a Hello World label. The components are positioned using autolayout. To make <em>BadgeView</em> visible to SwiftUI and therefore to Previews, you need to implement <em>UIViewRepresentable</em>.</p><p>Since views in SwiftUI are structs, declare a struct to implement the protocol.</p><pre>struct BadgeViewRepresentable: UIViewRepresentable {<br> func makeUIView(context: Context) -&gt; BadgeView {<br>    return BadgeView(frame: CGRect(x: 0,<br>                                   y: 0,<br>                                   width: 100,<br>                                   height: 50))<br> }<br> <br> func updateUIView(_ uiView: BadgeView, context: Context) {}<br>}</pre><p><em>makeUIView</em> and <em>updateUIView</em> need to be declared in order to make it compilable. Since you are only targeting the previews, you can leave <em>updateUIView</em> empty. The other method is the one responsible to connect your UIKit code available for SwiftUI. Notice that the return of makeUIView is the UIKit view, so just return your UIKit view here and you’re good to continue.</p><p>Once <em>UIViewRepresentable</em> is implemented it is time to instantiate the preview part.</p><pre>struct BadgeViewRepresentable_Previews: PreviewProvider {<br>  static var previews: some View {<br>    BadgeViewRepresentable()<br>      .previewLayout(.sizeThatFits)<br>  }<br>}</pre><p>The code here is exactly the same as you’ll see in SwiftUI views. The only key is that the view you need to use here is the struct that implements <em>UIViewRepresentable</em>, which in this case is <strong><em>BadgeViewRepresentable</em></strong>().</p><p>You should now see your UIKit view in the Canvas</p><figure><img alt="Screenshot of Xcode environment with a view coded using Autolayout but being shown at the Canvas, using the Preview tool" src="https://cdn-images-1.medium.com/max/1024/0*HgwHvLSOVw1K3nzN" /><figcaption>Example of how to show UIKit items in the Xcode Preview canvas.</figcaption></figure><p>Now you have a good understanding of how Xcode Previews help speed up app UI development and testing. If you need any additional help with your app development projects ArcTouch offers expert app design, development, QA and product management services. <a href="https://arctouch.com/contact">Contact us</a> to learn more.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8acb32ef1f77" width="1" height="1" alt=""><hr><p><a href="https://medium.com/arctouch/xcode-previews-speed-up-app-ui-development-and-testing-8acb32ef1f77">Xcode Previews speed up app UI development and testing</a> was originally published in <a href="https://medium.com/arctouch">ArcTouch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Descubra Como É a Rotina De Uma Desenvolvedora Mobile Por Aqui]]></title>
            <link>https://medium.com/arctouch/descubra-como-%C3%A9-a-rotina-de-uma-desenvolvedora-mobile-por-aqui-b1e2a84c1b1?source=rss-3fff0e6e7ad2------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1e2a84c1b1</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[rotina-de-trabalho]]></category>
            <category><![CDATA[desenvolvimento-mobile]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[brasil]]></category>
            <dc:creator><![CDATA[Laura Carvalho]]></dc:creator>
            <pubDate>Fri, 05 Nov 2021 11:29:47 GMT</pubDate>
            <atom:updated>2021-11-05T11:39:32.718Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yXuszlsoN5qQureM" /></figure><p>Sou <strong>desenvolvedora mobile</strong> (com foco em <a href="https://arctouch.com/services/ios-developers/">iOS</a>) aqui na ArcTouch há quase 6 anos. Durante esse tempo, consegui mergulhar bastante nessa área que faz meus olhos brilharem diariamente. E, diferentemente do que se poderia imaginar, não, eu ainda não cansei do que faço por aqui.</p><p>Na <a href="https://arctouch.com/">ArcTouch</a>, não chega aquele momento em que a pessoa desenvolvedora mobile olha para o próprio trabalho e sente que estagnou. Uma das coisas que influenciam isso é que tem vários projetos acontecendo simultaneamente com equipes diversas, e, com isso, há espaço para experimentar muitas coisas diferentes.</p><p>Claro que, por trás de todas as novidades e inovações incríveis que estamos desenvolvendo por aqui, cada um precisa ter uma rotina. A boa notícia é que cada pessoa pode estruturar essa rotina da forma que se sentir mais confortável.</p><h3>A base para começar (quase) todos os meus dias</h3><p>A rotina que vou compartilhar com você é justamente aquela que mais me ajuda a ser produtiva. Afinal, após tantos anos, já tive muita abertura para experimentar outros formatos.<em> (Quem sabe, minha forma de organizar o dia a dia não te inspira a tentar uma nova maneira?)</em></p><p>Logo após ligar meu computador, olho a agenda para saber os compromissos que terei naquele dia, assim, posso me planejar. Depois, eu confiro meu e-mail e o Slack — esses dois últimos são especialmente importantes porque nossa comunicação geralmente é assíncrona, já que trabalhamos em horário flexível e com equipes de outros países.</p><p>O próximo passo que sigo é abrir o GitHub para fazer os <em>code reviews</em> que estão abertos. Isso, claro, pode ser repetido mais algumas vezes ao longo do dia, conforme a necessidade. Por fim, abro o Jira para ver como estão os status dos tickets em que estou envolvida e, então, pego uma nova tarefa ou continuo de onde parei.</p><p>Quando essas tarefas básicas são finalizadas é que começa a “emoção”, digamos assim. Sempre estou envolvida em projetos diferentes, com novos requisitos e desafios. Então, as tarefas e pesquisas que terei que fazer a partir daqui estão sempre se renovando — e eu absolutamente adoro isso. Navegar entre equipes e clientes é algo que sempre me dá um novo gás enquanto desenvolvedora mobile.</p><h3>Toda rotina tem seus desafios…</h3><p>Apesar de eu gostar muito dessa nossa dinâmica aqui na ArcTouch, é importante falarmos dos desafios que ela também traz. (<em>O que não precisa ser visto como algo ruim, até porque são os desafios que nos ajudam a crescer na carreira, não é mesmo?</em>).</p><p>Na minha percepção, um desafio rotineiro que pessoas que são desenvolvedoras mobile têm por aqui é a comunicação<strong>.</strong> Quando mudamos de equipe ou de cliente é sempre necessário buscar a melhor forma de se comunicar nesse novo cenário. Um tom não funciona igualmente bem com todo mundo, assim como uma forma de explicar algo. É preciso exercitar a empatia para encontrar soluções, especialmente no início de um projeto, quando quase tudo é novo, incluindo as pessoas envolvidas.</p><p>Um desafio que também pode surgir é lidar com tarefas novas. Quando é uma tarefa que já temos costume, sabemos o que precisamos fazer ou quem podemos procurar para nos apoiar. Porém, quando temos uma novidade em nossas mãos, é preciso pesquisar, ir atrás de conteúdo, além de testar e adaptar possibilidades de resolução para um problema.</p><h3>… porém, por aqui, enfrentamos tudo unidos</h3><p>Se tem algo que eu acho que é um absoluto diferencial de trabalhar aqui — além da rotina dinâmica que já mencionei — são as <strong>pessoas</strong>. Todo mundo que está aqui tem um profundo <em>fit cultural </em>com a ArcTouch. Por isso, nossos valores, especialmente <em>ownership </em>e <em>fellowship, </em>podem ser observados em todo mundo e em cada projeto. Isso faz com que o nível do nosso time seja muito elevado e os resultados acompanhem tudo isso. E não falamos só de resultados relacionados ao negócio, mas também de crescimento pessoal, de investimento e apoio aos nossos colaboradores, de iniciativas de diversidade e times inclusivos. Com certeza grande parte de nossa cultura e atitudes se refletem em nosso reconhecimento pela <em>Great Place To Work.</em></p><p>Nossa equipe aqui da ArcTouch é formada por pessoas de vários lugares do Brasil e do mundo. Então, se você é uma pessoa desenvolvedora mobile que se identifica com o nosso jeito de ser e fazer<em> digital products and lovable apps</em>, <a href="https://carreiras.arctouch.com/base-de-talentos-ibd?utm_medium=blog&amp;utm_source=organico&amp;utm_campaign=banco-talentos-arctouch&amp;utm_content=rotina-desenvolvedora-mobile">junte-se a nós</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1e2a84c1b1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/arctouch/descubra-como-%C3%A9-a-rotina-de-uma-desenvolvedora-mobile-por-aqui-b1e2a84c1b1">Descubra Como É a Rotina De Uma Desenvolvedora Mobile Por Aqui</a> was originally published in <a href="https://medium.com/arctouch">ArcTouch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>