Manos Chorianopoulos

add openQuestionnaire, setCampaignList

......@@ -1238,5 +1238,22 @@ public class swiftApi {
}
}
}
public func openQuestionnaire(controller: UIViewController) -> Void {
for item in GlobalVariables.campaigns {
if (item.offer_category == "questionnaire") {
let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! CampaignViewController
vc.campaignUrl = item.index_url ?? ""
controller.navigationController?.pushViewController(vc, animated: true)
break;
}
}
}
public func setCampaignList(_ campaigns: Array<CampaignItemModel>) -> Void {
GlobalVariables.campaigns = campaigns
}
}
......