Get URLs for system folders in iOS 16
Get URLs for system folders in iOS 16Working with files and directories got a lot easier in iOS 16. Previously, to obtain the path to a file in the application folder, we had to use FileManager APIs,...
View ArticleDelay an async Task in Swift using the new clock APIs
Delay an async Task in Swift using the new clock APIsIn Swift 5.7 we have new APIs for interacting with time, that consist of three main components: clock, instant and duration. We can use these new...
View ArticleProgrammatically open a new window in SwiftUI on macOS
Programmatically open a new window in SwiftUI on macOSIn macOS 13 we finally have a way to programmatically present a window in SwiftUI. We can call the new openWindow action from the environment and...
View ArticleSort elements based on a property value using KeyPathComparator
Sort elements based on a property value using KeyPathComparatorIf we have an array of elements in Swift and we need to sort it based on a specific property, we can't use the simple sorted() method.For...
View ArticleCustomizable toolbar on iPad in SwiftUI
Customizable toolbar on iPad in SwiftUIUser customization for toolbars has existed on macOS for a while, but starting from iPadOS 16, this feature is also available on iPad. This was part of many other...
View ArticleUsing Measurements from Foundation for values in Swift Charts
Using Measurements from Foundation for values in Swift ChartsIn this post we are going to build a bar chart, comparing durations of nature walks in the Christchurch area. We will be using the new Swift...
View ArticleAdjust the direction of focus-based navigation in SwiftUI
Adjust the direction of focus-based navigation in SwiftUIWhen the user navigates through focusable views in our app with the tab key, the focus will move in the reading order: first from the leading...
View ArticleDisplay high precision time with Duration and TimeFormatStyle
Display high precision time with Duration and TimeFormatStyleIn iOS 16 and macOS 13 the Foundation framework has a new way of representing and formatting an elapsed time value with high precision in an...
View ArticleChange TextEditor background in iOS 16
Change TextEditor background in iOS 16Starting from iOS 16 we can set a custom background for TextEditor in SwiftUI using a combination of scrollContentBackground() and background() view modifiers. We...
View ArticleLarge content viewer in SwiftUI
Large content viewer in SwiftUIiPhone users can adjust preferred text sizes in their device settings. There are 7 text sizes available by default from extra small to extra-extra-extra large. Users can...
View ArticleEditable navigation titles in SwiftUI on iOS 16
Editable navigation titles in SwiftUI on iOS 16Starting from iOS and iPadOS 16 we have a new version of the navigationTitle(_:) modifier that accepts a binding to a string. We can use this modifier to...
View ArticleDynamic dates with monospaced digits in SwiftUI
Dynamic dates with monospaced digits in SwiftUIWhen using the Text view in SwiftUI we can show dates and times that automatically update as time passes. To achieve it we can interpolate a date with a...
View Article--- Article Not Found! ---
*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***
View Article--- Article Not Found! ---
*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***
View Article--- Article Not Found! ---
*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***
View Article--- Article Not Found! ---
*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***
View Article--- Article Not Found! ---
*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***
View Article--- Article Not Found! ---
*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***
View Article--- Article Not Found! ---
*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***
View Article--- Article Not Found! ---
*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***
View ArticleImage accessibility labels from Localizable.strings files
Image accessibility labels from Localizable.strings filesI recently discovered that if we add an image name to the Localizable.strings file in a SwiftUI project, SwiftUI will automatically use the...
View ArticleText modifiers in SwiftUI
Text modifiers in SwiftUIApart from regular view modifiers in SwiftUI, there are also text modifiers. They apply specific styles to a Text view and return another Text rather than some View. We can see...
View ArticleCustomize ShareLink appearance with view modifiers
Customize ShareLink appearance with view modifiersWhile we can provide a fully custom view as a label of the ShareLink in SwiftUI, we can also customize the default appearance with view modifiers...
View ArticleTracking hover location in SwiftUI
Tracking hover location in SwiftUIFor a while we only had onHover(perform:) modifier in SwiftUI that is called when the user moves the pointer over or away from the view’s frame. There used to be no...
View ArticleReading keyboard modifiers on iPad in SwiftUI
Reading keyboard modifiers on iPad in SwiftUIWith the advent of desktop class iPadOS applications there are many macOS UX idioms I would like to bring to our iPad apps. One such UX pattern is hybrid...
View ArticleShow chart annotations on hover in Swift Charts
Show chart annotations on hover in Swift ChartsIn this post we are going to see how to create an interactive bar chart that shows chart annotations when the user is hovering over bar marks. The bar...
View ArticleUsing foregroundColor(), foregroundStyle() or tint() to set text color in...
Using foregroundColor(), foregroundStyle() or tint() to set text color in SwiftUISwiftUI has a few different modifiers that can change the color of text, such as foregroundColor(_:),...
View ArticleUsing Layout protocol to align explicitly positioned views in SwiftUI
Using Layout protocol to align explicitly positioned views in SwiftUIWe've just released a big update to our app Exsto, and one of the main additions was an interactive tutorial for new users. The...
View ArticleTesting remote push notifications on iOS simulator in Xcode 14
Testing remote push notifications on iOS simulator in Xcode 14I recently discovered that starting from Xcode 14 we can test remote push notifications on an iOS simulator. Before this, simulators were...
View ArticleUsing compositing group for unifying shapes within buttons in SwiftUI
Using compositing group for unifying shapes within buttons in SwiftUIWe are adding some in-app purchase buttons in our next update in Exsto and we noticed a visual glitch in button pressed state. Since...
View ArticleSwift enum pattern matching with extra conditions
Swift enum pattern matching with extra conditionsIn this post we are going to explore how we can provide more precise conditions for pattern matching when working with enums in Swift. The most common...
View ArticleInspectors in SwiftUI
Inspectors in SwiftUIAt WWDC23 Apple just released a load of new SwiftUI improvements. Among them there is a new SwiftUI inspector(isPresented:content:) modifier.On macOS and iPadOS this modifier adds...
View ArticleAccess colors and images from asset catalog via static properties in Xcode 15
Access colors and images from asset catalog via static properties in Xcode 15Xcode 15 beta comes with a great new way to access colors and images stored in asset catalog. It automatically generates...
View Articleif/else statements as expressions in Swift 5.9
if/else statements as expressions in Swift 5.9Swift 5.9 that comes with Xcode 15 introduces a nice feature, it allows us to use if/else statements as expressions. We can return values from functions,...
View ArticleControlGroup in context menus in SwiftUI
ControlGroup in context menus in SwiftUIStarting from iOS 17 and iPadOS 17 we can now use a ControlGroup inside a contextMenu(), enabling more compact access to common actions. ContentView()...
View ArticleKeyboard driven navigation with focusable() on iPad in SwiftUI
Keyboard driven navigation with focusable() on iPad in SwiftUIThe recent updates to iOS 17 and iPadOS 17 have brought about exciting changes, one of which is the introduction of the focusable()...
View ArticleSee all parameter permutations in code completion in Xcode 15
See all parameter permutations in code completion in Xcode 15Xcode 15 beta comes with some great improvements to code completion. One of my favorite is the ability to view all possible permutations of...
View ArticleInterpolate text with custom foreground style in SwiftUI
Interpolate text with custom foreground style in SwiftUISwiftUI lets us style portions of text by interpolating Text inside another Text and applying available text modifiers, such as foregroundColor()...
View ArticleNotification action buttons with images in iOS
Notification action buttons with images in iOSAction buttons are a vital part of the iOS notification system, allowing users to interact with notifications directly from the home screen. According to...
View ArticleiOS app setup for remote push notifications
iOS app setup for remote push notificationsRemote push notifications are messages that app developers can send to users directly on their devices from a remote server. These notifications can appear...
View ArticleFiltering logs in Xcode 15
Filtering logs in Xcode 15We have some great new features in the debug console in Xcode 15. I'm particularly excited about improved filtering functionality that makes it much easier to view console...
View ArticleHierarchical background styles in SwiftUI
Hierarchical background styles in SwiftUIBefore iOS 17 to get hierarchical system background colors in SwiftUI we usually had to convert them from UIColor. For example, to get the secondary system...
View ArticleUsing Observation framework outside of SwiftUI
Using Observation framework outside of SwiftUIThis year at WWDC 2023 Apple introduced the new Observation framework which provides an implementation of the observer design pattern in Swift. Classes...
View ArticleCreate an AsyncStream from withObservationTracking() function
Create an AsyncStream from withObservationTracking() functionAfter Natalia wrote her previous post on how to implement the observer pattern in Swift in iOS 17 Using Observation framework outside of...
View ArticleTrigger property observers from initializers in Swift
Trigger property observers from initializers in SwiftIn Swift, property observers such as willSet and didSet are not called when a property is set in an initializer. This is by design, as the...
View ArticlePattern matching for custom types in Swift
Pattern matching for custom types in SwiftPattern matching in Swift is a technique that allows us to check and de-structure data in a concise way. It's most often seen in switch statements, where it...
View ArticleCase insensitive string comparison in Swift
Case insensitive string comparison in SwiftString comparison is a fundamental aspect of many programming tasks, from sorting and searching to data validation. The simplest method to compare two strings...
View ArticleUse cases for self, Self and Self.self in Swift
Use cases for self, Self and Self.self in SwiftThe Swift language constructs self, Self, and Self.self can sometimes be a source of confusion, even for experienced developers. It's not uncommon to...
View ArticleUser-friendly descriptions and recovery suggestions for custom errors in Swift
User-friendly descriptions and recovery suggestions for custom errors in SwiftCreating a seamless user experience in Swift involves not just managing errors but also communicating them effectively. By...
View ArticleSending trial notifications with provisional authorization on iOS
Sending trial notifications with provisional authorization on iOSIn the world of iOS app development, engaging users effectively while respecting their preferences is crucial. Notifications can be a...
View Article
More Pages to Explore .....