Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bionelabs/uiwaiting
UIWaiting is a extend UIViewController give 2 function startWating and stopWaiting to make ViewWaiting at top current ViewController
https://github.com/bionelabs/uiwaiting
swift uikit waiting xcode
Last synced: 1 day ago
JSON representation
UIWaiting is a extend UIViewController give 2 function startWating and stopWaiting to make ViewWaiting at top current ViewController
- Host: GitHub
- URL: https://github.com/bionelabs/uiwaiting
- Owner: bionelabs
- License: mit
- Created: 2020-05-16T17:39:28.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-17T03:15:30.000Z (over 4 years ago)
- Last Synced: 2024-10-31T15:54:01.805Z (6 days ago)
- Topics: swift, uikit, waiting, xcode
- Language: Swift
- Size: 145 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UIWaiting
- UIWaiting is a extend UIViewController give 2 function startWating and stopWaiting to make ViewWaiting at top current ViewController
- Easy to add to your project and remove it.## Demo
## Installation
### CocoaPods
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate UIWaiting into your Xcode project using CocoaPods, specify it in your Podfile:```swift
pod 'UIWaiting'
```### How to use
```swift
import UIKit
import UIWaitingextension ViewController: UIWaitingViewExtend {
// MARK: Custom UI waiting view
func setWaitingTitleFont() -> UIFont {
return .boldSystemFont(ofSize: 18)
}
func setWaitingIndicatorBackgroundColor() -> UIColor {
return UIColor.white.withAlphaComponent(0.1)
}
func setWaitingBackgroundColor() -> UIColor {
return UIColor.black.withAlphaComponent(0.1)
}
func setWaitingTitleColor() -> UIColor {
return .black
}
}class ViewController: UIViewController {
let button: UIButton = {
let view: UIButton = UIButton()
view.frame = CGRect(x: 100, y: 100, width: 200, height: 50)
view.backgroundColor = .orange
view.setTitle("SHOW", for: .normal)
return view
}()
override func loadView() {
super.loadView()
self.view.backgroundColor = .white
self.view.addSubview(button)
}
override func viewDidLoad() {
super.viewDidLoad()
button.addTarget(self, action: #selector(tap), for: .touchUpInside)
}
// Show Waiting
@objc func tap() {
self.startWaiting("PROCESSING")
// Hide Waiting
DispatchQueue.main.asyncAfter(deadline: .now() + 10) {
self.stopWaiting()
}
}
}```
## Contact
- Email: [email protected]
- Site: https://onebuffer.com
- Linkedin: https://www.linkedin.com/in/caophuocthanh/