In facebook or slack of ios app, offline display bar similar to the one that is displayed.
- Swift 3.0
- iOS 8.0+
- Xcode 8
- Add into your Podfile.
pod "OfflineBar"
Then $ pod install
- Add
import OfflineBar
to the top of your files where you wish to use it.
Here is the code for this example project. .
import UIKit
import OfflineBar
class ViewController: UIViewController {
private var offlineBar: OfflineBar!
override func viewDidLoad() {
super.viewDidLoad()
self.offlineBar = OfflineBar(addedTo: self, style: .reload) // like Slack style
// or
// self.offlineBar = OfflineBar(addedTo: self, style: .close) // like Facebook style
}
}
Teruto Yamasaki, y.teruto@gmail.com
The MIT License (MIT) See the LICENSE file for more info.