Commit a8d38897 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Kateryna Kostiuk

UI: update style of link device dialog

Change-Id: I5068b418ff5344c5e34c304f98d1ca4f2bd04a6b
Reviewed-by: Kateryna Kostiuk's avatarKateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
parent fed27fa7
...@@ -11,6 +11,7 @@ import Reusable ...@@ -11,6 +11,7 @@ import Reusable
import RxSwift import RxSwift
import PKHUD import PKHUD
import AMPopTip import AMPopTip
import SwiftyBeaver
class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBased { class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBased {
...@@ -21,11 +22,14 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase ...@@ -21,11 +22,14 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase
@IBOutlet weak var pinInfoButton: UIButton! @IBOutlet weak var pinInfoButton: UIButton!
@IBOutlet weak var pinLabel: UILabel! @IBOutlet weak var pinLabel: UILabel!
@IBOutlet weak var passwordLabel: UILabel! @IBOutlet weak var passwordLabel: UILabel!
@IBOutlet weak var scrollView: UIScrollView!
// MARK: members // MARK: members
private let disposeBag = DisposeBag() private let disposeBag = DisposeBag()
var viewModel: LinkDeviceViewModel! var viewModel: LinkDeviceViewModel!
let popTip = PopTip() let popTip = PopTip()
let log = SwiftyBeaver.self
// MARK: functions // MARK: functions
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -109,6 +113,8 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase ...@@ -109,6 +113,8 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase
popTip.entranceAnimation = .scale popTip.entranceAnimation = .scale
popTip.bubbleColor = UIColor.ringSecondary popTip.bubbleColor = UIColor.ringSecondary
popTip.textColor = UIColor.white popTip.textColor = UIColor.white
let offset: CGFloat = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiom.pad) ? 60.0 : 80.0
popTip.offset = offset - scrollView.contentOffset.y
popTip.show(text: L10n.Linktoaccount.explanationPinMessage, direction: .down, popTip.show(text: L10n.Linktoaccount.explanationPinMessage, direction: .down,
maxWidth: 250, in: self.view, from: pinInfoButton.frame) maxWidth: 250, in: self.view, from: pinInfoButton.frame)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment