-
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
Elijah Cobb
committed
Jul 13, 2019
1 parent
8fa5850
commit 6c736f5
Showing
9 changed files
with
190 additions
and
85 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
37 changes: 37 additions & 0 deletions
37
subscribeto/subscribeto/S2UI/S2UINavigationController.swift
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,37 @@ | ||
// | ||
// S2UINavigationController.swift | ||
// subscribeto | ||
// | ||
// Created by Elijah Cobb on 13/07/19. | ||
// Copyright © 2019 subscribeto. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
class S2UINavigationController : UINavigationController { | ||
|
||
override func viewDidLoad() { | ||
|
||
self.navigationBar.isTranslucent = false | ||
self.navigationBar.barTintColor = S2UITheme.darkBackground | ||
self.navigationBar.tintColor = S2UITheme.white | ||
self.navigationBar.titleTextAttributes = [.foregroundColor: S2UITheme.white] | ||
|
||
let grabber = UIView() | ||
grabber.backgroundColor = S2UITheme.white | ||
grabber.useAutoLayout() | ||
grabber.layer.cornerRadius = 0 | ||
|
||
self.navigationBar.addSubview(grabber) | ||
|
||
NSLayoutConstraint.activate([ | ||
grabber.widthAnchor.constraint(equalToConstant: 40), | ||
grabber.heightAnchor.constraint(equalToConstant: 10), | ||
grabber.topAnchor.constraint(equalTo: navigationBar.topAnchor, constant: -10), | ||
grabber.centerXAnchor.constraint(equalTo: navigationBar.centerXAnchor) | ||
]) | ||
|
||
|
||
} | ||
|
||
} |
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
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,21 @@ | ||
// | ||
// S2DiscoverVC.swift | ||
// subscribeto | ||
// | ||
// Created by Elijah Cobb on 13/07/19. | ||
// Copyright © 2019 subscribeto. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
class S2DiscoverVC : UIViewController { | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
self.navigationItem.title = "Store" | ||
self.view.backgroundColor = S2UITheme.lightBackground | ||
|
||
} | ||
|
||
} |
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,70 @@ | ||
// | ||
// ouij.swift | ||
// subscribeto | ||
// | ||
// Created by Elijah Cobb on 12/07/19. | ||
// Copyright © 2019 subscribeto. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
|
||
class S2HomeDashboard : UIView { | ||
|
||
var logoImage: UIImageView! | ||
var logoText: UILabel! | ||
var discoverButton: S2UIButton! | ||
|
||
func applyConstraints(padding: CGFloat) { | ||
|
||
NSLayoutConstraint.activate([ | ||
logoImage.topAnchor.constraint(equalTo: self.topAnchor, constant: padding + 60), | ||
logoImage.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 0), | ||
logoImage.rightAnchor.constraint(equalTo: self.rightAnchor, constant: 0), | ||
logoImage.bottomAnchor.constraint(equalTo: logoText.topAnchor, constant: -padding/2), | ||
logoText.bottomAnchor.constraint(equalTo: discoverButton.topAnchor, constant: -padding * 2), | ||
logoText.leftAnchor.constraint(equalTo: self.leftAnchor, constant: padding), | ||
logoText.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -padding), | ||
logoText.heightAnchor.constraint(equalToConstant: 48), | ||
discoverButton.leftAnchor.constraint(equalTo: self.leftAnchor, constant: padding * 4), | ||
discoverButton.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -padding * 4), | ||
discoverButton.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -padding * 2), | ||
discoverButton.heightAnchor.constraint(equalToConstant: 60), | ||
]) | ||
|
||
} | ||
|
||
override func layoutSubviews() { | ||
|
||
super.layoutSubviews() | ||
|
||
self.backgroundColor = S2UITheme.darkBackground | ||
|
||
logoImage = UIImageView(image: UIImage(named: "iconTransparent")) | ||
logoImage.contentMode = .scaleAspectFit | ||
logoImage.useAutoLayout() | ||
|
||
logoText = UILabel() | ||
logoText.text = "sub.scribe.to" | ||
logoText.textAlignment = .center | ||
logoText.textColor = S2UITheme.white | ||
logoText.font = UIFont.systemFont(ofSize: 48, weight: .bold) | ||
logoText.useAutoLayout() | ||
|
||
discoverButton = S2UIButton(text: "Discover") { | ||
|
||
print("Clicked launch item: Discover.") | ||
let alert = UIAlertController(title: "Clicked 'Discover'", message: nil, preferredStyle: .alert) | ||
alert.addAction(UIAlertAction.init(title: "Done", style: .default, handler: nil)) | ||
UIViewController.presentingViewController()?.present(alert, animated: true, completion: nil) | ||
|
||
} | ||
discoverButton.useAutoLayout() | ||
|
||
self.addSubviews(logoImage, logoText, discoverButton) | ||
|
||
applyConstraints(padding: 20) | ||
|
||
} | ||
|
||
} |
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
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
21 changes: 0 additions & 21 deletions
21
subscribeto/subscribeto/pages/home/S2HomeTopContainer.swift
This file was deleted.
Oops, something went wrong.
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