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
相关推荐
兰亭妙微UI设计公司15 小时前
兰亭妙微B端界面设计分享:Vantary海事无人系统任务平台UI/UX设计解析
ui·ux
伊玛目的门徒15 小时前
deepseek harness DSH 安装皮肤脚手架(dsh‑client‑ui‑skin‑center)踩坑完整记录
ui·插件·皮肤·harness·dsh
东坡肘子17 小时前
AI 想放弃了,人没有 -- 肘子的 Swift 周报 #150
人工智能·swiftui·swift
冯汉栩1 天前
Swift Control RollingCountdownView(动画倒计时)
开发语言·ios·swift
zhchyun20082 天前
【Unity UI 进阶】仿 Element UI 打造企业级 Unity UI 组件库(05)
ui·unity·游戏引擎
tanghonghanhaoli2 天前
【图书翻译】有意义的游戏设计:桌面游戏的方法论与心理学(第1、2章)
前端·游戏·ui
末代iOS程序员华仔2 天前
iOS 语聊直播/聊天APP4.3条例被拒解决
flutter·ios·swift
bugcome_com2 天前
Avalonia UI 样式进阶实战:外置样式 + MVVM 主题切换 + 样式优先级全解析
ui
denggun123452 天前
Python两套原生信号量与swift对比
开发语言·python·swift
2601_965798473 天前
Build a Fast, High-Ranking Restaurant Website with Rolanda Theme
开发语言·ios·swift