-
Notifications
You must be signed in to change notification settings - Fork 0
MagicV2DetailInteractor
This class is the link between your model (where datas are stored) and the Magic component (where datas are displayed). It's used to retrieve datas required to display the table header view.
1) [Required] implement sendRequest methods to request datas (from an API, plist, ...).
- Call
didReceiveErrorif an error occures while requesting datas. - Call
didReceiveResultwhen you finished to request datas.
2) [Optional] implement loadLocalResults methods to retrieve datas (coredata for example).
- Call
didReceiveErrorif an error occures while requesting datas. - Call
didReceiveResultwhen you finished to request datas.
3) loadingType is an enum indicating if the interactor current requesting status : not loading, init (first request), pull to refresh.
4) requestCallDeltaTime represent the duration between two calls of sendRequest. When you set this value you have to override the loadLocalResults and set a requestKey.
5) requestKey is an NSString that identify the request. It's used to store the last request call time for cached datas check. It need to be different for each page (2 differents member profile request MUST have 2 differents requestKey so you need to use the member id or username).
6) Override pullToRefreshTriggered method to get notified when the pull to refresh is triggered. Don't forget to call the super.