Codync
免费开源的 1:1 Grok Bot 与 Muse 替代方案。可在 iPhone、Mac 或 Linux 桌面上将 Claude 代码、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.