Showing
1 changed file
with
17 additions
and
0 deletions
... | @@ -1238,5 +1238,22 @@ public class swiftApi { | ... | @@ -1238,5 +1238,22 @@ public class swiftApi { |
1238 | } | 1238 | } |
1239 | } | 1239 | } |
1240 | } | 1240 | } |
1241 | + | ||
1242 | + | ||
1243 | + public func openQuestionnaire(controller: UIViewController) -> Void { | ||
1244 | + for item in GlobalVariables.campaigns { | ||
1245 | + if (item.offer_category == "questionnaire") { | ||
1246 | + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self)) | ||
1247 | + let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! CampaignViewController | ||
1248 | + vc.campaignUrl = item.index_url ?? "" | ||
1249 | + controller.navigationController?.pushViewController(vc, animated: true) | ||
1250 | + break; | ||
1251 | + } | ||
1252 | + } | ||
1253 | + } | ||
1254 | + | ||
1255 | + public func setCampaignList(_ campaigns: Array<CampaignItemModel>) -> Void { | ||
1256 | + GlobalVariables.campaigns = campaigns | ||
1257 | + } | ||
1241 | 1258 | ||
1242 | } | 1259 | } | ... | ... |
-
Please register or login to post a comment