English | 简体中文
Base UI components for WildFunction iOS apps. Small UIKit views that solve one problem each and carry no app styling.
- iOS 18.4+, UIKit, Swift 6 language mode, Xcode 26+
- Dependencies: WildFunctionKit, SnapKit
.package(url: "https://github.com/WildFunction/WFUIKit.git", from: "0.1.0")
// target dependency: .product(name: "WFUIKit", package: "WFUIKit")import WFUIKit
// SwiftUI inside UIKit. Size it from outside; it joins the nearest view controller on its own.
let chart = HostingView(rootView: UsageChart(data: data))
view.addSubview(chart)
chart.snp.makeConstraints { $0.edges.equalToSuperview() }
chart.rootView = UsageChart(data: newData)
// A barely visible layer that takes touches for your app,
// e.g. over a view drawn by another process (an extension's remote view).
let cover = TouchCatcherView() // opacity 0.02 by default
container.addSubview(cover)
cover.snp.makeConstraints { $0.edges.equalTo(remoteView) }
// Keep the back swipe working over a view that swallows touches.
// Adds a TouchCatcherView strip on its leading edge; the rest still scrolls.
reportView.wf_addBackSwipeEdge() // 20 pt
reportView.wf_addBackSwipeEdge(width: 24)- No app styling: colors, fonts and sizes come from parameters with neutral defaults.
- Components go in
Sources/WFUIKit/<Type>.swift; extensions go inSources/WFUIKit/Extensions/<Type>+WF.swift. - Extension members are prefixed
wf_. Generic helpers that are not views belong in WildFunctionKit.
WFUIKIT_STRICT=1 xcodebuild test -scheme WFUIKit -destination 'platform=iOS Simulator,name=iPhone 17'swift test does not work (UIKit).
WildFunctionKit (base utilities) · WFRouter (routing) · KirbyiOS (page framework)
MIT. See LICENSE.