Whenever I start a new iOS Swift project, the first thing I do is import my Utilities and Extension files. They help me make my programming more efficient. Let’s have a look at my six favorite and most essential extensions.
When implementing modern designs, dropping a shadow under a UIView
is often required. Instead of having to write multiple lines of code for each view, I use an extension:
Of course, every project might require some minor changes to the shadow style, but that can be changed in a central place.
As Next Level Swift doesn’t earn any money from articles or posts, we are always looking for your support. There are three simple ways to help us grow and bring more Swift knowledge to Medium!
Yes, we know, yet another newsletter. Very creative by us. But we think our Newsletter is worth your while! Instead of spamming you with redundant and uninteresting content, we only send you a maximum of two letters per month. Firstly, we have our Monthly Highlights Letter, giving you our top 3 Next Level Swift articles of the month, including some further insights into the minds and people behind the piece. Secondly, we have our Feature Letter, where we pick three articles from people who are new to Next Level Swift, helping them getting their fantastic knowledge and thoughts read. If that sounds good, we would love to have you subscribe to our newsletter. …
In my early days of developing on iOS, it took me a while to get my head around the different concepts for passing data between two UIViewControllers (or any other inheriting instances like TableView or CollectionViewController). But honestly, it is much simpler than it feels reading overly complicated StackOverflow posts. I will introduce to you three simple ways I use every day, to send data between two UIViewControllers.
In my opinion, this is the most straightforward technique. Let’s first look at how we can move from our first ViewController A to controller B. Use these lines of code:
if let viewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(identifier: "BViewController") as? BViewController {
viewController.modalPresentationStyle = .fullScreen
self.present(viewController, animated: true, completion: nil)…
Even though Apple packs a lot of functionality into their native Kits (for example, UIKit, HomeKit, or WebKit), developers often require third-party libraries to get their apps running with the least amount of effort. This article will check out how to get our Xcode project running with Cocoapods and install a library.
Before we can use it, we need to install Cocoapods. This can be done via the terminal using homebrew or gem. If you have homebrew installed, run:
brew install cocoapods
Otherwise use:
sudo gem install cocoapods
Next, we need to initialize our project. In a terminal, go to your project directory (the level where the .xcodeproj
file is). …
We are always looking for talented and passionate writers and developers to get more content out to our community. If that’s you, let’s look into what kind of content we are regularly looking for:
To improve the reading experience for everyone, we created a simple style guide. …
When Apple develops (or improves) something, it is usually presented as revolutionary and broadcast to everyone. While Samsung releases its new phones mostly under the radar, watching an Apple keynote live has become somewhat of a modern lifestyle and essential to keeping up with discussions in the office on the next day.
But there are two products that Apple has kept mostly under the radar: Home and Shortcuts.
Home was Apple’s attempt to unify the smart home app jungle. Every light bulb, smart smoke detector, doorbell, and heating control has its app. Turning on the heater and the lights took longer than it should. The problem Apple faced was that HomeKit required the app developers for each smart home appliance to create an interface. …
Let’s have a look at how to run a terminal command from your iPhone using Apple Shortcuts. First, we need Shortcuts installed and be working on automation. Let’s add the action: “Run script over SSH” and tap “Show More”.
Manually setting up a Kotlin Multiplatform Mobile (KMM) project from scratch can be tedious. We want to migrate our Xcode project called medium
to a new KMM application.
For this example, we’ll use a blank KMM project with a twist. If you don’t know how to create a KMM project, check out my previous article first. The twist: In the creation process this time around, we’ll name the iOS application precisely the same as our Xcode project. Doing so removes the need to change the path and code-project variables in Gradle and property files.
In the past years, I moved from one of the world's biggest companies to a small startup. And the differences between the two working worlds are incredible! The entire attitude to work and getting work done is a complete 360. In most prominent companies, ducking when work comes flying is normal. Sitting at your desk for three hours without anything to do before going home is normal. And scheduling long and bloated meetings with as many people as are available is even desired and makes everyone involved feel important. This attitude is entirely different in smaller companies. You most likely enjoy your work and thus go looking for it. When you have nothing to do, which is unusual, you go home and don’t waste your time just sitting around. …
About