Sign in

Majid Jabrayilov

@mecid.bsky.social
1.8K followers 587 following 683 posts

Swift Developer: iOS, watchOS, visionOS, tvOS, macOS. swiftwithmajid.com

PostsRepliesMedia
Majid Jabrayilov @mecid.bsky.social · 16/10/2026
We encounter bugs that are very hard to catch in the debugger from time to time. For example, it might occur only after a few days of app usage. Logging is an excellent technique to track and understand user actions through the app. swiftwithmajid.com/2022/04/06/l...
040 4
Majid Jabrayilov @mecid.bsky.social · 13/10/2026
Toolbars play a crucial role, especially with the recent update to the design language where we have a content layer and the UI controls layer above it, or even with iPhone Duo providing vertical bars. swiftwithmajid.com/2026/06/23/t...
050 5
Majid Jabrayilov @mecid.bsky.social · 12/10/2026
SwiftUI’s .task modifier provides a clean and efficient way to manage asynchronous operations within the view lifecycle. It handles task cancellation, reacting to value changes, and easily implements debouncing using structured concurrency. swiftwithmajid.com/2022/06/28/t...
051 5
Majid Jabrayilov @mecid.bsky.social · 08/10/2026
The new iPhone Duo makes adaptive layouts more important than ever in SwiftUI. With AnyLayout, you can seamlessly switch between horizontal and vertical layouts while preserving view identity and state. swiftwithmajid.com/2022/08/16/c...
040 4
Majid Jabrayilov @mecid.bsky.social · 07/10/2026
Backporting SwiftUI APIs lets us use new features without raising the app’s deployment target; depending on the API, this may bypass availability checks or provide custom implementations for older versions. swiftwithmajid.com/2026/09/22/b...
040 4
Majid Jabrayilov @mecid.bsky.social · 05/10/2026
AsyncSequence isn’t just for streams of events. It can also be a great way to model data loading — producing values as they become available and letting the UI progressively react to them. swiftwithmajid.com/2026/09/29/i...
031 3
Majid Jabrayilov @mecid.bsky.social · 01/10/2026
How to deal with complex features that might need 40–50 async requests to populate the screen? We can model our data fetching using the AsyncSequence type. The AsyncSequence protocol is designed for sequential and iterative access to its elements. swiftwithmajid.com/2026/09/29/i...
051 5
Majid Jabrayilov @mecid.bsky.social · 28/09/2026
Custom layout might be a good solution while adopting your app to iPhone Duo. SwiftUI provides the Layout protocol allowing us to build super-custom layouts by digging into the layout system without using GeometryReader. swiftwithmajid.com/2022/11/16/b...
062 6
Majid Jabrayilov @mecid.bsky.social · 25/09/2026
Use an availability annotation to trigger compiler warnings or errors when new APIs are ready. Pair it with a ported prefix instead of a dedicated namespace to flag and locate obsolete functions easily. swiftwithmajid.com/2026/09/22/b...
061 6
Majid Jabrayilov @mecid.bsky.social · 24/09/2026
Let's introduce a Backport type with a generic constraint. Next, add an extension to SwiftUI’s View protocol to get the instance of the Backport type with a wrapped view. This trick allows us to namespace the APIs we will backport. swiftwithmajid.com/2026/09/22/b...
032 3
Majid Jabrayilov @mecid.bsky.social · 21/09/2026
Another way of adopting your layout to iPhone Duo inner screen is using content margins. The contentMargins view modifier allows us to shift a particular type of content in the view. swiftwithmajid.com/2024/04/23/c...
182 8
Majid Jabrayilov @mecid.bsky.social · 19/09/2026
Do we need something like this for now? #iphone #duo #swiftui swiftwithmajid.com/2023/05/17/a...
073 7
Majid Jabrayilov @mecid.bsky.social · 18/09/2026
ViewThatFits automatically measures available space and the size of its children and takes the first view that perfectly fits the available space. All you need to do is to create an instance of the ViewThatFits view and place in it a few views. swiftwithmajid.com/2022/07/26/v...
020 2
Majid Jabrayilov @mecid.bsky.social · 17/09/2026
Another SwiftUI APIs that might be useful while implementing iPhone Duo layouts is Container APIs allowing you to restructure your views. I've been using it heavily while implementing design primitives for my apps. swiftwithmajid.com/2024/09/24/m...
071 7
Majid Jabrayilov @mecid.bsky.social · 16/09/2026
Another important API to make your app feel home on iPhone Duo is how you display your toolbars. SwiftUI introduced a bunch of new modifiers allowing us to prioritize toolbar items visibility. swiftwithmajid.com/2026/06/23/t...
030 3
Majid Jabrayilov @mecid.bsky.social · 14/09/2026
Meet the new CardioBot readiness mascot powered by Apple Intelligence. This update also includes support for all available device sizes and the redesigned trends, allowing you to understand long-term changes in your health. apps.apple.com/az/app/cardi...
062 6
Majid Jabrayilov @mecid.bsky.social · 14/09/2026
I guess it is the best time to learn or to revise how to use NavigationSplitView in SwiftUI. It is almost the easiest way to support the new iPhone Duo layout in a correct way. swiftwithmajid.com/2022/10/18/m...
051 5
Majid Jabrayilov @mecid.bsky.social · 11/09/2026
iPhone Duo is a completely new device with variable screen size. We have a set of new APIs to understand the screen size of the iPhone, but the fundamental API for recognizing available screen space is still size classes. swiftwithmajid.com/2022/08/16/c...
040 4
Majid Jabrayilov @mecid.bsky.social · 09/09/2026
available(anyAppleOS 27, *) is a new language improvement that significantly simplifies code by eliminating the need to list all five Apple platforms individually in availability attributes. swiftwithmajid.com/2023/05/17/a...
060 6
Majid Jabrayilov @mecid.bsky.social · 07/09/2026
The PromptBuilder type works with any type conforming to the PromptRepresentable protocol. And the framework provides us with a lot of conformances out of the box, like String, Array, Optionals, our Generable types, and the most important, the new Attachment type. swiftwithmajid.com/2026/09/01/b...
051 5
Majid Jabrayilov @mecid.bsky.social · 03/09/2026
I’ve been working on a plate scanner app, a simple app where you capture your plate and it gives you some sort of food analysis, without numbers and calories. This app is a perfect fit for multimodal usage of Foundation Models. swiftwithmajid.com/2026/09/01/b...
020 2
Majid Jabrayilov @mecid.bsky.social · 01/09/2026
SwiftUI introduces the ContentUnavailableView type, allowing us to display empty, error states or any other state where content is unavailable in our apps. swiftwithmajid.com/2023/10/31/m...
041 4
Majid Jabrayilov @mecid.bsky.social · 31/08/2026
A phantom type is a generic type that is declared but never used inside a type where it is declared. It is usually used as a generic constraint to build a more type-safe and robust API. swiftwithmajid.com/2021/02/18/p...
062 6
Majid Jabrayilov @mecid.bsky.social · 28/08/2026
We define a non-optional constant without a value, requiring us to set its initial value before use to satisfy the compiler. This leads to readability issues due to the loss of local reasoning. Switch expressions help address this. swiftwithmajid.com/2024/05/28/i...
040 4
Majid Jabrayilov @mecid.bsky.social · 27/08/2026
The redacted modifier transforms images and text views in the view hierarchy to hide its content. Remember that the redacted modifier hides the data only visually. It is still clickable in case of buttons. It is your responsibility to disable buttons. swiftwithmajid.com/2020/10/22/t...
020 2
Majid Jabrayilov @mecid.bsky.social · 26/08/2026
To handle app refresh tasks in SwiftUI, we have the backgroundTask modifier that we can attach to any scene. SwiftUI relies on the new Swift Concurrency feature and allows us to build complex async jobs using the async/await syntax. swiftwithmajid.com/2022/07/06/b...
021 2
Majid Jabrayilov @mecid.bsky.social · 24/08/2026
SwiftUI provides a way to keep the structural identity of the view hierarchy while changing the layout container using the AnyLayout type. In this case, the SwiftUI doesn’t recreate the views. It only moves them according to the new layout. swiftwithmajid.com/2022/08/16/c...
081 8
Majid Jabrayilov @mecid.bsky.social · 20/08/2026
Modularizing apps in the era of AI agents has become even more crucial. By establishing clear boundaries, you can ensure that your agent respects them, leading to better code outcomes. swiftwithmajid.com/2022/01/19/m...
020 2
Majid Jabrayilov @mecid.bsky.social · 19/08/2026
ViewThatFits automatically measures available space and the size of its children and takes the first view that perfectly fits the available space. You don’t need to manually measure available space or calculate if the particular view fits into the available space. swiftwithmajid.com/2022/07/26/v...
050 5
Majid Jabrayilov @mecid.bsky.social · 18/08/2026
You may think about defer keyword as one of the most ambiguous language features in Swift, but it is very useful in some cases. You can use it deliberately, and it will give you safety. swiftwithmajid.com/2026/05/26/s...
081 8
Majid Jabrayilov @mecid.bsky.social · 17/08/2026
Remember to check whenever user enabled reduced motion accessibility setting while playing you custom animations in the app. SwiftUI provides access to a bunch of environment values like reduced transparency, cross fade transitions, reduced motion, etc. swiftwithmajid.com/2019/09/10/a...
181 8
Majid Jabrayilov @mecid.bsky.social · 14/08/2026
Button is one of the crucial components of any app. We use buttons to provide actions in the user interface of the app. SwiftUI provides a bunch of new view modifiers that allow us to style buttons in different ways. swiftwithmajid.com/2021/06/30/t...
050 5
Majid Jabrayilov @mecid.bsky.social · 11/08/2026
SwiftUI framework provides us a type of transition called content transitions. It allows us to apply a particular transition to the content of the view whenever it changes. SwiftUI has a type of ContentTransition that works with numeric text. swiftwithmajid.com/2022/08/02/c...
060 6
Majid Jabrayilov @mecid.bsky.social · 10/08/2026
Actors is new Swift language feature, making your types thread-safe. Actors like classes are reference types but protect their stored properties from multithread access. swiftwithmajid.com/2023/09/19/t...
051 5
Majid Jabrayilov @mecid.bsky.social · 07/08/2026
SwiftUI introduced a variant of the animation view modifier, allowing us to scope animations using a ViewBuilder closure. The animation works only in the context of the provided ViewBuilder closure and doesn’t spread anywhere else. swiftwithmajid.com/2023/11/21/s...
172 7
Majid Jabrayilov @mecid.bsky.social · 04/08/2026
What is the easiest way to build ParallaxHeader in SwiftUI? There are a bunch of options to implement it, but the usage of visualEffect view modifier is the easiest one. swiftwithmajid.com/2023/11/07/v...
160 6
Majid Jabrayilov @mecid.bsky.social · 03/08/2026
The @Entry macro allows us to create custom environment, transaction, container, and focused values. Instead of manually defining a key type and computed property, you declare a single stored property and Swift generates the rest at compile time. swiftwithmajid.com/2024/07/09/i...
051 5
Majid Jabrayilov @mecid.bsky.social · 31/07/2026
Structural identity is the type of identity that SwiftUI uses to understand your views without an explicit identifier by using your layout description. It is crucial to understand how it works to build great and performant views with SwiftUI. swiftwithmajid.com/2021/12/09/s...
250 5
Majid Jabrayilov @mecid.bsky.social · 30/07/2026
While using UIKit, we have access to the readableContentGuide layout guide. SwiftUI introduces the contentMargins view modifier, allowing us to shift a particular type of content in the view. swiftwithmajid.com/2024/04/23/c...
130 3
Majid Jabrayilov @mecid.bsky.social · 28/07/2026
Working on my #shipaton project. PlatePal - mindful eating app that helps people understand portion size and meal balance. No calories. No numbers. #buildinpublic
061 6
Majid Jabrayilov @mecid.bsky.social · 27/07/2026
How to implement ParallaxHeader in SwiftUI? Easy-peasy, all we need is the onGeometryChange view modifier to track the header position in a scroll view and scale or offset the header. That's it. swiftwithmajid.com/2024/08/13/t...
361 6
Majid Jabrayilov @mecid.bsky.social · 24/07/2026
Buttons in my apps start async tasks. But I don't need to cancel a task when the button disappears. That's why I use unstructured tasks. But I still need the ability to cancel the task manually. That's why I use the trigger pattern. swiftwithmajid.com/2024/03/26/b...
050 5
Majid Jabrayilov @mecid.bsky.social · 22/07/2026
Almost every interaction starting a task in our apps is a button. Most tasks should be non-blocking for other UI parts. SwiftUI Button doesn’t support Swift Concurrency, but it’s flexible enough to allow us to build a button type that does. swiftwithmajid.com/2024/03/26/b...
251 5
Majid Jabrayilov @mecid.bsky.social · 20/07/2026
SwiftUI introduced new APIs, allowing us to recompose views. For example, we can extract child from the content view built with the @ViewBuilder closure and place them as we need. swiftwithmajid.com/2024/09/24/m...
060 6
Majid Jabrayilov @mecid.bsky.social · 17/07/2026
SwiftUI’s alignmentGuide modifier allows us to override standard alignments. For instance, we can align the bottom of Image and Text views in a horizontal stack. This can cause issues when an image has spacing inside a bitmap, leading to misalignment. swiftwithmajid.com/2020/03/11/a...
041 4
Majid Jabrayilov @mecid.bsky.social · 16/07/2026
Just a friendly reminder that I’m still on the lookout for native speakers of Portuguese-Brazilian, Chinese, and Japanese to help me review translations in my CardioBot app. If you’re interested, you can join the TestFlight beta and share your thoughts! testflight.apple.com/join/H82FVVt6
011 1
Majid Jabrayilov @mecid.bsky.social · 15/07/2026
Most of my apps use local notifications to keep user engaged. Fortunately, SwiftUI provides the onOpenURL view modifier allowing us easily build deep linking even for local notifications. swiftwithmajid.com/2024/04/09/d...
171 7
Majid Jabrayilov @mecid.bsky.social · 14/07/2026
Another great addition to Xcode Previews is the PreviewModifier protocol. The PreviewModifier type allows us to create reusable preview environments that we can share across multiple previews. swiftwithmajid.com/2024/11/26/t...
022 2
Majid Jabrayilov @mecid.bsky.social · 13/07/2026
I'm working on CardioBot mascot. What do you think about it?
210 2
Majid Jabrayilov @mecid.bsky.social · 13/07/2026
SwiftUI introduced the sensoryFeedback view modifier, allowing us to play haptic feedback on all Apple platforms. We control it using two parameters. The first defines a feedback style, and the second is a trigger value. swiftwithmajid.com/2023/10/10/s...
060 6