Last active
January 8, 2019 00:29
-
-
Save kezzico/46701d66dffc42a0e66f426b33415d75 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// HomeIndicatorConstraint.swift | |
// | |
// Created by Lee Irvine on 1/7/19. | |
// Copyright © 2019 kezzi.co. All rights reserved. | |
// | |
import UIKit | |
class HomeIndicatorConstraint: NSLayoutConstraint { | |
private var constantInitialValue: CGFloat = 0.0 | |
override func awakeFromNib() { | |
self.constantInitialValue = self.constant | |
let height = Int(UIScreen.main.nativeBounds.height) | |
print(height) | |
if height >= 2436 || height == 1792 { | |
self.constant = self.constantInitialValue + 34 | |
} | |
} | |
} | |
Author
kezzico
commented
Jan 8, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment