-
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.
adds menu vc, changes color theme, adds geobackground image, credits …
…added to README
- Loading branch information
1 parent
6fa432e
commit 01d9ab0
Showing
11 changed files
with
169 additions
and
31 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
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
22 changes: 22 additions & 0 deletions
22
CatPColoralettes/Assets.xcassets/geo_background.imageset/Contents.json
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,22 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "geo_background@2x.jpeg", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "geo_background@3x.jpg", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+705 KB
CatPColoralettes/Assets.xcassets/geo_background.imageset/geo_background@2x.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.61 MB
CatPColoralettes/Assets.xcassets/geo_background.imageset/geo_background@3x.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,111 @@ | ||
// | ||
// MenuViewController.swift | ||
// CatPColoralettes | ||
// | ||
// Created by Louis Tur on 8/22/16. | ||
// Copyright © 2016 catthoughts. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
import RESideMenu | ||
import SnapKit | ||
|
||
class MenuViewController: UIViewController { | ||
private static let LeftMargin: CGFloat = 24.0 | ||
private static let VerticalMargin: CGFloat = 16.0 | ||
private static let TopOffsetMultiplier: CGFloat = 0.25 | ||
|
||
// ---------------------------------------------------------------- // | ||
// MARK: - View Lifecycle | ||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
self.setupViewHierarchy() | ||
self.configureConstraints() | ||
} | ||
|
||
override func didReceiveMemoryWarning() { | ||
super.didReceiveMemoryWarning() | ||
} | ||
|
||
|
||
// ---------------------------------------------------------------- // | ||
// MARK: - Setup | ||
private func configureConstraints() { | ||
self.containerView.snp_makeConstraints { (make) in | ||
make.left.right.equalTo(self.view) | ||
make.top.equalTo(self.view.snp_top).offset(self.view.frame.height * MenuViewController.TopOffsetMultiplier) | ||
} | ||
|
||
self.palettesButton.snp_makeConstraints { (make) in | ||
make.top.equalTo(containerView) | ||
make.left.equalTo(containerView).offset(MenuViewController.LeftMargin) | ||
} | ||
|
||
self.gradientsButton.snp_makeConstraints { (make) in | ||
make.left.equalTo(containerView).offset(MenuViewController.LeftMargin) | ||
make.top.equalTo(self.palettesButton.snp_bottom).offset(MenuViewController.VerticalMargin) | ||
} | ||
|
||
self.settingsButton.snp_makeConstraints { (make) in | ||
make.left.equalTo(containerView).offset(MenuViewController.LeftMargin) | ||
make.top.equalTo(self.gradientsButton.snp_bottom).offset(MenuViewController.VerticalMargin) | ||
} | ||
|
||
self.profileButton.snp_makeConstraints { (make) in | ||
make.left.equalTo(containerView).offset(MenuViewController.LeftMargin) | ||
make.top.equalTo(self.settingsButton.snp_bottom).offset(MenuViewController.VerticalMargin) | ||
make.bottom.equalTo(containerView) | ||
} | ||
} | ||
|
||
private func setupViewHierarchy() { | ||
self.view.addSubview(containerView) | ||
self.view.backgroundColor = AppColors.Clear | ||
|
||
self.containerView.addSubview(palettesButton) | ||
self.containerView.addSubview(gradientsButton) | ||
self.containerView.addSubview(settingsButton) | ||
self.containerView.addSubview(profileButton) | ||
} | ||
|
||
override func preferredStatusBarStyle() -> UIStatusBarStyle { | ||
return UIStatusBarStyle.LightContent | ||
} | ||
|
||
// ---------------------------------------------------------------- // | ||
// MARK: - Lazy Instances | ||
internal lazy var containerView: UIView = UIView() | ||
|
||
internal lazy var palettesButton: UIButton = { | ||
let button: UIButton = UIButton() | ||
button.setTitle(AppStrings.PaletteVCTile, forState: .Normal) | ||
button.titleLabel?.font = AppFonts.MenuButtonText | ||
button.titleLabel?.textColor = AppColors.DefaultTitleText | ||
return button | ||
}() | ||
|
||
internal lazy var gradientsButton: UIButton = { | ||
let button: UIButton = UIButton() | ||
button.setTitle(AppStrings.GradientsTitle, forState: .Normal) | ||
button.titleLabel?.font = AppFonts.MenuButtonText | ||
button.titleLabel?.textColor = AppColors.DefaultTitleText | ||
return button | ||
}() | ||
|
||
internal lazy var settingsButton: UIButton = { | ||
let button: UIButton = UIButton() | ||
button.setTitle(AppStrings.SettingsTitle, forState: .Normal) | ||
button.titleLabel?.font = AppFonts.MenuButtonText | ||
button.titleLabel?.textColor = AppColors.DefaultTitleText | ||
return button | ||
}() | ||
|
||
internal lazy var profileButton: UIButton = { | ||
let button: UIButton = UIButton() | ||
button.setTitle(AppStrings.ProfileTitle, forState: .Normal) | ||
button.titleLabel?.font = AppFonts.MenuButtonText | ||
button.titleLabel?.textColor = AppColors.DefaultTitleText | ||
return button | ||
}() | ||
} |
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
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