Latest 2.1.2
Homepage https://github.com/tularovbeslan/InStatEventlistView
License MIT
Platforms ios 10.0
Dependencies InStatDownloadButton
Frameworks UIKit, Foundation
Authors

Twitter
CI Status
Version
iOS 10.0+
Swift 5
License
Platform

ScreenRecording_03-13-2019 03-41-17 2019-03-13 03_56_40

InStatEventlistView is a UI component in which the logic of interaction with buttons is encapsulated: play, download, share, check and select viewpoints

Usage

Code

To use InStatEventlistView in code, you simply create a new instance

  fileprivate lazy var eventlistView: InStatEventlistView = {

    let eventlist = InStatEventlistView()
    eventlist.dataSource = self
    eventlist.delegate = self
    eventlist.translatesAutoresizingMaskIntoConstraints = false
    return eventlist
  }()

and add it as a subview to your desired view:

  override func viewDidLoad() {
    super.viewDidLoad()
    view.addSubview(eventlistView)
  }

Delegate

You can use InStatEventlistViewDelegate to handle events

  func eventlistView(_ eventlistView: InStatEventlistView, heightForHeaderInSection section: Int) -> CGFloat
  func eventlistView(_ eventlistView: InStatEventlistView, didSelect item: Row, at indexPath: IndexPath)
  func eventlistView(_ eventlistView: InStatEventlistView, didDeselect item: Row, at indexPath: IndexPath)
  func eventlistView(_ eventlistView: InStatEventlistView, didShare item: Row, at indexPath: IndexPath)
  func eventlistView(_ eventlistView: InStatEventlistView, didDownload item: Row, at indexPath: IndexPath)
  func eventlistView(_ eventlistView: InStatEventlistView, didChangePlaySelectionState state: Bool, forItem item: Row, at indexPath: IndexPath)

and InStatEventlistViewDataSource to populate the component with data

  func numberOfSections(in eventlistView: InStatEventlistView) -> Int
  func eventlistView(_ eventlistView: InStatEventlistView, numberOfRowsInSection section: Int) -> Int
  func setEvents(for eventlistView: InStatEventlistView) -> [Section]

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

InStatEventlistView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'InStatEventlistView'

Author

Beslan Tularov | @JiromTomson

License

MIT License

Copyright (c) 2018 Beslan Tularov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Latest podspec

{
    "name": "InStatEventlistView",
    "version": "2.1.2",
    "summary": "InStatEventlistView - custom table",
    "description": "InStatEventlistView is a custom tableView component with encapsulated business logic.",
    "homepage": "https://github.com/tularovbeslan/InStatEventlistView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/tularovbeslan/InStatEventlistView.git",
        "tag": "2.1.2"
    },
    "social_media_url": "https://twitter.com/JiromTomson",
    "swift_version": "5",
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "InStatEventlistView/Classes/**/*",
    "resources": "InStatEventlistView/Assets/*.xcassets",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "dependencies": {
        "InStatDownloadButton": []
    }
}

Pin It on Pinterest

Share This