Skip to content
WildFunctionPublic

About

Base UI components for WildFunction iOS apps: SwiftUI hosting view, touch catcher layer, back swipe edge.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

WFUIKit

English | 简体中文

Base UI components for WildFunction iOS apps. Small UIKit views that solve one problem each and carry no app styling.

Requirements

  • iOS 18.4+, UIKit, Swift 6 language mode, Xcode 26+
  • Dependencies: WildFunctionKit, SnapKit

Install

.package(url: "https://github.com/WildFunction/WFUIKit.git", from: "0.1.0")
// target dependency: .product(name: "WFUIKit", package: "WFUIKit")

Components

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)

Rules

  • No app styling: colors, fonts and sizes come from parameters with neutral defaults.
  • Components go in Sources/WFUIKit/<Type>.swift; extensions go in Sources/WFUIKit/Extensions/<Type>+WF.swift.
  • Extension members are prefixed wf_. Generic helpers that are not views belong in WildFunctionKit.

Test

WFUIKIT_STRICT=1 xcodebuild test -scheme WFUIKit -destination 'platform=iOS Simulator,name=iPhone 17'

swift test does not work (UIKit).

Related

WildFunctionKit (base utilities) · WFRouter (routing) · KirbyiOS (page framework)

License

MIT. See LICENSE.

About

Base UI components for WildFunction iOS apps: SwiftUI hosting view, touch catcher layer, back swipe edge.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages