This repository has been archived by the owner on Nov 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from okhanokbay/develop
Merge develop into master
- Loading branch information
Showing
8 changed files
with
166 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// ExpyAbstractions.swift | ||
// ExpyTableView | ||
// | ||
// Created by Okhan on 08/03/2018. | ||
// | ||
|
||
import Foundation | ||
|
||
public struct ExpyTableViewDefaultValues { | ||
public static let expandableStatus = true | ||
public static let expandingAnimation: UITableViewRowAnimation = .fade | ||
public static let collapsingAnimation: UITableViewRowAnimation = .fade | ||
} | ||
|
||
public enum ExpyState: Int { | ||
case willExpand, willCollapse, didExpand, didCollapse | ||
} | ||
|
||
public enum ExpyActionType { | ||
case expand, collapse | ||
} | ||
|
||
public protocol ExpyTableViewHeaderCell: class { | ||
func changeState(_ state: ExpyState, cellReuseStatus cellReuse: Bool) | ||
} | ||
|
||
public protocol ExpyTableViewDataSource: UITableViewDataSource { | ||
func tableView(_ tableView: ExpyTableView, canExpandSection section: Int) -> Bool | ||
func tableView(_ tableView: ExpyTableView, expandableCellForSection section: Int) -> UITableViewCell | ||
} | ||
|
||
public extension ExpyTableViewDataSource { | ||
func tableView(_ tableView: ExpyTableView, canExpandSection section: Int) -> Bool { | ||
return ExpyTableViewDefaultValues.expandableStatus | ||
} | ||
} | ||
|
||
public protocol ExpyTableViewDelegate: UITableViewDelegate { | ||
func tableView(_ tableView: ExpyTableView, expyState state: ExpyState, changeForSection section: Int) | ||
} | ||
|
||
public extension ExpyTableViewDelegate { | ||
func tableView(_ tableView: ExpyTableView, expyState state: ExpyState, changeForSection section: Int) {} | ||
} |
Oops, something went wrong.