<img src="https://snapkit.github.io/SnapKit/images/banner.jpg" alt="" />
SnapKit is a DSL to make Auto Layout easy on both iOS and OS X.
[![Build Status](https://travis-ci.org/SnapKit/SnapKit.svg)](https://travis-ci.org/SnapKit/SnapKit)
[![Platform](https://img.shields.io/cocoapods/p/SnapKit.svg?style=flat)](https://github.com/SnapKit/SnapKit)
[![Cocoapods Compatible](https://img.shields.io/cocoapods/v/SnapKit.svg)](https://cocoapods.org/pods/SnapKit)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
#### ⚠️ **To use with Swift 4.x please ensure you are using >= 4.0.0** ⚠️
#### ⚠️ **To use with Swift 5.x please ensure you are using >= 5.0.0** ⚠️
## Contents
- [Requirements](#requirements)
- [Migration Guides](#migration-guides)
- [Communication](#communication)
- [Installation](#installation)
- [Usage](#usage)
- [Credits](#credits)
- [License](#license)
## Requirements
- iOS 10.0+ / Mac OS X 10.12+ / tvOS 10.0+
- Xcode 10.0+
- Swift 4.0+
## Migration Guides
- [SnapKit 3.0 Migration Guide](Documentation/SnapKit%203.0%20Migration%20Guide.md)
## Communication
- If you **need help**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/snapkit). (Tag 'snapkit')
- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/snapkit).
- If you **found a bug**, open an issue.
- If you **have a feature request**, open an issue.
- If you **want to contribute**, submit a pull request.
## Installation
### CocoaPods
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
```bash
$ gem install cocoapods
```
> CocoaPods 1.1.0+ is required to build SnapKit 4.0.0+.
To integrate SnapKit into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'SnapKit', '~> 5.6.0'
end
```
Then, run the following command:
```bash
$ pod install
```
### Carthage
[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with [Homebrew](http://brew.sh/) using the following command:
```bash
$ brew update
$ brew install carthage
```
To integrate SnapKit into your Xcode project using Carthage, specify it in your `Cartfile`:
```ogdl
github "SnapKit/SnapKit" ~> 5.0.0
```
Run `carthage update` to build the framework and drag the built `SnapKit.framework` into your Xcode project.
### Swift Package Manager
[Swift Package Manager](https://swift.org/package-manager/) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
> Xcode 11+ is required to build SnapKit using Swift Package Manager.
To integrate SnapKit into your Xcode project using Swift Package Manager, add it to the dependencies value of your `Package.swift`:
```swift
dependencies: [
.package(url: "https://github.com/SnapKit/SnapKit.git", .upToNextMajor(from: "5.0.1"))
]
```
### Manually
If you prefer not to use either of the aforementioned dependency managers, you can integrate SnapKit into your project manually.
---
## Usage
### Quick Start
```swift
import SnapKit
class MyViewController: UIViewController {
lazy var box = UIView()
override func viewDidLoad() {
super.viewDidLoad()
self.view.addSubview(box)
box.backgroundColor = .green
box.snp.makeConstraints { (make) -> Void in
make.width.height.equalTo(50)
make.center.equalTo(self.view)
}
}
}
```
### Playground
You can try SnapKit in Playground.
**Note:**
> To try SnapKit in playground, open `SnapKit.xcworkspace` and build SnapKit.framework for any simulator first.
### Resources
- [Documentation](https://snapkit.github.io/SnapKit/docs/)
- [F.A.Q.](https://snapkit.github.io/SnapKit/faq/)
## Credits
- Robert Payne ([@robertjpayne](https://twitter.com/robertjpayne))
- Many other contributors
## License
SnapKit is released under the MIT license. See LICENSE for details.
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
Swift5仿抖音底部Tabbar示例Demo (174个子文件)
0400de4cbe184fef4e3a75d0aaede5cb28b633 94B
100d7cb79cf514a4882084b77cd9590f233572 1KB
15e407e9c66c00dd19f4aaac49df0e2b7c5629 189B
17a61ec0dc154ba8c0fb0cc7dd078f93d506c0 925B
187f973964b98087880a1f512c0a057bdbd42b 1KB
25ea8ee785629fa3da5c3582809c9cc959e0e2 1KB
29e0ccaa47131f6338201f458d1f6246021114 832B
346493665dba00c84d1acaa1d0efe3603edc3a 1KB
360f1c19f12de854bd307b25dd22cf40cce7ea 696B
387b645981ec85f869581e873fffac9b7474d2 175B
3b8b08bbead15fca0e95dc4fd784c50eec0219 89B
409b3b13943083e720f8b672417c8403820844 3KB
4b2e3da2f09312b22341f0893dfa1f21fcaca1 195B
4dc1d22741a44c6657eaeffcbe5dc2bf7fdd6c 405B
4f750b9e1b37e24c3d621daa40fab1ba89a178 921B
549078960ce08bbf45416e8f2f706536f838ce 2KB
5aec35ba428ebeb19607322da936391f08864a 941B
61d18c4c489ff14dd17d4834b35f01db9bf6b9 1KB
625632c5822d2d9f7959cf1acddc966de306df 323B
69bc282ead89cb7ff2bf9b38a2ab2f26e60129 1KB
6a1cfc880c7d533e8c4e48e7b1cbf219b298fa 191B
6df7a5d33e848a061a24bb9482a41c1c7179ee 2KB
7644cf1bd2053b5a770e77fb381afa3552d927 825B
7f6eee02d30fd33b504df7d02a4df883c93d77 51B
8308b82ed8edb8da4b567545f49d53c422ea6b 2KB
8579ab6e3f5f3da86cc0af9329cb3addb2b86f 2KB
895323fa54cd399b15d21cd93a107398ca5925 2KB
91fc314713f286975faa01497144d51de26b31 3KB
a18c371998b0dc57de6447bc4abe629be0691d 119B
a8ed5b14b57ee0e962e7e3cb5f0ea168da0dd2 814B
ab1a855717a16a26fb26d3ae6e386dd673de3c 441B
b7f29f5bab675f699d577fe40e6e88d3cdf01d 142B
c013e0c0e220155e62d6f7e2e7c4bcb472910b 466B
cf209d21ec5e4913848c36a3b5687ad901f05e 405B
COMMIT_EDITMSG 28B
config 304B
d7402bab321d48dd22ec3329d3d71bf347461c 2KB
d823108df4304f9f980353b6c7ce1832609c7a 705B
d96ccd0be5fea4aee83c041e2fbc66a0616444 870B
.DS_Store 6KB
e45399987c1c90669d4af64628f1ee56f8ac07 296B
f11b975353dbc3157067165de819065575624f 1KB
f153da91755d112ed44849de45e17d9d0045e8 1KB
f29cb4b1c2a6e85f3dd623f04f66d3e96e1538 9KB
f530337d35aaf42870cba112a523b2e1cabc55 1KB
f71c1a6261b5ca2a8354b03e3ba040076f0973 1KB
f8e3aa5b141c51244713e15fd5221fd7805d32 426B
fa5bacb3697366df22b94e18726c56b2906271 87B
FETCH_HEAD 0B
animation.gif 261KB
Pods-DYXYSwift-umbrella.h 320B
SnapKit-umbrella.h 306B
HEAD 327B
HEAD 167B
HEAD 32B
HEAD 23B
pack-b5bc959f25899865597d127407b12b1640ceac71.idx 5KB
index 15KB
Contents.json 2KB
Contents.json 350B
Contents.json 307B
Contents.json 63B
Contents.json 63B
LICENSE 1KB
Manifest.lock 248B
Podfile.lock 248B
Pods-DYXYSwift-dummy.m 132B
SnapKit-dummy.m 118B
Pods-DYXYSwift-acknowledgements.markdown 1KB
master 327B
master 139B
master 41B
master 41B
README.md 4KB
ReadMe.md 373B
Pods-DYXYSwift.modulemap 118B
SnapKit.modulemap 104B
pack-b5bc959f25899865597d127407b12b1640ceac71.pack 368KB
packed-refs 114B
project.pbxproj 47KB
project.pbxproj 25KB
SnapKit-prefix.pch 195B
Pods-DYXYSwift-acknowledgements.plist 2KB
Info.plist 1KB
Pods-DYXYSwift-Info.plist 854B
SnapKit-Info.plist 854B
Info.plist 828B
xcschememanagement.plist 692B
xcschememanagement.plist 673B
xcschememanagement.plist 457B
xcschememanagement.plist 332B
IDEWorkspaceChecks.plist 238B
IDEWorkspaceChecks.plist 238B
tabbar_normal.png 99KB
icon_back.png 731B
icon_back_white@3x.png 620B
icon_back_white@2x.png 413B
Podfile 262B
pack-b5bc959f25899865597d127407b12b1640ceac71.rev 700B
Pods-DYXYSwift-frameworks.sh 8KB
共 174 条
- 1
- 2
ml_Better
- 粉丝: 38
- 资源: 35
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0