-
Notifications
You must be signed in to change notification settings - Fork 4
/
HuntlyPopup.swift
50 lines (40 loc) · 1.47 KB
/
HuntlyPopup.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// HuntlyPopup.swift
// My_Devoxx
//
// Created by Maxime on 03/04/16.
// Copyright © 2016 maximedavid. All rights reserved.
//
import Foundation
import UIKit
class HuntlyPopup : UIViewController {
@IBOutlet var titleBonus: UILabel!
@IBOutlet var pointLbl: UILabel!
@IBOutlet var pointValueLbl: UILabel!
@IBOutlet var playMoreBtn: UIButton!
@IBOutlet var okBtn: UIButton!
@IBOutlet var prizeView: UIView!
@IBOutlet var promoLabel: UILabel!
override func viewDidLoad() {
okBtn.addTarget(self, action: #selector(self.okBtnSelector), forControlEvents: .TouchUpInside)
playMoreBtn.addTarget(self, action: #selector(self.playMoreBtnSelector), forControlEvents: .TouchUpInside)
okBtn.setTitle("OK", forState: .Normal)
playMoreBtn.setTitle("Play more", forState: .Normal)
titleBonus.text = ""
pointLbl.text = ""
pointValueLbl.text = ""
promoLabel.text = "Play more & win Devoxx tickets"
pointLbl.textColor = ColorManager.huntlyOrangeColor
pointValueLbl.textColor = ColorManager.huntlyOrangeColor
prizeView.backgroundColor = ColorManager.huntlyOrangeColor
}
func okBtnSelector() {
self.dismissViewControllerAnimated(true, completion: nil)
}
func playMoreBtnSelector() {
self.dismissViewControllerAnimated(true, completion: {
HuntlyManagerService.sharedInstance.goDeepLink()
}
)
}
}