# JYViewBuilder **Repository Path**: cm212/JYViewBuilder ## Basic Information - **Project Name**: JYViewBuilder - **Description**: 基于 @resultBuilder 打造的 UI 布局语法糖 - **Primary Language**: Swift - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-05-13 - **Last Updated**: 2023-10-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # JYViewBuilder [![CI Status](https://img.shields.io/travis/huangguojian/JYViewBuilder.svg?style=flat)](https://travis-ci.org/huangguojian/JYViewBuilder) [![Version](https://img.shields.io/cocoapods/v/JYViewBuilder.svg?style=flat)](https://cocoapods.org/pods/JYViewBuilder) [![License](https://img.shields.io/cocoapods/l/JYViewBuilder.svg?style=flat)](https://cocoapods.org/pods/JYViewBuilder) [![Platform](https://img.shields.io/cocoapods/p/JYViewBuilder.svg?style=flat)](https://cocoapods.org/pods/JYViewBuilder) ## 简介 JYViewBuilder是基于Swift 5.4 [@resultBuilder (SE-0289)](https://github.com/apple/swift-evolution/blob/main/proposals/0289-result-builders.md) 简化UIKit界面布局的代码,提高易读性 a.使用UIStackView的子类HStack、VStack,简化布局约束设置 b.UIView可以通过`add(@ViewContentBuilder content: ViewContentBlock)`简化`addSubview`操作 ## Example Check Out 项目,`Example -> JYViewBuilder -> MyPlayground.playground` 中有使用例子 PS: 暂时只对 addSubview 的层面进行代码简化,界面布局约束还是需要用到SnapKit等第三方库 ## Installation JYViewBuilder is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your Podfile: ```ruby pod 'JYViewBuilder' ``` ## Author CodeMan, 604362118@qq.com ## License JYViewBuilder is available under the MIT license. See the LICENSE file for more info.