Skip to content

KenanAtmaca/KEmptyView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KEmptyView

Licance tag platform swift

Advantages

  • Simply use.
  • Configurable.

Requirements

  • Xcode 9.0 +
  • iOS 9.0 or greater

Installation

CocoaPods

  1. Install CocoaPods
  2. Add this repo to your Podfile
target 'Example' do
  use_frameworks!
	
  pod 'KEmptyView'
end
  1. Run pod install
  2. Open up the new .xcworkspace that CocoaPods generated
  3. Whenever you want to use the library: import KEmptyView

Manually

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

Usage

        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. See LICENSE for the full details.