Srđan Stanić

1.9K posts

Srđan Stanić banner
Srđan Stanić

Srđan Stanić

@srstanic

Writing about iOS development, software architecture, and engineering management. Learn Swift Concurrency at https://t.co/vjtIwFBzI5

Amsterdam, Netherlands 가입일 Ekim 2007
347 팔로잉402 팔로워
고정된 트윗
Srđan Stanić
Srđan Stanić@srstanic·
Years of building, researching, and iterating on iOS application architectures condensed into a single white paper. This is a document I would love to have had when I first started developing iOS applications. Download it here: bit.ly/srdan-stanic-i… #iOS #iosdev
English
0
0
0
272
Srđan Stanić
Srđan Stanić@srstanic·
@FloWritesCode Quite a list! Thanks for sharing. Can you expand on this one: Generally embrace SwiftUI for the app lifecycle even when using UIKit/AppKit for core navigation/structure
English
1
0
0
111
Flo writes Code
Flo writes Code@FloWritesCode·
Notes from the SwiftUI Lab: - Avoid glass overlapping glass - Avoid glass in anything that scrolls - Use glass when you want to grab attention - Remember to put glass in appropriate GlassEffectContainers - Move tinting away from NavBar into the content that scrolls behind the NavBar glass - LazyVStack in ScrollView: ForEach should return a static number of Views so the system knows what a "row" is - Use new performance instrument to find scrolling issues - "New design is still in beta"; issues like dark background behind glass being unreadable should be filed as feedback - Generally embrace SwiftUI for the app lifecycle even when using UIKit/AppKit for core navigation/structure - MatchedTransitionSource: Use to connect different Views and presentations - Singleton or EnvObject? Prefer Environment in SwiftUI (also helpful for Preview context) - System uses less colors now; avoid arbitrary tinting - use to draw attention or indicate states - Use ContainerValues to pass data up the hierarchy (not Bindings) or PreferenceKeys or Closures (for actions/UIKit) - Animations are available for widgets on visionOS (same as since iOS 17) - Known issue in beta where link gestures don't work - Use standard system controls - SafeAreaBar API for custom TabBar - NavLink uses trailing chevron SF Symbol (useful for custom buttons) - Fluidly draggable component like TabBar: Currently no API for that, file feedback if interested in this - Unit test SwiftUI Views: Bugs are mostly in business logic -> catch them there instead of testing SwiftUI Views, e.g. test that the NavPath of a NavModel contains .home instead of a snapshot test for login - Keep Views as small as possible and use Models - "Whatever architecture you pick, have a testable architecture" - Consider what work can be done outside the main thread (for performance optimization) - Consider scaling high-res images down to display size before showing them - Watch out for View inits & bodies being too expensive -> break up the body into multiple Views - Color.random in the background of list rows -> if its flicking during scrolling, your Views are invalidating - DatePicker disrespecting dynamic size is a known issue - Common SwiftUI antipatterns: conditional modifiers using if statements; public static let shared; if statements for NavStack in NavSplitView detail column (instead: ContentUnvailableView inside NavStack); Not using a11y representations instead of label & value; if statements "loose state" on change - Architecture depends on the app/developer preference -> SwiftUI is architecture-agnostic; lean into Observable (also compatible with UIKit) - ObservableObject led to needlessly invalidated Views, which is "fixed" with Observable - Debug SwiftUI: Knowing why the View updated/was invalidated -> let _ = Self._printChanges(); conditional breakpoints; even they use print debugging :) ; comment-out-debugging to narrow down on issues
English
16
59
640
59.9K
Srđan Stanić
Srđan Stanić@srstanic·
Here is one I recommend, also because it has a bunch of other tools I can't live without (like snippets, window manager, calculator + currency converter, restart macbook): raycast.com/core-features/…
English
0
0
0
33
Srđan Stanić
Srđan Stanić@srstanic·
As a software engineer, you must be shuffling code around the whole day, and a clipboard history will make a hell of a difference.
English
1
0
0
29
Srđan Stanić
Srđan Stanić@srstanic·
I recently experienced working on a freshly installed and fully locked down Macbook, which made me realize how many different tools I use to be more productive. One of them is a clipboard manager. Do you use a clipboard manager on your Macbook?
English
1
0
1
248
fatbobman (东坡肘子)
fatbobman (东坡肘子)@fatbobman·
A huge shoutout to the incredible contributors for sharing their priceless perspectives: @ctietze @pepicrft @leogdion @srstanic @mecid @twostraws and Vitaly Batrakov
fatbobman (东坡肘子)@fatbobman

