Manos Chorianopoulos

add openPacing function

......@@ -7,7 +7,7 @@
<key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
......
......@@ -7,7 +7,7 @@
<key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
......
......@@ -2067,6 +2067,20 @@ public class swiftApi {
}
}
public func openPacing(_ controller: UIViewController) -> Void {
for item in GlobalVariables.campaigns {
if (item.offer_category == "pacing") {
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! SwiftWarplyFramework.CampaignViewController
let url = swiftApi().constructCampaignUrl(item)
vc.campaignUrl = url
controller.navigationController?.pushViewController(vc, animated: true)
break;
}
}
}
public func setCampaignList(_ campaigns: Array<CampaignItemModel>) -> Void {
let userTag = self.getUserTag()
var campaignsArray:Array<CampaignItemModel> = []
......