Codync
免費、開源的 1:1 替代方案,取代 Grok Bot 與 Muse。從 iPhone、Mac 或 Linux 桌面將 Claude Code、Codex、Cursor 與 40+ 程式碼代理人作為持續機器人傳訊。群組聊天、主題串…
AI 翻譯
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Why · Installation · Quick start · API · Catalog app · Animations · Concurrency and safety · Requirements · Documentation · Contributing · Project health · License
Xcode: File → Add Package Dependencies, then enter
https://github.com/ANSCoder/Swift-Extension
Package.swift:
dependencies: [
.package(url: "https://github.com/ANSCoder/Swift-Extension", from: "2.0.0")
],
targets: [
.target(name: "YourApp", dependencies: ["SwiftExtension"])
]
Then:
import SwiftExtension
Every file in Sources/SwiftExtension works on its own. Copy only what you need, and add public if you share it across modules. ExString uses DateFormatter.posix from ExDate, and the SwiftUI view helpers use FirstAppearModifier and SizePreferenceKey.
import SwiftExtension
import SwiftUI
struct ProfileView: View {
@State private var email = ""
@State private var errorMessage: String?
@State private var isSaving = false
var body: some View {
Form {
TextField("Email", text: $email)
Label(email.isEmail ? "Valid" : "Invalid", systemImage: email.isEmail ? "checkmark.circle" : "xmark.circle")
.hidden(if: email.isEmpty)
}
.loadingOverlay(isSaving)
.errorAlert(message: $errorMessage)
.dismissKeyboardOnTap()
}
}
Foundation helpers build on every platform in the package. UIKit and SwiftUI helpers are compiled where UIKit exists.
| Type | Helpers |
|---|---|
String | isEmail, isMobile, isAlphanumeric, isValidURL, initials, trim, trimLine, removeSpace, firstLetterCapitalized, truncated(to:), changeDate(_:) |
Date | toString(), toTimeString(), isToday, isSameDay(as:), startOfDay, adding(_:value:) |
Array, Collection, Sequence | atIndex(_:), chunked(into:), isNotEmpty, removingDuplicates(on:) |
Comparable | clamped(to:) |
Double | rounded(toPlaces:) |
Optional<String> | orEmpty |
Encodable | asDictionary() |
URL | queryItems, appendingQueryItems(_:) |
Bundle | appVersion, buildNumber |
| Helper | What it does |
|---|---|
if(_:transform:), ifLet(_:transform:) | Apply a modifier only when a condition holds or a value exists |
hidden(if:) | Hide a view and keep its layout space |
onFirstAppear(perform:) | Run once, ignoring later appearances |
onSizeChange(perform:) | Report the rendered size |
loadingOverlay(_:) | Dim, spinner, block taps |
errorAlert(_:message:) | OK alert bound to an optional message |
dismissKeyboardOnTap() | Resign first responder on tap. Unavailable in app extensions |
cardStyle(cornerRadius:), roundedBorder(_:width:cornerRadius:) | Card background and stroke |
shake(trigger:) | Wobble on change. Skipped when Reduce Motion is on |
shimmer(_:), redactedShimmer(_:) | Loading skeleton with a moving highlight |
snapshot(scale:) | Render a view into a UIImage |
Color(hex:) | #RRGGBB, RRGGBB or RRGGBBAA |
| Type | Helpers |
|---|---|
UIColor | init(hex:), hexString |
UIView | addSubviews(_:), pinToEdges(of:insets:) (right-to-left aware) |
UILabel | setLeft(), setRight(), underline(), attribute(_:effect:) |
UIViewController | showAlertView(title:message:), showAlertWithMessage(_:duration:with:) |
UIScrollView | scrollToView(view:animated:), scrollToTop(animated:), scrollToBottom(animated:) |
UINavigationBar | setTitleFont(_:color:), makeTransparent(withTint:), setColors(background:text:) |
UITextField | setBorderAndCorner(color:), setLeftPaddingPoints(_:), setRightPaddingPoints(_:), isValidEmail, isPhoneNumber |
UIImage | toBase64String, resized(by:), halfSizeImage, quarterhalfSizeImage |
UIImageView | setRounded(), setCornerRadius() |
NSMutableAttributedString | bold(_:size:), normal(_:) |
Open Example/Swift-Extension.xcodeproj and run it. It uses the package from the repository root, so it always shows the real code.
| Category | Examples |
|---|---|
| Scroll (6) | scroll to top/bottom, scroll to view, paging, scroll position, pinned headers, scroll transition |
| Keyboard (4) | dismiss on tap, scroll dismisses, focus chain, keyboard toolbar |
| Stacks & Layout (5) | alignment, Grid, adaptive grid, ViewThatFits, custom FlowLayout |
| Text (4) | Markdown & AttributedString, Dynamic Type scaling, numeric transition, date styles |
| Animations (20) | spring, implicit, transitions, matched geometry, PhaseAnimator, KeyframeAnimator, symbol effects, shake, drag spring, TimelineView, shimmer, confetti, radar pulse, draw-on checkmark, liquid wave, progress ring, card stack, aurora gradient, sliding segments, 3D tilt |
| Charts (6) | interactive bars, line & area, donut with selection, stacked bars (absolute / 100%), scrollable time series, KPI cards with sparklines |
| View Modifiers (6) | card style, conditional modifiers, loading overlay, error alert, size & first appear, view to image |
| Foundation (5) | validation, date helpers, string helpers, number helpers, URL & Bundle helpers |
Recorded from the catalog app. Every one is plain SwiftUI. The code is on its example screen.
The package builds in Swift 6 language mode with complete strict concurrency checking, and CI treats warnings as errors.
@unchecked Sendable, nonisolated(unsafe), @preconcurrency, locks or semaphores.Date.toString() and toTimeString() use value-type FormatStyles, so there is no shared DateFormatter.UIViewController.showAlertWithMessage waits with a main-actor Task, not a dispatch timer.try! in library code. Inputs at boundaries return nil, false or an empty value instead of crashing.#if canImport(UIKit), so swift build works on macOS.| Swift | 6.0 or later (Swift 6 language mode) |
| Xcode | 16 or later. CI runs the latest stable Xcode |
| iOS | 17.0+ (all helpers) |
| macOS | 14.0+ (Foundation helpers only) |
| Dependencies | None. The catalog's Charts examples use Apple's Swift Charts |
/// comment with a usage example.swift build # Foundation helpers on the macOS host
swift test # Foundation tests on the macOS host
xcodebuild test -scheme SwiftExtension \
-destination 'platform=iOS Simulator,name=iPhone 17' # everything, on a simulator
xcrun swift-format lint --strict --recursive Sources Tests # style
Example/Swift-Extension/Catalog/Demos/<Category>/MyDemo.swift with a view that takes play: Int and a static let info = ExampleInfo(...).Example/Swift-Extension/Catalog/Core/Example.swift and fill in its three switches: info, playHint and demo.CatalogTests fails if a title, summary, code or hint is missing, or if titles repeat.The catalog has two launch arguments for documentation:
xcrun simctl launch booted anscoder.Swift-Extension -example confetti # bare auto-playing stage
xcrun simctl launch booted anscoder.Swift-Extension -detail barChart # one example screen
Record with xcrun simctl io booted recordVideo, then crop the stage and convert to GIF.
Issues and pull requests are welcome. Read CONTRIBUTING.md first. By taking part you agree to the Code of Conduct. Report security problems privately, see SECURITY.md.
| CI | Format, macOS build and tests, iOS simulator tests with coverage, example app, DocC build. One required check: CI success |
| Security | CodeQL for Swift on every PR and weekly. Dependabot for GitHub Actions and Swift packages |
| Review bots | Danger PR checks, CodeRabbit and GitHub Copilot review (instructions), auto-labeling, release drafting |
| Releases | Semantic versioning. Pushing a tag like 1.0.0 runs the tests and publishes a GitHub release |
changeDate(_:) and UIImage.toBase64String return optionals instead of crashing.UINavigationBar helpers use UINavigationBarAppearance. The default title color is .label.showAleartViewwithTitle and setCornerRadious still work but are deprecated.ExFunction is now an enum namespace. Its static methods are unchanged.MIT. See LICENSE.
Animation topics were inspired by awesome-ios-animation and awesome-swift.