You first need a class that acts as the delegate for the userNotificationCenter. Then you need to create an instance of this on your @main, and then tell the notification center what the delegate is.
iOS Notifications While App is Open
Below is code for creating a notification locally on iOS, and triggering it 5 seconds later. Don’t forget to request permissions to send notifications.
Advanced SwiftUI Stepper
Apple’s built in stepper allows you to only have one step increment value, I’ve designed on that allows for two different increment values. Initial version supported 1 and 10 for the step values and is tied to an integer. This of course is the first revision, and it isn’t very […]
Swift Temperature Format Customization
When you use Measurement format function in Swift it will always format the temperature to the format of the locale of the device. This is not the experience I wanted in my application. I wanted to provide the user an option to chose which scale they wanted to use, so […]
Slide Out Menu for iOS using SwiftUI
This week I’ve been working on prototyping a slide out menu, or as most people know it as the hamburger menu. This is a very useful navigation system for apps once the scale past 5 “systems” or tabs. This system has to wrap the main content view inside of a […]
Navigation View Constraints
If you are using Swift UI and you get an error based around the constraints, you might be able to fix it by putting this line at the end of your navigation view. .navigationViewStyle(.stack)