TGViewer
Swift Tips Swift Tips @swift_tips · 3.17K subscribers
Post #474 7.73K
Mastering in SwiftUI

Большая и полезная статья с примерами кода, в которой рассматриваются важные моменты, которые помогут вам повысить производительность и эффективность разработки.

• Which architecture is better: Redux or MVVM?
• Use @StateObject and @ObservableObject
• Create @Published variable with care
• Breaking down the content of the body into smaller to minimize the compilation time
• Prefer @State for the animations instead of @Published
• Declare Observable objects at a specific place to avoid unnecessary UI update
• Find which data change is causing a SwiftUI view to update
• Use LazyHStack and LazyVStack if you have a long list
• Is there anything similar to viewDidLoad()?
• Use UIKit components directly in SwiftUI
• Conditional modifier
• Avoid using .padding and .frame together
• Use GeometryReader wisely
• Use AnyView occasionally
• Must use ID with Foreach and List
• Prefer using Text over Label
• Use Group to return multiple view instances
• Use .fixedSize() to specify that the frame doesn’t change

Перевод от AppTractor → Мастерство работы в SwiftUI

Читать (En)
  • 🔥 7
  • ❤ 1
  • 👍 1
More from @swift_tips
  1. Sep 9, 2026🧭Практикуем разработку с AI вместе с Podlodka iOS Crew Если давно хотелось не просто чита…
  2. Jul 22, 2026Всем привет! Давненько меня не было в тг, давно уже ничего не публиковал в каналах – вот р…
  3. Jun 4, 2026Яндекс анонсировал выход Yandex Mobile Ads SDK 8 — новой версии инструмента для монетизаци…
  4. Apr 5, 2026Как Swift работает с памятью: подробный гайд для разработчиков В статье iOS-разработчик из…
  5. Mar 23, 2026WWDC26 A week of technology, creativity, and community В этом году WWDC26 пройдёт с 8 по 1…
  6. Dec 31, 2025С наступающим Новым Годом!!! ❤️🎄🥂 Дорогие друзья и коллеги! Хочу начать этот пост со сло…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →