iOS开发Swift开发UI页面链式调用库推荐

首页链接

https://github.com/zhiguangqiao/ChainableUIKit

安装方法

复制代码
  pod 'ChainableUIKit'

调用片段

UIButton

复制代码
import ChainableUIKit

    private let button = UIButton().chain
        .setTitleColor(.init(hex: "#9583EB"), state: .normal)
        .setTitle("全部视频", state: .normal)
        .setTitleColor(.white, state: .selected)
        .fixSize(CGSizeMake(54, 32))
        .titleFont(.systemFont(ofSize: 12))
        .cornerRadius(4)
        .view

UILabel

复制代码
import ChainableUIKit

    private let videoNumber = UILabel()
        .chain
        .text("1")
        .textColor(.init(hex: "#141B26"))
        .font(.boldSystemFont(ofSize: 30))
        .view

UIStackView

复制代码
import ChainableUIKit

    private lazy var videoNumberStackView = UIStackView().chain
        .axis(.horizontal)
        .alignment(.center)
        .backgroundColor(.white)
        .arrangedViews([
            UILabel()
            .chain
            .text("video")
            .textColor(.init(hex: "#141B26"))
            .font(.boldSystemFont(ofSize: 10))
            .view
            ,videoNumber])
        .view

UITextField

复制代码
import ChainableUIKit

    private let scoreTF = UITextField()
        .chain
        .backgroundColor(.init(hex: "#FFE3A6"))
        .textAlignment(.center)
        .keyboardType(.numberPad)
        .textColor(.init(hex: "#141B26"))
        .view
相关推荐
Rabbit_QL10 小时前
【前端UI行话】前端 UI 术语速查表
前端·ui·状态模式
console.log('npc')15 小时前
响应式布局的 Element UI、Ant Design 24栅格布局
vue.js·ui
田里的水稻15 小时前
EI_openclaw_UI交互
人工智能·ui·机器人
NGBQ1213817 小时前
Adobe-Photoshop-2026-27.4.0.15-m0nkrus 全解析:专业图片处理软件深度指南
ui·adobe·photoshop
mxwin19 小时前
Unity Shader UI 流光效果完全推导指南
ui·unity·游戏引擎·shader·uv
程序员Ctrl喵20 小时前
UI 构建系统 —— “万物皆 Widget”的哲学
ui
我的offer在哪里21 小时前
腾讯 Ardot 深度博客:AI 重构 UI/UX 全链路,从 “描述即界面” 到设计工业化的腾讯范式
人工智能·ui·重构
wuyaolong0071 天前
Git误操作急救手册大纲
ui·github
2501_915918411 天前
有没有Xcode 替代方案?在快蝎 IDE 中完成 iOS 开发的过程
ide·vscode·ios·个人开发·xcode·swift·敏捷流程
songgeb2 天前
Compositional layout in iOS
ios·swift·设计