TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | Apache 2 |
ReleasedLast Release | Feb 2017 |
SPMSupports SPM | ✗ |
Maintained by prestonwpope.
Depends on: | |
SwiftyJSON | >= 0 |
HiliteCore | ~> 0.1.10-alpha |
AWSS3 | ~> 2.1.0 |
AWSCognito | ~> 2.1.0 |
HiliteSDK Http module - facilitates communication with the HILITE api
import HiliteCore
import HiliteHttp
class TaskViewController: UIViewController {
let taskAgent = TaskFeedAgent(taskService: HttpTaskService(), delegate: self)
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
taskAgent.reloadWithOnSuccess(_ onSuccess: @escaping (Array<FeedItemAgent>)->Void, onError: @escaping (Error!)->Void) {
let onLoaded = { (loadedFeedItems) in
// do something with loaded items
}
let onError = { (error) in
print(error.localizedDescription)
}
taskAgent.reloadWithOnSuccess(onLoaded, onError: onError)
}
}
extension TaskViewController: TasksAgentDelegate {
func taskAgent(_ taskAgent: TaskFeedAgent, didSelectTask: Task, presentFrom: PresentFrom?) {
// do something with selected task
}
}