测试已测试 | ✗ |
Lang语言 | Obj-CObjective C |
许可证 | MIT |
发布最新发布 | 2016 年 7 月 |
由 Hamza Ansari,Hamza Ansari 维护。
以下是关于如何在您的 iOS 应用中安装 Livecenter SDK 的详细步骤。如果您在使用或理解过程中遇到任何问题,请[email protected]联系。
import LivecenterKit
要使用您的应用凭据初始化 Livecenter Kit,请将它们传递到您的应用 AppDelegate 中的 setConsumerKey: secret:。
Livecenter.sharedInstance.setConsumerKey(consumerKey, secret: consumerSecret)
Livecenter.sharedInstance.api.getMatchList { (matches, error) -> Void in
// handle the response or error
}
Livecenter.sharedInstance.api.getMatchData(matchId: 12) { (matchData, error) -> Void in
// handle the response or error
}
Livecenter.sharedInstance.api.getMatchGoals(matchId: 12) { (goals, error) -> Void in
// handle the response or error
}
Livecenter.sharedInstance.api.getMatchTicker(matchId: 12) { (tickers, error) -> Void in
// handle the response or error
}
import LivecenterKit
let livecenterView = LivecenterView(frame: CGRect(x: 0, y: 110, width: 320, height: 400))
//Set its delegate
livecenterView.delegate = self
//loadLivecenter match 'Liveblog' with matchId and count
livecenterView.loadLivecenter(matchId: matchId, livecenterType: .Liveblog, count: 10)
//loadLivecenter match 'Social' with matchId and count
livecenterView.loadLiveCenter(matchId: matchId, livecenterType: .Social, count: 10)
func livecenterViewLoadFinish() {
//livecenterView Loading Finish
}
func livecenterViewEmptyPage() {
//livecenterView Return Empty Page
}
func livecenterViewLoadFailed(error: NSError) {
//livecenter Return Error
print(error.localizedDescription)
}