All Projects → xaoxuu → Inspire

xaoxuu / Inspire

Licence: MIT license
主题式Swift开发工具包,包含布局、颜色、字体等。

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Inspire

SceneKit-PortalMask
Clean class to create a portal in SceneKit for use in ARKit.
Stars: ✭ 60 (+275%)
Mutual labels:  pods
UIMenuScroll
The horizontal swiping navigation like on Facebook Messenger.
Stars: ✭ 18 (+12.5%)
Mutual labels:  pods
Tocropviewcontroller
A view controller for iOS that allows users to crop portions of UIImage objects
Stars: ✭ 4,210 (+26212.5%)
Mutual labels:  podfile
Xhlaunchad
🔥The screen opening advertising solutions - 开屏广告、启动广告解决方案-支持静态/动态图片广告,mp4视频广告,全屏/半屏广告、兼容iPhone/iPad. 【 Github下载不了/下载慢 可以访问国内下载地址: https://gitee.com/CoderZhuXH/XHLaunchAd】
Stars: ✭ 3,578 (+22262.5%)
Mutual labels:  podfile
poddotify
A command line tool: from a Podfile.lock to an image.
Stars: ✭ 79 (+393.75%)
Mutual labels:  podfile
XYFSnowAnimation
A category of NSTimer for showing 3D Fluttered animation for iOS, which is used very simply. Lightweight CALayer animation, core animation, 3D transform, performance safety. iOS 3D三维飘落下雪落花动画,轻量级CALayer图层动画,核心动画,3D形变,性能安全,定时器NSTimer分类,直接使用,很简单
Stars: ✭ 15 (-6.25%)
Mutual labels:  podfile
STCubeTransition
A custom view transition that provides transition between 2 different views with 3D cube rotate effect.
Stars: ✭ 16 (+0%)
Mutual labels:  podfile
NoticeBoard
请使用功能更强大的ProHUD: https://github.com/xaoxuu/ProHUD
Stars: ✭ 15 (-6.25%)
Mutual labels:  podfile
Reloader
Reloader is maintained by Stakater. Like it? Please let us know at [email protected]
Stars: ✭ 2,930 (+18212.5%)
Mutual labels:  pods
Rkt
[Project ended] rkt is a pod-native container engine for Linux. It is composable, secure, and built on standards.
Stars: ✭ 8,870 (+55337.5%)
Mutual labels:  pods
Kubernetes Workshop
⚙️ A Gentle introduction to Kubernetes with more than just the basics. 🌟 Give it a star if you like it.
Stars: ✭ 3,122 (+19412.5%)
Mutual labels:  pods
ultimate-kubernetes-bootcamp
Ultimate Kubernetes Bootcamp
Stars: ✭ 43 (+168.75%)
Mutual labels:  pods
pods-beaver-builder-themer-add-on
Integration of Beaver Themer plugin for WordPress (https://pods.io/beaver-themer/)
Stars: ✭ 37 (+131.25%)
Mutual labels:  pods
pody
👾 Pody — CLI app to manage your Pods in your Kubernetes cluster. (DEPRECATED)
Stars: ✭ 69 (+331.25%)
Mutual labels:  pods
golang-health-checker
A simple package to allow you to track your application healthy
Stars: ✭ 12 (-25%)
Mutual labels:  pods
pods-extend
A starter plugin for extending Pods' functionality
Stars: ✭ 11 (-31.25%)
Mutual labels:  pods

Inspire

基于主题的Swift开发基础工具包

包含颜色、字体、布局等,可配置可缓存

特性

可缓存的

  • App 的样式参数(颜色、字体、布局)存储于 json 文件中。

可配置的

  • 可由用户修改主题参数并保存或者分享。

提供便利

  • 便捷的方式获取屏幕布局参数、如各边安全区域尺寸,便于机型适配。

开始使用

使用 CocoaPods

pod 'Inspire'
pod install

使用 Package.swift

在 Package.swift 中声明依赖项:

.package(url: "https://github.com/xaoxuu/Inspire.git", from: "1.1.0"),

用法示例

颜色

view.backgroundColor = .background
view.tintColor = .accent

字体

let lb = UILabel()
lb.font = .regular(15)
lb.font = .bold(20, for: .title)
lb.font = .regular(14, for: .code)

边距

let topMargin = layout.topBarHeight(for: self)
let bottomMargin = layout.bottomBarHeight(for: self)
let safeArea = layout.safeAreaInsets(for: self)
let safeArea2 = Inspire.shared.screen.safeAreaInsets
let layout = Inspire.shared.layout
view.frame.size.height = layout.rowHeight
view.layer.cornerRadius = layout.cornerRadius.large

缓存

// 保存
Inspire.shared.cache()
Inspire.shared.cache(named: "myTheme")
// 读取
let ipr = Inspire.init("myTheme")
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].