SimpleLoadingView? framework for iOS

SimpleLoadingView 中文說明文檔

項目地址:https://github.com/pangpingfei/SimpleLoadingView


一個用Swift寫的用于iOS的簡單易用、定制性高的Loading界面。

Demo.gif

要求

  • iOS 8.0 以上
  • Xcode 8.0 以上
  • Swift 3.0 以上

安裝

使用Carthage (推薦)

中文簡易教程Github](https://github.com/pangpingfei/SwiftBlog/blob/master/Others/Carthage.md) | [中文簡易教程Jianshu

github "pangpingfei/SimpleLoadingView"
import SimpleLoadingView

使用源代碼

  1. SimpleLoading.swift SimpleLoadingView.swift拖到你的Xcode項目中。
  2. 恭喜!

使用

基本用法

// 只顯示菊花
SimpleLoading.show()

// 只顯示文本
SimpleLoading.show(.text("Welcome!"))

// 顯示菊花和文本
SimpleLoading.show(.textRight("Loading"))

// 在一個View中
SimpleLoading.show(inView: self.view)

// 手動隱藏
SimpleLoading.hide()

// 顯示后定時隱藏
SimpleLoading.show(duration: 2)

你可以在枚舉 SimpleLoading.Style中看到所有樣式。

個性化設置

SimpleLoading.Config.maskViewAlpha = 0.5 // 遮罩透明度
SimpleLoading.Config.viewBorderWidth = 1 // 邊框寬
SimpleLoading.Config.activityStyle = .whiteLarge // 菊花樣式
SimpleLoading.Config.textColor = .white // 文本顏色
SimpleLoading.Config.verticalPadding = 30 // 垂直方向內邊距
// ...

你可以在結構體 SimpleLoading.Config 中查看所有可設置屬性。

行距(間距), 外距, 內距 的說明

Desc.png

更多……

請用Git克隆項目后參考演示工程。


許可

MIT,詳見LICENSE


項目地址:https://github.com/pangpingfei/SimpleLoadingView

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容