🚨 Microsoft tightens plugin rules ☁️ Google goes all-in on cloud-native AI 🤔 What’s next for Xcode? Fatbobman’s Swift Weekly #079 is out! 🧱 Build WASM apps in Swift 🔀 Structured Concurrency (EGG rule) 🎯 WWDC25 wishes …and more 📬 weekly.fatbobman.com/p/fatbobmans-s…

English
1
1
4
1.1K
Srđan Stanić
Srđan Stanić@srstanic·
I'm sure this is common knowledge for my designer friends, but it might surprise my engineer friends.
English
0
0
0
19
Srđan Stanić
Srđan Stanić@srstanic·
When aligning a rectangular shape and a circular shape, make the circular shape a bit bigger than the rectangular shape so that the circular shape crosses the line of the edges of the rectangular shape. It will make the two elements seem more aligned. 👀🧠
English
1
0
0
24
Srđan Stanić
Srđan Stanić@srstanic·
I've been taking a digital design course recently, and it has been eye-opening. It's the small details that make all the difference. Here is an example.
Srđan Stanić tweet media
English
1
0
1
35
Srđan Stanić
Srđan Stanić@srstanic·
@fedesimio Amazing! Thanks! To improve discoverability, I suggest considering adding a "Customize navigation" option as the last item of the More menu.
English
1
0
1
34
Srđan Stanić
Srđan Stanić@srstanic·
@fedesimio, longtime user of Evernote here (17 years). Hiding the Shortcuts within the tab bar's More menu kind of defeats the purpose of *Shortcuts*. There is plenty of room on the home screen.
Srđan Stanić tweet media
English
2
0
0
82
Srđan Stanić
Srđan Stanić@srstanic·
@fedesimio The "My Evernote" title brings me no value and can be placed in the navigation bar. I don't really need Evernote to tell me the date. And the New Note/Task buttons occupy way too much space. But I would love to access Shortcuts in one click. Please, and thank you :)
English
0
0
0
58
Srđan Stanić
Srđan Stanić@srstanic·
@RaajeevChandran I'm glad to hear it worked out for you, too! I would expect it to be quite a common struggle.
English
0
0
1
17
rcn
rcn@RaajeevChandran·
@srstanic I’ve been following this approach for a long time, and only through struggle did I come to understand the true value of its flexibility
English
1
0
0
21
Srđan Stanić
Srđan Stanić@srstanic·
Hey everyone! I wrote a post about why I (almost) never subclass UITableViewCell or UICollectionViewCell classes. I’m curious whether this is a common practice? I’ve actually rarely seen it in production, but would love to see it more often. dev.srdanstanic.com/how-to-get-rid…
English
1
0
2
255
Srđan Stanić 리트윗함
Jack Altman
Jack Altman@jaltma·
I think you want your work to be as close to or as far from AI as possible.
English
147
205
3.8K
433.1K
Srđan Stanić
Srđan Stanić@srstanic·
Users don't care about clean code. They care about working software that supports their use cases. Clean code is what allows the engineering team/person to keep adding improvements to the software over time without breaking existing functionality.
English
0
0
1
39
Marcelo José
Marcelo José@marcelojose_dev·
🎁 Day 7: Grocery List Organizer App 🛒 ✨ App idea: A shopping list app that organizes items by aisle or store for easy shopping. 🔑 Keyword insights: - list maker - shopping list - grocery list - checklist Simple but useful for daily life—a potential favorite! 🛍️ #AppIdeas #AdventCalendar #KeywordResearch
Marcelo José tweet media
English
8
2
10
2.9K
Srđan Stanić
Srđan Stanić@srstanic·
@codeiumdev this thing of yours is becoming a smart-ass! And the worst part is that it's not wrong 😄
Srđan Stanić tweet media
English
0
0
0
7