Display a Liveblog
To initialize and display a Liveblog you have to create a TickerRef (TApiTickerRef
), assign a tickerId
and retrieve a ViewController from the SDK to present it in your app.
Objective-C
TApiTickerRef *ref = [[TApiTickerRef alloc] init];
ref.tickerId = @"1234567890";
ref.showMeta = false;
ref.showScoreboard = false;
[TickarooSDK requestViewControllerForRef:ref callback:^(UIViewController<TickarooSDKController> *vc) {
[self.navigationController pushViewController:vc animated:true];
}];
Swift
let ref = TApiTickerRef()
ref.tickerId = "1234567890"
ref.showMeta = false
ref.showScoreboard = false
TickarooSDK.requestViewController(for: ref) { [weak self] vc in
vc.map {
self?.navigationController?.pushViewController($0, animated: true)
}
}
Relevant properties of the TickerRef
The following properties are used to display a liveblog
Required
tickerId
The id of the liveblog
Optional
limit
Limit the number of events per request, default 15loadMoreLimit
Limit the number of events load more request, default 15eventLocalId
The deep linked event local idtagFilter
Comma separated list of tag ids to filtershowScoreboard
Indicates whether to include the scoreboeard in the screen, default trueshowMatches
Indicates whether to includes matches if any, default trueshowEvents
Indicates whether to include events in the screen, default trueshowLineup
Indicates whether to include the lineup in the screen, default trueshowEventMeta
Indicates whether to include reporter information in events, default “off”
you can find the header in <TickarooSDK/TApiTickerRef.h>