Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

[IB2-408] fixed the placement of Rewards Indicator for new offer appears

  • Loading branch information
mahmoud-adam85 committed Sep 7, 2018
1 parent 3a30ac6 commit 3b4d0a61c2a9fe28a2a6da4eb674000d222e2f2b
Showing with 7 additions and 4 deletions.
  1. +7 −4 Cliqz/HomePanel/CliqzHomePanelViewController.swift
@@ -113,6 +113,7 @@ class CliqzHomePanelViewController: UIViewController, UITextFieldDelegate {
setInitialConstraints()
setBackgroundImage()
updateOffrzIcon()
adjustOffrzNotificationImageConstraints()
}

func setStyling() {
@@ -271,10 +272,12 @@ extension CliqzHomePanelViewController {
}

fileprivate func adjustOffrzNotificationImageConstraints() {
let segmentWidth = self.segmentedControl.bounds.width / 4
self.offrzNotificationImage.snp.remakeConstraints { (make) in
make.top.equalToSuperview().offset(3)
make.right.equalTo(self.segmentedControl.snp.right).offset(-1.5 * segmentWidth + 13)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) {
let segmentWidth = self.segmentedControl.bounds.width / 4
self.offrzNotificationImage.snp.remakeConstraints { (make) in
make.top.equalToSuperview().offset(3)
make.right.equalTo(self.segmentedControl.snp.right).offset(-1.5 * segmentWidth + 13)
}
}
}
}

0 comments on commit 3b4d0a6

Please sign in to comment.