AppForce1: news and info for iOS app developers

The quest for SwiftUI knowledge continues along with an awesome Xcode tip…

September 06, 2021 Jeroen Leenarts Episode 45
AppForce1: news and info for iOS app developers
The quest for SwiftUI knowledge continues along with an awesome Xcode tip…
AppForce1: news and info for iOS app developers +
Help us continue making great content for listeners everywhere.
Starting at $3/month
Support
Show Notes Transcript

One Swift and a few more SwiftUI articles this week. Also a nice keyboard combo for Xcode and how to get started with doc comments in your Swift code.

Links in my episode:

Donny's tweet.

Runway
Put your mobile releases on autopilot and keep the whole team in sync throughout. More info on runway.team

Lead Software Developer 
Learn best practices for being a great lead software developer.

Practical Combine by Donny Wals
Buy Donny’ book on combine and support my podcast. Now that’s a great deal.

Practical Core Data by Donny Wals
Learn Core Data from the ground up using new and modern techniques.

Sendy, send newsletters, 100x cheaper
A self hosted email newsletter, send emails via Amazon SES without sacrificing deliverability.

Disclaimer: This post contains affiliate links. If you make a purchase, I may receive a commission at no extra cost to you.

Support the show

Rate me on Apple Podcasts.

Send feedback on SpeakPipe
Or contact me on Mastodon: https://hachyderm.io/@appforce1

Support my podcast with a monthly subscription, it really helps.

My book: Being a Lead Software Developer

Jeroen Leenarts:

