Last active
February 19, 2018 14:41
-
-
Save vialyx/4c8a7907a6e3631543c5198cc8a3ae7f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
protocol AssestType { | |
var assets: [Any] { get } | |
func downloadAssest() | |
} | |
struct Event { | |
var priority: Float = 0 // This value used for positioning in EventsList. ASC sort type. | |
var assets: [Any] = [] | |
} | |
extension Event: AssestType { | |
/* | |
This function should be called after event has been opened from list. | |
As a result Event has loaded assets array | |
*/ | |
func downloadAssest() { | |
} | |
} | |
class ViewController: UIViewController { | |
// FIXME: - Rework to Array(repeating:count:) | |
let events = [Event(), Event()] | |
} | |
// MARK: - UITableViewDataSource | |
extension ViewController: UITableViewDataSource { | |
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
// TODO: - Implement different sections by Event type | |
return events.count | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment