Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kenanatmaca/kemptyview

Configurable TableView & CollectionView Empty Page
https://github.com/kenanatmaca/kemptyview

collectionview data empty-view ios swift tableview xcode

Last synced: about 2 months ago
JSON representation

Configurable TableView & CollectionView Empty Page

Awesome Lists containing this project

README

        

# KEmptyView

![Licance](https://img.shields.io/github/license/KenanAtmaca/KEmptyView)
![tag](https://img.shields.io/github/tag/KenanAtmaca/KEmptyView)
![platform](https://img.shields.io/cocoapods/p/KEmptyView)
![swift](https://img.shields.io/badge/Swift-4.2%2B-orange)

## Advantages
- [X] Simply use.
- [X] Configurable.

## Requirements

- Xcode 9.0 +
- iOS 9.0 or greater

## Installation

### CocoaPods

1. Install [CocoaPods](http://cocoapods.org)
2. Add this repo to your `Podfile`

```ruby
target 'Example' do
use_frameworks!

pod 'KEmptyView'
end
```

3. Run `pod install`
4. Open up the new `.xcworkspace` that CocoaPods generated
5. Whenever you want to use the library: `import KEmptyView`

### Manually

1. Simply download the `KEmptyView` source files and import them into your project.

## Usage

```Swift
let emptyView = KEmptyView()
emptyView.setTitleCustomize(title: "There were no results!", textColor: .gray, font: UIFont(name: "Futura", size: 19))
emptyView.isTapScreen = true
emptyView.animation = .alpha
emptyView.screenTapAction = {
print("Reload!")
}

tableView.emptyView = emptyView

tableView.reloadEmpty() // non-animated use
tableView.reloadEmptyAnimation() // if you are going to use animated
```

See the 'KEmptyTable' sample project for more.

## License
Usage is provided under the [MIT License](http://http//opensource.org/licenses/mit-license.php). See LICENSE for the full details.