Hi, welcome to the 45th episode of my podcast. My name is Leenarts. And I've been developing software for over 19 years developing iOS apps for over nine years, and I'm running the Dutch Coco's for close to eight years. If an iOS app developer, you should listen to my podcast because it will keep you updated some interesting articles and events you might not have heard heard about. In this episode, I'm going to talk about using variadic parameters in Swift. How to create animated gradients in Swift UI, conditional compilation within swift expressions, exploring swift UI map custom annotations, few clipping in Swift UI, the contextual action menu and making documentation that is pleasant to read in Swift. It's been a busy week for me, last week I executed on my workshop. And all in all, I really enjoyed the experience. But something didn't really work out as I hoped it would have. There were a lot less signups than I had expected. But the participants that were in the workshop, really enjoyed the experience. And Daniel really helped me with making sure that the content was good, and that there was a second voice to contrast with my own opinions. So in the end, I think it was very worthwhile to do this workshop. And, of course, the lessons that I learned from this experience, I will take forward into the future. So I do plan on organizing another workshop sometime in the future. But I do think that are a couple things that need to do a little bit different. It's always good to learn, right? On another note, I switched my keyboard back to my clicky switches again. So I'm really not sure yet what I really like, just for your information. This is what it sounds like if I'm typing while recording, which is okay, I think I'm also continuing work on my book, being a lead software developer, I'm, I'm surprised actually how well it's been doing over the last couple of months. And I actually reached a new milestone for me, because when I started writing the book, my initial goal was to just make sure that I sell the book 200 times, and actually past that. So I really look forward what I can do more with this book and how I can provide more value to people already reading my book, and also entice new people to actually buy my book. So if you have any suggestions or topics that you think are suitable for my book, just let me know. And I'll see what I can do with that. So if you haven't bought my book yet, there's a link in the show notes. And who knows, maybe there's something in there that you can really use if you're growing into your own role as a software developer. Now let's dive into the articles of this week. I have one swift related article, and then a whole bunch of Swift UI articles. So the trend of last week is continuing. But I do think that the articles that I have on my list here are really great. And I also have again, one Xcode tip and one tip on making better documentation on your code with the new tooling available and Xcode and swift. So let's get started. First one is by Gabriel Theodoropoulos. Gabriel writes, When coding Swift, there is a function that all developers undeniably called generously and without much thinking, and that is print. We all use it every day everywhere, and most of the times, it's our path towards fast and deep and dirty debugging. Even though print seems to be winning the battle amongst the most used commands in Swift, have you ever wondered how it makes it possible to accept an arbitrary number of arguments? And even more? Have you ever wanted to implement your own function that would be acting just like prints? So to answer all of this, Gabriel wrote this article, and the trick that print is actually using is called variadic parameters. So based on the print function available in Swift, Gabriel really dives into what this is variadic parameters, and how you can actually define and use it in your own code. It's a good overview and a solid rundown on on this specific area of Swift. And if you haven't used it recently, have a look at this article. Because it's just a fun overview. You'll learn a lot about print statements, and on variadic parameters. The next article is how to create animated gradients in Swift UI. It's written by SEMO. He writes, I recently got a question from a reader about how to animate gradients or create animated gradient background using Swift UI. The Swift UI framework provides a number of built in components such as a linear gradient and angular gradient for developers to render a gradient. And swift UI also makes it very easy to create animation using the dot animation modifier. The question is, how can you combine the gradient component and the dot animation modifier to create animated gradients in this tutorial, similar goes into the topic of animating the gradient by changing the start and the end point, animating the gradient using the rotation modifier and animating the gradient using animatable modifier. That's A lot of detail involved with animating things in Swift UI and UI kit. And it's a really good overview to be aware of what you can actually easily animate in Swift UI in your code. And I think the article over@epcot.com is a good introduction to animating in Swift, why and to see how easy it actually is. Then over at swift personnel, that's an article on conditional compilation within swift expressions. This is a swift five to five specific article. It's something new in Swift 5.5, it's now possible to conditionally compile postfix member expression using Swift hash if compile a directory. So what John does is he takes a look at what kinds of situations this might be useful, and how he can really use this in a meaningful fashion in practice. So the main focus of the article by John is how you can use this and why you would use this and the most useful case for this is to work around platform differences. John provides ample examples and ways that you can actually use this new style of conditional compilation in Swift 5.5. Then there's an article by Christoph screen spare, exploring swift UI map custom annotations, He recently wrote another article on Map View in Swift UI. And in this article, he will look into creating custom map annotations, what limitations there are and how you can overcome them. Placing annotations on a map, like marking a specific location is one of the most critical tasks when showing a map in your iOS application, because otherwise, it's just a few of the world, right? So grasstops goes into detail what protocols are involved, for example, the map annotation protocol, how we can use it, and how you can style things with your own artwork to make sure that it's part of your branding and the way that you want your product to look. Of course, if you show an annotation, you also want to be able to hide it. And you might want to navigate from a map annotation. So this is a nice overview on how you can do custom annotations on a map view in Swift UI. Federico over at five stars dot blog has an article on view clipping in Swift UI, Federico writes masking is a powerful technique that we can use to push our app design to the next level. Swift UI offers various ways to do just that. What Frederick is going to do is take you on a tour exploring how you can do clipping in Swift UI. So he introduces what clipping masks are, how you can actually use them, and how you can actually use them in a way that improves the look and feel of your app. He goes into custom shapes of clipping masks like circles and stars. And this is a nice baseline to be able to, to define your own shapes, and do custom masking for yourself. So if you want to do masking within your Swift UI view hierarchies, definitely have a look at the article by Federico and see what kind of cool things you can really do with clipping and masking in Swift UI. The next article is by Dominic Houser, he has an article on the context action menu, use the shortcut Shift Command A or select menu item editor show code actions to open a contextual action menu. Read this article, start learning to use Command Shift A in your code in Xcode, and you will have a convenient way to do a lot of things just by using the keyboard instead of using the mouse look at this article by Dominic to see some more information and some screenshots on what you can actually do with the contextual action menu. Open Xcode and try what commands shift a Deus in various contexts in your code. And the final article is by Leonardo have read holy swift app, he writes making documentation that is pleasant read in Swift, Leonardo writes, today, we will explore a little further into how you can be more descriptive in your Swift code. A very important part of every developer day to day life is to write code that anyone will understand especially because maybe you will be reading your code in the future. And you sure want to be able to reason about it, then what Leonardo does is provide a nice picture on how you can actually use documentation within your code is example is actually something that is related to paintings. In this article, Leonardo describes what different ways you can actually add documentation to your own code. And how you can make sure that this documentation looks good in both Xcode, and document overview of Xcode. It's a very thorough and long article. But there's a lot of information in there and also great examples of what different syntax that you can use as a document, and also what the resulting documentation will look like. So if you still are undecided on whether or not you want to add comments to your code, read this article, because then you will know how you can do it, what it will look like and then you can decide for yourself, if you want to do it. And if you start doing it, how far you want to go with it. And those are the articles of this week. So let's move on to Danny's Monday morning tweets. Nick indicates that it's a new year in Israel. It's a three day holiday and it seems there's a lot of food involved. So Nick, enjoy your days and don't eat too much dude. Ben is frantically Google translating a lot of Sanskrit customer feedback messages. After his WhatsApp relationship analyzer was featured by a publication for Islamic phone users. And Mark is building an app to prank his friends. It's nice to take a break and do something just for fun. Francisco is just beginning to his last week at his current job, the last few months have been quite tough. So he decided to quit. He's got to wrap things up, and then he'll be free to brush up on things that he wants to properly study. Meanwhile, he's searching for a new iOS job. Francisco I highly recommend books by Donnie, by the way cure is wrapping his head around RX swift and combine Of course, it may take him some time, so about a week, but he's super excited to learn react, programming and operator composition. And again, Donnie has a great book and combined Robin is trying to figure out how to do this input from catalyst deaths would be very much appreciated. What he's trying to do is trying to get rid of some whitespace in the Mac OS title bar and extending the iOS bar to the edge. So it's it's a quite a detailed catalyst problem he's facing and I hope somebody can help him. A Darko is making an applet for the front of it is implementing single sign on in his login flow returning combined. And Alexander today starts learning an important topic for himself. He's actually reading the practical Core Data Book by Donna walls. Java is clearing some space on his Mac to install Xcode 13 better. And untrim is saying good morning, Donnie, he just released his new app. And he wants to create an app that scan images from his folders for coats that did not require subscriptions. He's thinking about adding an actual extension for the next version of the app. So users can scan images directly within the photos application. SEMO is starting today with betta testing of a new version of Live dot standard app with the new Swift UI elements. Some nice graphs in there. So it seems that someone has had a lot of fun with Swift UI. And that's it for this week. If you have any questions, just hit me up on Twitter at app Force One. If you want to help support the show, have a look at pod fans less Air Force One. Over there, you will find pre releases of interviews that I'm doing like this week, I'm releasing an interview with Jordan Morgan, the author of The Best in Class iOS app developer book. Talk to you again next week.