Bỏ qua tới nội dung
TakoAPI
Quay lại kỹ năng

swiftui-liquid-glass

bởi steipete

iOS & macOS Development
2.7kLượt tải do clawskills.sh công bố
13Sao
0Lượt xem
0 lượt thíchĐăng nhập để thích kỹ năng này
—Chưa có đánh giá
Đánh giá của bạn

Tóm tắt

Implement, review, or improve SwiftUI features.

Mô tả

Kỹ năng này làm gì

Covers implementing, reviewing, and improving SwiftUI features that use the iOS 26+ Liquid Glass API. Handles native APIs including `glassEffect`, `GlassEffectContainer`, and glass button styles. Includes availability gating with non-glass fallbacks for earlier iOS versions.

Using native `GlassEffectContainer` and `glassEffect` APIs avoids the visual inconsistency and performance overhead of custom blur or material layers.

Khi nào nên dùng

  • Adding glass surfaces to a new SwiftUI screen
  • Refactoring existing UI components to Liquid Glass
  • Reviewing glass modifier order and container placement
  • Implementing morphing transitions between view states
  • Adding iOS 26 availability guards with material fallbacks

Quy trình ví dụ

ĐẦU VÀO

User asks: Add Liquid Glass styling to my toolbar buttons

AGENT
  1. 1

    Identifies toolbar buttons as target components for glass treatment

  2. 2

    Wraps buttons in GlassEffectContainer with appropriate spacing

  3. 3

    Applies .buttonStyle(.glass) or .glassEffect(.regular.interactive()) to each button

  4. 4

    Gates the implementation with #available(iOS 26, *) and provides a .ultraThinMaterial fallback for earlier iOS versions

ĐẦU RA

SwiftUI code with glass-styled toolbar buttons inside a GlassEffectContainer, with an availability check and non-glass fallback for iOS 25 and earlier

Cài đặt

clawhub install steipete/swiftui-liquid-glass

Chạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.

Liên kết