Tag

SwiftUI

137 posts

202611 posts

  1. Surviving tvOS: An Engineering Log of an Atypical Media Player

    tvOS is far more than just an enlarged iPad. This article is an engineering log of the Syncnext player, providing an in-depth analysis of real pitfalls in Apple TV development: from the Focus mechanism, harsh storage constraints, to SwiftUI workarounds and AVPlayer deep optimization, helping developers "survive" on the tvOS platform

202513 posts

  1. Solving SwiftUI Pain Points and Performance Bottlenecks: Zipic Development Technical Retrospective

    What other technical challenges exist in image compression software? This article is packed with hardcore, practical macOS development experience. From SwiftUI component adaptation to low-level Core Graphics applications, and from Raycast extension integration to PDF compression implementation, it not only solves performance bottlenecks but also pushes the native experience to the limit.

  2. How to Detect Text Truncation in SwiftUI?

    Learn how to detect text truncation in SwiftUI using fixedSize and GeometryReader, and dynamically select adaptive layouts with ZStack and layoutPriority to ensure text content displays fully without being cut off.

202424 posts

  1. How to Tile Images in SwiftUI

    Explore two SwiftUI image tiling methods: resizable & foregroundStyle with ImagePaint. Learn a custom Image construction for SF Symbols tiling.

  2. Common Misconceptions About SwiftUI

    Explore common SwiftUI misconceptions, including its learning curve, cross-platform capabilities, and code volume. Understand its true potential for better app development.

202318 posts

  1. Mastering ViewThatFits

    Explore SwiftUI's ViewThatFits: learn its rules, ideal size, usage, and how to recreate it with Layout protocol. Master adaptive layouts for your iOS apps.

  2. GeometryReader: Blessing or Curse?

    Explore GeometryReader's common problems in SwiftUI. Is it a curse or a blessing? Understand its layout, information retrieval, performance, and when to use it correctly. Includes new onGeometryChange API & replications.

  3. Mastering TipKit: Advanced

    Explore advanced TipKit: customize views beyond TipView, integrate with UIKit, enable cross-app data sharing, reuse Tip code, and address FAQs. Learn how to observe status & more!

  4. Mastering TipKit: Basics

    Explore Apple's TipKit framework for displaying tips in your apps. Learn how to define, initialize, and customize tips using SwiftUI. Discover rules, events, and display strategies.

  5. Building Cross-Platform SwiftUI Apps

    Learn how to build cross-platform SwiftUI apps. This article covers key aspects like compatibility, data sources and adapting to multiple windows, based on a presentation at the SwiftUI Technology Salon.

  6. Timing of onAppear Invocation

    Explore the timing of SwiftUI's onAppear modifier with evidence from new SwiftUI 4 APIs. Learn when onAppear is invoked: after layout, before rendering.

  7. Layout in SwiftUI Way

    Explore SwiftUI's powerful layout system by using multiple methods to achieve one UI goal. Learn about offset, alignmentGuide, NameSpace, ScrollView and more.

202230 posts

  1. Several Ways to Center Views in SwiftUI

    Explore various methods to center views in SwiftUI, including Spacers, alignment guides like ZStack and frame, and GeometryReader. Understand each method's principles, scenarios, and considerations.

  2. Mixing Text and Image in SwiftUI

    Explore how to mix text and images within SwiftUI's Text view. Learn techniques for dynamic sizing and text alignment. Includes practical examples and code.

  3. Creating Tables with Table in SwiftUI

    Learn how to use SwiftUI’s Table for creating interactive, multi-column tables on macOS & iPadOS. Explore features like sorting, selection, & implementing similar functionality on other platforms.

  4. Mastering zIndex in SwiftUI

    Learn how to master zIndex in SwiftUI to control view layering, avoid animation issues, and use it effectively in various layout containers.

  5. Customizing Gestures in SwiftUI

    Customize native SwiftUI gestures with DragGesture, GestureState, tap locations, simultaneous gestures, and UIGestureRecognizerRepresentable for UIKit gesture bridging.

202115 posts

  1. Using NSUbiquitousKeyValueStore with SwiftUI

    Explore how to use NSUbiquitousKeyValueStore for cross-device data sharing in SwiftUI. Learn about its features, configurations, and practical usage with examples. Includes comparison to UserDefaults and integration with @CloudStorage.

  2. Lifecycle of SwiftUI Views

    Explore the SwiftUI view lifecycle, including struct instance creation, view value trees, and the nuances of onAppear and onDisappear. Learn to optimize your SwiftUI code.

  3. Mastering Safe Area in SwiftUI

    Learn how to get safe area height in SwiftUI, read GeometryProxy.safeAreaInsets, use safeAreaInset, and control layouts with ignoresSafeArea.

  4. Understanding SwiftUI's onChange

    Explore SwiftUI's onChange modifier: learn its features, usage, precautions, and alternatives. Understand how it observes values and triggers actions on change. Avoid common pitfalls for efficient coding.

  5. Using UIKit Views in SwiftUI

    Learn how to use UIKit views in SwiftUI, style them, and understand key considerations when wrapping a UITextField. Master UIViewRepresentable for seamless integration.

  6. Mastering @AppStorage in SwiftUI

    Explore efficient, secure @AppStorage usage in SwiftUI without third-party libs. Solve data type limits, tedious declarations, and injection issues. Includes central injection.

202026 posts

  1. Adapting to iPad in SwiftUI

    Explore insights and lessons learned while adapting a SwiftUI app for iPad. Learn about device detection, layout adjustments, and navigation challenges. Key code snippets included.

  2. Discussing CoreData Usage in SwiftUI

    Explore lessons learned using CoreData in SwiftUI development over the past year. Discover insights on persistent storage, dynamic @FetchRequest, a transformation layer, and issues with NSPersistentCloudKitContainer. Avoid SQL thinking with CoreData.

  3. Discussing List and ForEach in SwiftUI

    Explore SwiftUI List & ForEach: Discover performance issues with ForEach when handling large datasets & learn how to optimize with List or SwiftUIX. Learn when to use ForEach.

  4. Implementing the Side Menu for the iOS Mail App with SwiftUI

    With the continuous improvement of SwiftUI 2.0, I feel it's time to make a major upgrade to my app. I've always wanted to implement an elegant side menu effect in my app similar to the iOS mail app, and I searched online for a solution. However, most of the implementations are for UIKit and there are not many project libraries that are well adapted to SwiftUI. I ended up implementing one myself in Xcode 12.

  5. HowTO —— SwiftUI 2.0 LazyGrid

    Explore SwiftUI 2.0's native Lazy Grid control (LazyVGrid & LazyHGrid), replacing third-party libraries. Learn basic usage, mixing grids, and dynamic layouts.

  6. @FocusedBinding Overview

    Explore SwiftUI's @FocusedBinding for data sharing between views. Learn how to use FocusedValueKey to modify and bind data directly, bypassing traditional methods. Discover its uses and limitations.

  7. SwiftUI 2.0 —— Research on @StateObject

    Dive into SwiftUI 2.0's @StateObject, a new property wrapper for managing reference type data. Learn its lifecycle differences from @ObservedObject through practical examples and when to choose each for optimal data flow.

  8. @State Research in SwiftUI

    Explore SwiftUI's @State: its implementation, operation, and how it drives views with data. Learn to extend its functionality with examples. Dive into reactive programming.