-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
grenos
committed
Apr 4, 2020
1 parent
f8ea07b
commit c2b2f06
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Binary file modified
BIN
+737 Bytes
(100%)
...odeproj/project.xcworkspace/xcuserdata/vasilis.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// | ||
// GFItemInfoVC.swift | ||
// GHFollowers | ||
// | ||
// Created by Vasileios Gkreen on 04/04/2020. | ||
// Copyright © 2020 Vasileios Gkreen. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
class GFItemInfoVC: UIViewController { | ||
|
||
let stackView = UIStackView() | ||
let itemInfoView1 = GFItemInfoView() | ||
let itemInfoView2 = GFItemInfoView() | ||
let actionButton = GFButton() | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
configureBackgroundView() | ||
layoutUI() | ||
configureStackView() | ||
} | ||
|
||
|
||
private func configureBackgroundView() { | ||
view.layer.cornerRadius = 18 | ||
view.backgroundColor = .secondarySystemBackground | ||
} | ||
|
||
|
||
private func configureStackView() { | ||
stackView.axis = .horizontal | ||
stackView.distribution = .equalSpacing | ||
|
||
stackView.addArrangedSubview(itemInfoView1) | ||
stackView.addArrangedSubview(itemInfoView2) | ||
} | ||
|
||
|
||
private func layoutUI() { | ||
view.addSubview(stackView) | ||
view.addSubview(actionButton) | ||
|
||
stackView.translatesAutoresizingMaskIntoConstraints = false | ||
let padding: CGFloat = 20 | ||
|
||
NSLayoutConstraint.activate([ | ||
stackView.topAnchor.constraint(equalTo: view.topAnchor, constant: padding), | ||
stackView.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding), | ||
stackView.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -padding), | ||
stackView.heightAnchor.constraint(equalToConstant: 50), | ||
|
||
actionButton.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: -padding), | ||
actionButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding), | ||
actionButton.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: -padding), | ||
actionButton.heightAnchor.constraint(equalToConstant: 44) | ||
]) | ||
} | ||
|
||
|
||
} | ||
|