Skip to content

Instantly share code, notes, and snippets.

@foxicode
Created March 19, 2020 23:02
Show Gist options
  • Select an option

  • Save foxicode/bfbcf2896f2097e875f2b6af7958e994 to your computer and use it in GitHub Desktop.

Select an option

Save foxicode/bfbcf2896f2097e875f2b6af7958e994 to your computer and use it in GitHub Desktop.
Example of Supernova export
//
// HomeActiveNavViewController.swift
// Waste-management-app-musafarouk
//
// Created by Supernova.
// Copyright © 2018 Supernova. All rights reserved.
//
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Import
import UIKit
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Implementation
class HomeActiveNavViewController: UIViewController {
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Properties
var homeActiveNavView: UIView!
var snazzyImage5ImageView: UIImageView!
var lineImageView: UIImageView!
var rectangleView: UIView!
var rectangleTwoView: UIView!
var group6View: UIView!
var acmeWasteDisposalLabel: UILabel!
var group4View: UIView!
var birninKebbiCreLabel: UILabel!
var icLocationOn24pxImageView: UIImageView!
var routingLabel: UILabel!
var group5View: UIView!
var stopLabel: UILabel!
var targetView: UIView!
var outlinedUiMapTargetImageView: UIImageView!
var binView: UIView!
var recyclingBinImageView: UIImageView!
var locationView: UIView!
var ovalView: UIView!
var ovalTwoView: UIView!
var ovalThreeView: UIView!
var pathImageView: UIImageView!
var ovalImageView: UIImageView!
var rectangleThreeView: UIView!
var group3View: UIView!
var menuLeftImageView: UIImageView!
var groupImageView: UIImageView!
private var allGradientLayers: [CAGradientLayer] = []
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Lifecycle
override public func viewDidLoad() {
super.viewDidLoad()
self.setupComponents()
self.setupLayout()
self.setupUI()
self.setupGestureRecognizers()
self.setupLocalization()
// Do any additional setup after loading the view, typically from a nib.
}
override public func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// Navigation bar, if any
self.navigationController?.setNavigationBarHidden(true, animated: true)
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Setup
private func setupComponents() {
// Setup homeActiveNavView
self.view.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1) /* #FFFFFF */
self.view.translatesAutoresizingMaskIntoConstraints = true
// Setup snazzyImage5ImageView
self.snazzyImage5ImageView = UIImageView()
self.snazzyImage5ImageView.backgroundColor = UIColor.clear
self.snazzyImage5ImageView.image = UIImage(named: "snazzy-image-5")
self.snazzyImage5ImageView.contentMode = .scaleAspectFill
self.view.addSubview(self.snazzyImage5ImageView)
self.snazzyImage5ImageView.translatesAutoresizingMaskIntoConstraints = false
// Setup lineImageView
self.lineImageView = UIImageView()
self.lineImageView.backgroundColor = UIColor.clear
self.lineImageView.image = UIImage(named: "line")
self.lineImageView.contentMode = .center
self.view.addSubview(self.lineImageView)
self.lineImageView.translatesAutoresizingMaskIntoConstraints = false
// Setup rectangleView
self.rectangleView = UIView(frame: .zero)
let rectangleViewGradient = CAGradientLayer()
rectangleViewGradient.colors = [UIColor(red: 0, green: 0, blue: 0, alpha: 0.5).cgColor /* #000000 */, UIColor(red: 0, green: 0, blue: 0, alpha: 0.5).cgColor /* #000000 */, UIColor.clear.cgColor]
rectangleViewGradient.locations = [0, 0, 1]
rectangleViewGradient.startPoint = CGPoint(x: 0.5, y: 1)
rectangleViewGradient.endPoint = CGPoint(x: 0.5, y: 0)
rectangleViewGradient.frame = self.rectangleView.bounds
self.rectangleView.layer.insertSublayer(rectangleViewGradient, at: 0)
self.allGradientLayers.append(rectangleViewGradient)
self.view.addSubview(self.rectangleView)
self.rectangleView.translatesAutoresizingMaskIntoConstraints = false
// Setup rectangleTwoView
self.rectangleTwoView = UIView(frame: .zero)
self.rectangleTwoView.layer.shadowColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.2).cgColor /* #000000 */
self.rectangleTwoView.layer.shadowOffset = CGSize(width: 0, height: 10)
self.rectangleTwoView.layer.shadowRadius = 20
self.rectangleTwoView.layer.shadowOpacity = 1
self.rectangleTwoView.backgroundColor = UIColor(red: 0.2, green: 0.216, blue: 0.294, alpha: 1) /* #33374B */
self.rectangleTwoView.layer.cornerRadius = 6
self.rectangleTwoView.layer.masksToBounds = true
self.view.addSubview(self.rectangleTwoView)
self.rectangleTwoView.translatesAutoresizingMaskIntoConstraints = false
// Setup group6View
self.group6View = UIView(frame: .zero)
self.group6View.backgroundColor = UIColor.clear
self.view.addSubview(self.group6View)
self.group6View.translatesAutoresizingMaskIntoConstraints = false
// Setup acmeWasteDisposalLabel
self.acmeWasteDisposalLabel = UILabel()
self.acmeWasteDisposalLabel.numberOfLines = 0
let acmeWasteDisposalLabelAttrString = NSMutableAttributedString(string: "Acme waste disposal", attributes: [
.font : UIFont.systemFont(ofSize: 20),
.foregroundColor : UIColor(red: 1, green: 1, blue: 1, alpha: 1),
.kern : 0.5,
.paragraphStyle : NSMutableParagraphStyle(alignment: .left, lineHeight: 25, paragraphSpacing: 0)
])
self.acmeWasteDisposalLabel.attributedText = acmeWasteDisposalLabelAttrString
self.acmeWasteDisposalLabel.backgroundColor = UIColor.clear
self.group6View.addSubview(self.acmeWasteDisposalLabel)
self.acmeWasteDisposalLabel.translatesAutoresizingMaskIntoConstraints = false
// Setup group4View
self.group4View = UIView(frame: .zero)
self.group4View.backgroundColor = UIColor.clear
self.group6View.addSubview(self.group4View)
self.group4View.translatesAutoresizingMaskIntoConstraints = false
// Setup birninKebbiCreLabel
self.birninKebbiCreLabel = UILabel()
self.birninKebbiCreLabel.numberOfLines = 0
let birninKebbiCreLabelAttrString = NSMutableAttributedString(string: "25, Birnin Kebbi Cres, Garki, Abuja • 2km", attributes: [
.font : UIFont.systemFont(ofSize: 12),
.foregroundColor : UIColor(red: 1, green: 1, blue: 1, alpha: 1),
.kern : 0.3,
.paragraphStyle : NSMutableParagraphStyle(alignment: .left, lineHeight: 20, paragraphSpacing: 0)
])
self.birninKebbiCreLabel.attributedText = birninKebbiCreLabelAttrString
self.birninKebbiCreLabel.backgroundColor = UIColor.clear
self.birninKebbiCreLabel.alpha = 0.5
self.group4View.addSubview(self.birninKebbiCreLabel)
self.birninKebbiCreLabel.translatesAutoresizingMaskIntoConstraints = false
// Setup icLocationOn24pxImageView
self.icLocationOn24pxImageView = UIImageView()
self.icLocationOn24pxImageView.backgroundColor = UIColor.clear
self.icLocationOn24pxImageView.image = UIImage(named: "ic-location-on-24px-2")
self.icLocationOn24pxImageView.contentMode = .center
self.group4View.addSubview(self.icLocationOn24pxImageView)
self.icLocationOn24pxImageView.translatesAutoresizingMaskIntoConstraints = false
// Setup routingLabel
self.routingLabel = UILabel()
self.routingLabel.numberOfLines = 0
let routingLabelAttrString = NSMutableAttributedString(string: "Routing…", attributes: [
.font : UIFont.systemFont(ofSize: 14),
.foregroundColor : UIColor(red: 1, green: 1, blue: 1, alpha: 1),
.kern : 0.44,
.paragraphStyle : NSMutableParagraphStyle(alignment: .left, lineHeight: 25, paragraphSpacing: 0)
])
self.routingLabel.attributedText = routingLabelAttrString
self.routingLabel.backgroundColor = UIColor.clear
self.routingLabel.alpha = 0.5
self.view.addSubview(self.routingLabel)
self.routingLabel.translatesAutoresizingMaskIntoConstraints = false
// Setup group5View
self.group5View = UIView(frame: .zero)
self.group5View.backgroundColor = UIColor(red: 0.627, green: 0, blue: 0, alpha: 1) /* #A00000 */
self.group5View.layer.cornerRadius = 4
self.group5View.layer.masksToBounds = true
self.view.addSubview(self.group5View)
self.group5View.translatesAutoresizingMaskIntoConstraints = false
// Setup stopLabel
self.stopLabel = UILabel()
self.stopLabel.numberOfLines = 0
let stopLabelAttrString = NSMutableAttributedString(string: "Stop", attributes: [
.font : UIFont.systemFont(ofSize: 14),
.foregroundColor : UIColor(red: 1, green: 1, blue: 1, alpha: 1),
.kern : 0.44,
.paragraphStyle : NSMutableParagraphStyle(alignment: .center, lineHeight: nil, paragraphSpacing: 0)
])
self.stopLabel.attributedText = stopLabelAttrString
self.stopLabel.backgroundColor = UIColor.clear
self.group5View.addSubview(self.stopLabel)
self.stopLabel.translatesAutoresizingMaskIntoConstraints = false
// Setup targetView
self.targetView = UIView(frame: .zero)
self.targetView.layer.shadowColor = UIColor(red: 0.141, green: 0.149, blue: 0.2, alpha: 1).cgColor /* #242633 */
self.targetView.layer.shadowOffset = CGSize(width: 0, height: 11)
self.targetView.layer.shadowRadius = 23
self.targetView.layer.shadowOpacity = 1
self.targetView.backgroundColor = UIColor(red: 0.141, green: 0.149, blue: 0.2, alpha: 1) /* #242633 */
self.targetView.layer.cornerRadius = 25
self.targetView.layer.masksToBounds = true
self.view.addSubview(self.targetView)
self.targetView.translatesAutoresizingMaskIntoConstraints = false
// Setup outlinedUiMapTargetImageView
self.outlinedUiMapTargetImageView = UIImageView()
self.outlinedUiMapTargetImageView.backgroundColor = UIColor.clear
self.outlinedUiMapTargetImageView.image = UIImage(named: "outlined-ui-map-target")
self.outlinedUiMapTargetImageView.contentMode = .center
self.targetView.addSubview(self.outlinedUiMapTargetImageView)
self.outlinedUiMapTargetImageView.translatesAutoresizingMaskIntoConstraints = false
// Setup binView
self.binView = UIView(frame: .zero)
self.binView.layer.borderColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1).cgColor /* #FFFFFF */
self.binView.layer.borderWidth = 5
self.binView.backgroundColor = UIColor(red: 0.031, green: 0.451, blue: 0.239, alpha: 1) /* #08733D */
self.binView.layer.cornerRadius = 10
self.binView.layer.masksToBounds = true
self.view.addSubview(self.binView)
self.binView.translatesAutoresizingMaskIntoConstraints = false
// Setup recyclingBinImageView
self.recyclingBinImageView = UIImageView()
self.recyclingBinImageView.backgroundColor = UIColor.clear
self.recyclingBinImageView.image = UIImage(named: "recycling-bin")
self.recyclingBinImageView.contentMode = .center
self.binView.addSubview(self.recyclingBinImageView)
self.recyclingBinImageView.translatesAutoresizingMaskIntoConstraints = false
// Setup locationView
self.locationView = UIView(frame: .zero)
self.locationView.backgroundColor = UIColor.clear
self.view.addSubview(self.locationView)
self.locationView.translatesAutoresizingMaskIntoConstraints = false
// Setup ovalView
self.ovalView = UIView(frame: .zero)
self.ovalView.backgroundColor = UIColor(red: 0.031, green: 0.451, blue: 0.239, alpha: 1) /* #08733D */
self.ovalView.layer.cornerRadius = 49
self.ovalView.layer.masksToBounds = true
self.ovalView.alpha = 0.1
self.locationView.addSubview(self.ovalView)
self.ovalView.translatesAutoresizingMaskIntoConstraints = false
// Setup ovalTwoView
self.ovalTwoView = UIView(frame: .zero)
self.ovalTwoView.backgroundColor = UIColor(red: 0.031, green: 0.451, blue: 0.239, alpha: 1) /* #08733D */
self.ovalTwoView.layer.cornerRadius = 65
self.ovalTwoView.layer.masksToBounds = true
self.ovalTwoView.alpha = 0.05
self.locationView.addSubview(self.ovalTwoView)
self.ovalTwoView.translatesAutoresizingMaskIntoConstraints = false
// Setup ovalThreeView
self.ovalThreeView = UIView(frame: .zero)
self.ovalThreeView.layer.shadowColor = UIColor(red: 0.031, green: 0.451, blue: 0.239, alpha: 1).cgColor /* #08733D */
self.ovalThreeView.layer.shadowOffset = CGSize(width: 0, height: 5)
self.ovalThreeView.layer.shadowRadius = 10
self.ovalThreeView.layer.shadowOpacity = 1
self.ovalThreeView.backgroundColor = UIColor(red: 0.031, green: 0.451, blue: 0.239, alpha: 1) /* #08733D */
self.ovalThreeView.layer.cornerRadius = 16
self.ovalThreeView.layer.masksToBounds = true
self.locationView.addSubview(self.ovalThreeView)
self.ovalThreeView.translatesAutoresizingMaskIntoConstraints = false
// Setup pathImageView
self.pathImageView = UIImageView()
self.pathImageView.backgroundColor = UIColor.clear
self.pathImageView.image = UIImage(named: "path")
self.pathImageView.contentMode = .center
self.locationView.addSubview(self.pathImageView)
self.pathImageView.translatesAutoresizingMaskIntoConstraints = false
// Setup ovalImageView
self.ovalImageView = UIImageView()
self.ovalImageView.backgroundColor = UIColor.clear
self.ovalImageView.image = UIImage(named: "oval-5")
self.ovalImageView.contentMode = .center
self.view.addSubview(self.ovalImageView)
self.ovalImageView.translatesAutoresizingMaskIntoConstraints = false
// Setup rectangleThreeView
self.rectangleThreeView = UIView(frame: .zero)
let rectangleThreeViewGradient = CAGradientLayer()
rectangleThreeViewGradient.colors = [UIColor(red: 0, green: 0, blue: 0, alpha: 1).cgColor /* #000000 */, UIColor(red: 0, green: 0, blue: 0, alpha: 0.5).cgColor /* #000000 */, UIColor.clear.cgColor]
rectangleThreeViewGradient.locations = [0, 0, 1]
rectangleThreeViewGradient.startPoint = CGPoint(x: 0.5, y: 0)
rectangleThreeViewGradient.endPoint = CGPoint(x: 0.5, y: 1)
rectangleThreeViewGradient.frame = self.rectangleThreeView.bounds
self.rectangleThreeView.layer.insertSublayer(rectangleThreeViewGradient, at: 0)
self.allGradientLayers.append(rectangleThreeViewGradient)
self.view.addSubview(self.rectangleThreeView)
self.rectangleThreeView.translatesAutoresizingMaskIntoConstraints = false
// Setup group3View
self.group3View = UIView(frame: .zero)
self.group3View.backgroundColor = UIColor.clear
self.view.addSubview(self.group3View)
self.group3View.translatesAutoresizingMaskIntoConstraints = false
// Setup menuLeftImageView
self.menuLeftImageView = UIImageView()
self.menuLeftImageView.backgroundColor = UIColor.clear
self.menuLeftImageView.image = UIImage(named: "menu-left")
self.menuLeftImageView.contentMode = .center
self.group3View.addSubview(self.menuLeftImageView)
self.menuLeftImageView.translatesAutoresizingMaskIntoConstraints = false
// Setup groupImageView
self.groupImageView = UIImageView()
self.groupImageView.backgroundColor = UIColor.clear
self.groupImageView.image = UIImage(named: "group-48")
self.groupImageView.contentMode = .center
self.group3View.addSubview(self.groupImageView)
self.groupImageView.translatesAutoresizingMaskIntoConstraints = false
}
private func setupUI() {
self.extendedLayoutIncludesOpaqueBars = true
self.navigationController?.setNavigationBarHidden(true, animated: true)
}
private func setupGestureRecognizers() {
}
private func setupLocalization() {
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Layout
override public func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
for layer in self.allGradientLayers {
layer.frame = layer.superlayer?.frame ?? CGRect.zero
}
}
private func setupLayout() {
// Setup layout for components
// Setup homeActiveNavView
// Setup snazzyImage5ImageView
self.snazzyImage5ImageView.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: -303).isActive = true
self.snazzyImage5ImageView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: 222).isActive = true
self.snazzyImage5ImageView.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 0).isActive = true
// Setup lineImageView
self.lineImageView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: -98).isActive = true
self.lineImageView.topAnchor.constraint(equalTo: self.rectangleThreeView.bottomAnchor, constant: 34).isActive = true
// Setup rectangleView
self.rectangleView.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: 0).isActive = true
self.rectangleView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: 0).isActive = true
self.rectangleView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: 0).isActive = true
self.rectangleView.heightAnchor.constraint(equalToConstant: 90).isActive = true
// Setup rectangleTwoView
self.rectangleTwoView.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: 17).isActive = true
self.rectangleTwoView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: -18).isActive = true
self.rectangleTwoView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -35).isActive = true
self.rectangleTwoView.heightAnchor.constraint(equalToConstant: 216).isActive = true
// Setup group6View
self.group6View.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: 42).isActive = true
self.group6View.bottomAnchor.constraint(equalTo: self.routingLabel.topAnchor, constant: -16).isActive = true
self.group6View.widthAnchor.constraint(equalToConstant: 280).isActive = true
self.group6View.heightAnchor.constraint(equalToConstant: 68).isActive = true
// Setup acmeWasteDisposalLabel
self.acmeWasteDisposalLabel.leadingAnchor.constraint(equalTo: self.group6View.leadingAnchor, constant: 0).isActive = true
self.acmeWasteDisposalLabel.trailingAnchor.constraint(equalTo: self.group6View.trailingAnchor, constant: -87).isActive = true
self.acmeWasteDisposalLabel.topAnchor.constraint(equalTo: self.group6View.topAnchor, constant: -1).isActive = true
// Setup group4View
self.group4View.leadingAnchor.constraint(equalTo: self.group6View.leadingAnchor, constant: 0).isActive = true
self.group4View.topAnchor.constraint(equalTo: self.acmeWasteDisposalLabel.bottomAnchor, constant: 4).isActive = true
self.group4View.widthAnchor.constraint(equalToConstant: 220).isActive = true
self.group4View.heightAnchor.constraint(equalToConstant: 40).isActive = true
// Setup birninKebbiCreLabel
self.birninKebbiCreLabel.leadingAnchor.constraint(equalTo: self.icLocationOn24pxImageView.trailingAnchor, constant: 8).isActive = true
self.birninKebbiCreLabel.trailingAnchor.constraint(equalTo: self.group4View.trailingAnchor, constant: 0).isActive = true
self.birninKebbiCreLabel.topAnchor.constraint(equalTo: self.group4View.topAnchor, constant: -3).isActive = true
self.birninKebbiCreLabel.widthAnchor.constraint(equalToConstant: 205).isActive = true
// Setup icLocationOn24pxImageView
self.icLocationOn24pxImageView.leadingAnchor.constraint(equalTo: self.group4View.leadingAnchor, constant: 0).isActive = true
self.icLocationOn24pxImageView.topAnchor.constraint(equalTo: self.group4View.topAnchor, constant: 4).isActive = true
// Setup routingLabel
self.routingLabel.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: 42).isActive = true
self.routingLabel.bottomAnchor.constraint(equalTo: self.group5View.topAnchor, constant: -30).isActive = true
// Setup group5View
self.group5View.centerXAnchor.constraint(equalTo: self.view.centerXAnchor, constant: 0).isActive = true
self.group5View.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: -51).isActive = true
self.group5View.widthAnchor.constraint(equalToConstant: 290).isActive = true
self.group5View.heightAnchor.constraint(equalToConstant: 45).isActive = true
// Setup stopLabel
self.stopLabel.centerXAnchor.constraint(equalTo: self.group5View.centerXAnchor, constant: 0).isActive = true
self.stopLabel.centerYAnchor.constraint(equalTo: self.group5View.centerYAnchor, constant: 0).isActive = true
// Setup targetView
self.targetView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: -18).isActive = true
self.targetView.topAnchor.constraint(equalTo: self.rectangleThreeView.bottomAnchor, constant: 401).isActive = true
self.targetView.widthAnchor.constraint(equalToConstant: 50).isActive = true
self.targetView.heightAnchor.constraint(equalToConstant: 50).isActive = true
// Setup outlinedUiMapTargetImageView
self.outlinedUiMapTargetImageView.leadingAnchor.constraint(equalTo: self.targetView.leadingAnchor, constant: 12).isActive = true
self.outlinedUiMapTargetImageView.trailingAnchor.constraint(equalTo: self.targetView.trailingAnchor, constant: -12).isActive = true
self.outlinedUiMapTargetImageView.centerYAnchor.constraint(equalTo: self.targetView.centerYAnchor, constant: 0).isActive = true
// Setup binView
self.binView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: -78).isActive = true
self.binView.topAnchor.constraint(equalTo: self.rectangleThreeView.bottomAnchor, constant: 5).isActive = true
self.binView.widthAnchor.constraint(equalToConstant: 50).isActive = true
self.binView.heightAnchor.constraint(equalToConstant: 50).isActive = true
// Setup recyclingBinImageView
self.recyclingBinImageView.leadingAnchor.constraint(equalTo: self.binView.leadingAnchor, constant: 16).isActive = true
self.recyclingBinImageView.trailingAnchor.constraint(equalTo: self.binView.trailingAnchor, constant: -16).isActive = true
self.recyclingBinImageView.centerYAnchor.constraint(equalTo: self.binView.centerYAnchor, constant: 0).isActive = true
// Setup locationView
self.locationView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor, constant: 0).isActive = true
self.locationView.topAnchor.constraint(equalTo: self.binView.bottomAnchor, constant: 204).isActive = true
self.locationView.widthAnchor.constraint(equalToConstant: 130).isActive = true
self.locationView.heightAnchor.constraint(equalToConstant: 130).isActive = true
// Setup ovalView
self.ovalView.leadingAnchor.constraint(equalTo: self.locationView.leadingAnchor, constant: 16).isActive = true
self.ovalView.trailingAnchor.constraint(equalTo: self.locationView.trailingAnchor, constant: -16).isActive = true
self.ovalView.centerYAnchor.constraint(equalTo: self.locationView.centerYAnchor, constant: 0).isActive = true
self.ovalView.heightAnchor.constraint(equalToConstant: 98).isActive = true
// Setup ovalTwoView
self.ovalTwoView.leadingAnchor.constraint(equalTo: self.locationView.leadingAnchor, constant: 0).isActive = true
self.ovalTwoView.trailingAnchor.constraint(equalTo: self.locationView.trailingAnchor, constant: 0).isActive = true
self.ovalTwoView.centerYAnchor.constraint(equalTo: self.locationView.centerYAnchor, constant: 0).isActive = true
self.ovalTwoView.heightAnchor.constraint(equalToConstant: 130).isActive = true
// Setup ovalThreeView
self.ovalThreeView.centerXAnchor.constraint(equalTo: self.locationView.centerXAnchor, constant: 0).isActive = true
self.ovalThreeView.centerYAnchor.constraint(equalTo: self.locationView.centerYAnchor, constant: 0).isActive = true
self.ovalThreeView.widthAnchor.constraint(equalToConstant: 32).isActive = true
self.ovalThreeView.heightAnchor.constraint(equalToConstant: 32).isActive = true
// Setup pathImageView
self.pathImageView.centerXAnchor.constraint(equalTo: self.locationView.centerXAnchor, constant: 0).isActive = true
self.pathImageView.centerYAnchor.constraint(equalTo: self.locationView.centerYAnchor, constant: 0).isActive = true
// Setup ovalImageView
self.ovalImageView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: -43).isActive = true
self.ovalImageView.topAnchor.constraint(equalTo: self.targetView.bottomAnchor, constant: 40).isActive = true
// Setup rectangleThreeView
self.rectangleThreeView.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: 0).isActive = true
self.rectangleThreeView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: 0).isActive = true
self.rectangleThreeView.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 0).isActive = true
self.rectangleThreeView.heightAnchor.constraint(equalToConstant: 90).isActive = true
// Setup group3View
self.group3View.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: 17).isActive = true
self.group3View.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: -18).isActive = true
self.group3View.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 53).isActive = true
self.group3View.heightAnchor.constraint(equalToConstant: 27).isActive = true
// Setup menuLeftImageView
self.menuLeftImageView.leadingAnchor.constraint(equalTo: self.group3View.leadingAnchor, constant: 0).isActive = true
self.menuLeftImageView.centerYAnchor.constraint(equalTo: self.group3View.centerYAnchor, constant: 0).isActive = true
// Setup groupImageView
self.groupImageView.trailingAnchor.constraint(equalTo: self.group3View.trailingAnchor, constant: 0).isActive = true
self.groupImageView.centerYAnchor.constraint(equalTo: self.group3View.centerYAnchor, constant: 0).isActive = true
}
// --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
// MARK: - Status Bar
override public var prefersStatusBarHidden: Bool {
return true
}
override public var preferredStatusBarStyle: UIStatusBarStyle {
return .default
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment