Styling a view is the most important part of building beautiful user interfaces. When it comes to the actual code syntax, we want reusable, customizable and clean solutions in our code.
This article will show you these 3 ways of styling a
As a general rule of thumb, any approach is viable. In the end, it comes down to your general code-style guidelines and personal preferences.
This is one is straight forward and can be visualized with an example rather quickly:
This view takes two parameters
When your iOS app uses Markdown documents, why can’t we just transform them into natives view? What if instead of writing Swift UI code, we build a custom viewer app, which can even be run from Xcode Live Preview Canvas?
Just look at what you can do with it:
In this story we are going to cover the following topics:
In case you want to see the full library, checkout the GitHub repository CoolDown, our own Markdown parser @ techprimate.com, …
You know Markdown, right? That text format which uses funky characters like
> to create well formatted documents? Awesome! Many platforms use it on a daily basis, so you will eventually use it too.
Now, what if you need a markdown parser for your Swift application? Well, we could just use one of the well-tested ones (which can be found using your favorite search engine on GitHub), but instead… you can also create your own version.
A good developer should write great code with high maintainability and extensibility. Even better developers extend the programming language with smart functionality that makes it easier to read and write clean code.
Let me show you 5 code extensions for Swift, which I use on a daily basis. Every single one is explained in detail and recreated from its backstory/original intent.
In case you TL;DR and only want to see the code, scroll to each The Smart Solutions headline for the copy-paste ready code, or checkout the link in the conclusion.
Every developer has at least once experienced an “out-of-bounds”…
Before the release and hype of SwiftUI we had to use plain UIKit for iOS and AppKit for the macOS interfaces… even if the core application was exactly the same.
Naturally your cross-platform applications keep growing over time, and eventually you get to the point of refactoring the code into modules.
This tutorial shows you, how to harness the impressive power of the Swift Package Manager (SPM) to create a clean, extensible and especially shared UI structure for your large-scale apps.
Note: This is a follow-up tutorial to Modularize Xcode Project using local Swift Packages and builds up on the…
To start off this story, you will see a very basic code example which includes a few issues. Together we will improve the code snippet and eventually create a sophisticated solution.
Even tough this story uses SwiftUI in this story, it is not the main scope, and only used for simpler code snippets. The concepts apply to any kind of Swift projects available, including UIKit/AppKit interfaces or even command line tools.
Take a look at the following example of a view showing a call-to-action message and the action button:
If you use this code snippet in a SwiftUI app…
Swift Package Manager… SPM…It is everywhere, many use it and it is most likely the future of working with Swift dependencies. A single file to fetch all the sweet Open Source packages. And with higher acceptance of the community, even more packages will get available without installing any more tools, such as Cocoapods or Carthage.
But how can we leverage this dependency structure even further? Is external code the only reason for using a package manager?
Our code bases are growing with every single new file. First we create a folder structure to organize our .swift files, but then even…
Vienna is a beautiful city with high living standards and a modern mindset. It’s time to not only enjoy its diversity, but to actively explore the potential of becoming the next great startup city.
The following story will start off less technical, and instead more historical/personal. Skip to “My first time with GatsbyJS” if you only want to hear about the implementation 😊
Almost 4 years ago, in 2017, I moved from a small city to Austria’s Capitol, Vienna, to study Software Engineering at Vienna University of Technology (TU Wien). As I have mostly been self-taught in the 4 years…
Push Notifications allow developers to send small messages directly to a users device, without actively polling for changes inside the app. Now when it comes to external notifications, sometimes it might not even be possible to contact an iOS device, as they are not reachable from the internet.
While working on my latest CI/CD app kiwi, one of the most requested features are real-time notifications when a build status changes. It’s time for a small excursion to explain, what the purpose of this app is, and why Push Notifications are pretty much the only viable solution for updates:
With the release of iOS 14, App Clips where introduced, with the objective to give users instant access to your mobile iOS app functionality.
After our initial release, when it came to new features, we decided to combine our puzzle game with the App Clip experience.
Just a short summary what App Clips are:
Changing the status quo of iOS & macOS development | Self-Taught | Co-Founder/CTO @techprimate | Follow me on Twitter @philprimes for updates 🚀