LeadKit/TIUIElements
Boyko Mihail 2bd3144922 fix: protocols 2021-06-04 20:35:28 +03:00
..
Assets fix: naming 2021-06-04 20:28:59 +03:00
Sources fix: protocols 2021-06-04 20:35:28 +03:00
README.md fix: naming 2021-06-04 20:28:59 +03:00
TIUIElements.podspec feat: Add HeaderTransitionDelegate - Helper for transition of TableView header and navigationBar title view 2021-06-03 18:41:27 +03:00

README.md

TIUIElements

Bunch of useful protocols and views:

  • RefreshControl - a basic UIRefreshControl with fixed refresh action.

HeaderTransitionDelegate

Use for transition table header to navigationBar view while scrolling

Your class must implement the HeaderViewHandlerProtocol protocol

public protocol HeaderViewHandlerProtocol: UIViewController {
    var largeHeaderView: UIView? { get }
    var headerView: UIView? { get }
    var tableView: UITableView { get }
}

Usage if your ViewController don't needs extend UITableViewDelegate

let headerTransitionDelegate = HeaderTransitionDelegate(headerViewHandler: self)
tableView.delegate = headerTransitionDelegate

Usage if your ViewController needs extend UITableViewDelegate

let headerTransitionDelegate = HeaderTransitionDelegate(headerViewHandler: self)
tableView.delegate = self
.
.
func scrollViewDidScroll(_ scrollView: UIScrollView) {
    headerTransitionDelegate?.scrollViewDidScrollHandler(scrollView)
    
    /// Your local work
}

Installation via SPM

You can install this framework as a target of LeadKit.