Majid Jabrayilov
banner
mecid.bsky.social
Majid Jabrayilov
@mecid.bsky.social
Swift Developer: iOS, watchOS, visionOS, tvOS, macOS.
https://swiftwithmajid.com
ImageCreator type has a static property called availableStyles, an array of supported styles. Verify the availability of the selected style and use only the available one, as not all styles may be available on your device.
swiftwithmajid.com/2025/11/11/g...
November 14, 2025 at 12:13 PM
The Image Playground framework brings Apple’s generative image capabilities right into Swift, making it surprisingly simple to create visuals from text. The core of the framework is the ImageCreator type.
swiftwithmajid.com/2025/11/11/g...
November 13, 2025 at 9:02 AM
SwiftUI provides the FocusState property wrapper that works on all Apple platforms and allows us to focus on a particular view or check if that view is already focused. The usage is effortless.
swiftwithmajid.com/2021/08/24/m...
November 11, 2025 at 10:58 AM
Background Tasks framework allows you to schedule work intelligently in the background. We can handle background tasks using the SwiftUI app lifecycle.
swiftwithmajid.com/2022/07/06/b...
November 10, 2025 at 10:58 AM
The SwiftUI framework introduced the onGeometryChange view modifier, which is backward compatible with iOS 16, macOS 13, tvOS 16, watchOS 9, and visionOS 1. It allows us to track geometry changes of any view in SwiftUI.
swiftwithmajid.com/2024/08/13/t...
November 7, 2025 at 10:57 AM
All we need to play haptic feedback in a SwiftUI view is to attach the sensoryFeedback view modifier with two parameters. The first defines a feedback style, and the second is a trigger value.
swiftwithmajid.com/2023/10/10/s...
November 5, 2025 at 10:26 AM
Swift gives you everything you need to build a type-safe networking layer — enums, phantom types, extensions, etc.
swiftwithmajid.com/2021/02/10/b...
November 3, 2025 at 11:59 AM
The Accelerate framework contains a collection of APIs for digital signal processing called vDSP. It provides tons of highly optimized functions for operations on large data collections.
swiftwithmajid.com/2025/05/13/o...
October 30, 2025 at 10:23 AM
The ViewThatFits view is easy to use. You don’t need to measure space or calculate if a view fits. Simply create an instance and place children views. It automatically measures space and children’s sizes and selects the first fitting view.
swiftwithmajid.com/2022/07/26/v...
October 22, 2025 at 9:16 AM
Here is the solution. Thanks to @natpanferova.bsky.social
October 20, 2025 at 8:33 PM
The Container view API in SwiftUI enables you to restructure views. I was attempting to construct a dashboard view that accepts a view hierarchy and redefines it within a grid using my custom logic.
swiftwithmajid.com/2024/10/01/m...
October 20, 2025 at 9:47 AM
How to place toolbar buttons on the leading and trailing of the search bar?
October 20, 2025 at 9:39 AM
Hero animations are great that's why SwiftUI introduced the matchedTransitionSource view modifier. It works like a magic and allows us to preserve the geometry between views in the navigation stack.
swiftwithmajid.com/2020/12/17/h...
October 14, 2025 at 9:52 AM
The visual effect is anything that can change the visual appearance of the view but doesn’t affect its layout. visualEffect view modifier allows us to attach a set of animatable visual effects by accessing layout information of the particular view.
swiftwithmajid.com/2023/11/07/v...
October 13, 2025 at 9:00 AM
Streaming transforms how we interact with Foundation Models, shifting from static responses to dynamic, real-time experiences. By leveraging the streamResponse API, we can progressively display model output as it’s generated.
swiftwithmajid.com/2025/10/08/b...
October 10, 2025 at 10:17 AM
The Observations type conforms to the AsyncSequence protocol, allowing us to use instances inside asynchronous for-loops. The closure that initializes the Observations instance implicitly observes all touched properties of observable instances.
swiftwithmajid.com/2025/07/30/s...
October 8, 2025 at 11:48 AM
Almost every feature I’m working on has a feature flag for enabling it in debug and TestFlight builds. Since I merge branches even when the feature isn’t fully implemented, I use feature flags to temporarily disable them.
swiftwithmajid.com/2025/09/16/f...
October 7, 2025 at 1:29 PM
The bottom sheet API in SwiftUI is simple. Attach the presentationDetents view modifier to the sheet’s content. You pass an array of available sizes, allowing users to resize the sheet by dragging.
swiftwithmajid.com/2022/07/19/b...
October 6, 2025 at 9:07 AM
Assume you have a throwing function that might throw an error in a specific case and want to test that behavior. The expect macro allows you to verify the function’s throwing behavior and inspect the error to confirm it’s the desired error case.
swiftwithmajid.com/2024/10/22/i...
October 3, 2025 at 9:15 AM
There is a special NavigationStack initializer accepting a binding to a mutable collection. SwiftUI maps values of the mutable collection into a view hierarchy and allows us to push and pop views into the NavigationStack programmatically.
swiftwithmajid.com/2022/06/21/m...
October 2, 2025 at 9:45 AM
SwiftUI introduced APIs, allowing us to recompose complex view hierarchies, including sections. Similarly to the subviews parameter, SwiftUI defines another overload on the ForEach type, allowing us to enumerate sections.
swiftwithmajid.com/2024/10/01/m...
October 1, 2025 at 9:30 AM
You can always check whenever the platform you are running supports multiple window environments using the supportsMultipleWindows environment value.
swiftwithmajid.com/2022/11/02/w...
September 30, 2025 at 9:30 AM
SwiftUI introduced the ScrollGeometry type with the onScrollGeometryChange view modifier to accurately read content offset. It provides properties like content offset, bounds, container size, visible rectangle, content insets, and content size.
swiftwithmajid.com/2024/06/25/m...
September 29, 2025 at 2:07 PM
The searchFocused view modifier binds the focus of a search field created with the searchable view modifier. It functions like the focused view modifier, but only affects the text field in the current view hierarchy’s search bar.
swiftwithmajid.com/2021/08/24/m...
September 26, 2025 at 10:08 AM
Swift Charts framework allows us to select a single value and a range of values. We can use chartXSelection and chartYSelection with the binding of ClosedRange type to allow range selection.
swiftwithmajid.com/2023/07/18/m...
September 23, 2025 at 10:07 AM