Skip to content

Instantly share code, notes, and snippets.

@kezzico
Last active January 8, 2019 00:29
Show Gist options
  • Save kezzico/46701d66dffc42a0e66f426b33415d75 to your computer and use it in GitHub Desktop.
Save kezzico/46701d66dffc42a0e66f426b33415d75 to your computer and use it in GitHub Desktop.
//
// 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
}
}
}
@kezzico
Copy link
Author

kezzico commented Jan 8, 2019

home-indicator-woahs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment