Commit d7fae2bf by Daniel Dahan

prepare for release

parent 489a97dd
......@@ -18,8 +18,6 @@
9663F9501C7A74FC00AF0965 /* AppRightViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F94F1C7A74FC00AF0965 /* AppRightViewController.swift */; };
9663F9521C7A751D00AF0965 /* FeedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9511C7A751D00AF0965 /* FeedViewController.swift */; };
96CC08881C7FEBD60034FF84 /* InboxViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CC08871C7FEBD60034FF84 /* InboxViewController.swift */; };
96D528661C81EB9E00D3BDD1 /* Material.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96D528651C81EB9E00D3BDD1 /* Material.framework */; };
96D528671C81EB9E00D3BDD1 /* Material.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 96D528651C81EB9E00D3BDD1 /* Material.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
......@@ -29,7 +27,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
96D528671C81EB9E00D3BDD1 /* Material.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -50,7 +47,6 @@
9663F94F1C7A74FC00AF0965 /* AppRightViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppRightViewController.swift; sourceTree = "<group>"; };
9663F9511C7A751D00AF0965 /* FeedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedViewController.swift; sourceTree = "<group>"; };
96CC08871C7FEBD60034FF84 /* InboxViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InboxViewController.swift; sourceTree = "<group>"; };
96D528651C81EB9E00D3BDD1 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = Material.framework; path = "/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -58,7 +54,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
96D528661C81EB9E00D3BDD1 /* Material.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -68,7 +63,6 @@
9663F9251C7A744500AF0965 = {
isa = PBXGroup;
children = (
96D528651C81EB9E00D3BDD1 /* Material.framework */,
9663F9301C7A744600AF0965 /* App */,
9663F92F1C7A744600AF0965 /* Products */,
);
......
......@@ -70,7 +70,7 @@ class AppLeftViewController: UIViewController {
/// General preparation statements.
private func prepareView() {
view.backgroundColor = MaterialColor.grey.darken4
view.backgroundColor = MaterialColor.blueGrey.darken4
}
/// Prepares the items that are displayed within the tableView.
......@@ -137,10 +137,10 @@ extension AppLeftViewController: UITableViewDataSource {
let item: Item = items[indexPath.row]
cell.textLabel!.text = item.text
cell.textLabel!.textColor = MaterialColor.grey.lighten2
cell.textLabel!.textColor = MaterialColor.blueGrey.lighten2
cell.textLabel!.font = RobotoFont.medium
cell.imageView!.image = UIImage(named: item.imageName)?.imageWithRenderingMode(.AlwaysTemplate)
cell.imageView!.tintColor = MaterialColor.grey.lighten2
cell.imageView!.tintColor = MaterialColor.blueGrey.lighten2
cell.backgroundColor = MaterialColor.clear
return cell
......
......@@ -57,7 +57,7 @@ class AppRightViewController: UIViewController {
/// General preparation statements.
private func prepareView() {
view.backgroundColor = MaterialColor.grey.darken4
view.backgroundColor = MaterialColor.blueGrey.darken4
}
override func viewWillAppear(animated: Bool) {
......@@ -104,10 +104,10 @@ extension AppRightViewController: UITableViewDataSource {
let item: Item = items[indexPath.row]
cell.textLabel!.text = item.text
cell.textLabel!.textColor = MaterialColor.grey.lighten2
cell.textLabel!.textColor = MaterialColor.blueGrey.lighten2
cell.textLabel!.font = RobotoFont.medium
cell.imageView!.image = UIImage(named: item.imageName)?.imageWithRenderingMode(.AlwaysTemplate)
cell.imageView!.tintColor = MaterialColor.grey.lighten2
cell.imageView!.tintColor = MaterialColor.blueGrey.lighten2
cell.backgroundColor = MaterialColor.clear
return cell
......
......@@ -46,7 +46,6 @@ class AppSearchBarViewController: SearchBarViewController {
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
sideNavigationViewController?.enabled = true
searchBarView.textField.resignFirstResponder()
}
override func viewWillAppear(animated: Bool) {
......@@ -54,11 +53,16 @@ class AppSearchBarViewController: SearchBarViewController {
searchBarView.statusBarStyle = .Default
sideNavigationViewController?.delegate = self
sideNavigationViewController?.enabled = false
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
searchBarView.textField.becomeFirstResponder()
}
/// Toggle SideSearchViewController left UIViewController.
internal func handleBackButton() {
searchBarView.textField.resignFirstResponder()
navigationBarViewController?.floatingViewController = nil
}
......@@ -80,18 +84,18 @@ class AppSearchBarViewController: SearchBarViewController {
var image = UIImage(named: "ic_close_white")?.imageWithRenderingMode(.AlwaysTemplate)
let clearButton: FlatButton = FlatButton()
clearButton.pulseColor = MaterialColor.grey.darken4
clearButton.pulseColor = MaterialColor.blueGrey.darken4
clearButton.pulseScale = false
clearButton.tintColor = MaterialColor.grey.darken4
clearButton.tintColor = MaterialColor.blueGrey.darken4
clearButton.setImage(image, forState: .Normal)
clearButton.setImage(image, forState: .Highlighted)
// Back button.
image = UIImage(named: "ic_arrow_back_white")?.imageWithRenderingMode(.AlwaysTemplate)
let backButton: FlatButton = FlatButton()
backButton.pulseColor = MaterialColor.grey.darken4
backButton.pulseColor = MaterialColor.blueGrey.darken4
backButton.pulseScale = false
backButton.tintColor = MaterialColor.grey.darken4
backButton.tintColor = MaterialColor.blueGrey.darken4
backButton.setImage(image, forState: .Normal)
backButton.setImage(image, forState: .Highlighted)
backButton.addTarget(self, action: "handleBackButton", forControlEvents: .TouchUpInside)
......@@ -99,18 +103,18 @@ class AppSearchBarViewController: SearchBarViewController {
// More button.
image = UIImage(named: "ic_more_horiz_white")?.imageWithRenderingMode(.AlwaysTemplate)
let moreButton: FlatButton = FlatButton()
moreButton.pulseColor = MaterialColor.grey.darken4
moreButton.pulseColor = MaterialColor.blueGrey.darken4
moreButton.pulseScale = false
moreButton.tintColor = MaterialColor.grey.darken4
moreButton.tintColor = MaterialColor.blueGrey.darken4
moreButton.setImage(image, forState: .Normal)
moreButton.setImage(image, forState: .Highlighted)
moreButton.addTarget(self, action: "handleMoreButton", forControlEvents: .TouchUpInside)
searchBarView.delegate = self
searchBarView.placeholder = "Search"
searchBarView.tintColor = MaterialColor.grey.darken4
searchBarView.textColor = MaterialColor.grey.darken4
searchBarView.placeholderTextColor = MaterialColor.grey.darken4
searchBarView.tintColor = MaterialColor.blueGrey.darken4
searchBarView.textColor = MaterialColor.blueGrey.darken4
searchBarView.placeholderTextColor = MaterialColor.blueGrey.darken4
searchBarView.textField.font = RobotoFont.regularWithSize(17)
searchBarView.textField.delegate = self
......
......@@ -57,7 +57,7 @@ class FeedViewController: UIViewController {
/// Prepares view.
private func prepareView() {
view.backgroundColor = MaterialColor.grey.lighten4
view.backgroundColor = MaterialColor.blueGrey.lighten4
}
/// Prepares the collectionView
......@@ -81,8 +81,8 @@ extension FeedViewController: MaterialCollectionViewDataSource {
return [
MaterialDataSourceItem(
data: [
"title": "MaterialColor",
"detail": "MaterialColor is a complete Material Design color library. It uses base color values that expand to a range of lighter and darker shades, with the addition of accents.",
"title": "Summer BBQ",
"detail": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date": "February 26, 2016"
],
width: 150, // Applied when scrollDirection is .Horizontal
......@@ -90,26 +90,26 @@ extension FeedViewController: MaterialCollectionViewDataSource {
),
MaterialDataSourceItem(
data: [
"title": "MaterialColor",
"detail": "MaterialColor is a complete Material Design color library. It uses base color values that expand to a range of lighter and darker shades, with the addition of accents.",
"title": "Birthday gift",
"detail": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date": "February 26, 2016"
],
width: 250, // Applied when scrollDirection is .Horizontal
height: 250 // Applied when scrollDirection is .Vertical
height: 150 // Applied when scrollDirection is .Vertical
),
MaterialDataSourceItem(
data: [
"title": "MaterialColor",
"detail": "MaterialColor is a complete Material Design color library. It uses base color values that expand to a range of lighter and darker shades, with the addition of accents.",
"title": "Brunch this weekend?",
"detail": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date": "February 26, 2016"
],
width: 350, // Applied when scrollDirection is .Horizontal
height: 350 // Applied when scrollDirection is .Vertical
height: 150 // Applied when scrollDirection is .Vertical
),
MaterialDataSourceItem(
data: [
"title": "MaterialColor",
"detail": "MaterialColor is a complete Material Design color library. It uses base color values that expand to a range of lighter and darker shades, with the addition of accents.",
"title": "Giants game",
"detail": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date": "February 26, 2016"
],
width: 150, // Applied when scrollDirection is .Horizontal
......@@ -117,21 +117,21 @@ extension FeedViewController: MaterialCollectionViewDataSource {
),
MaterialDataSourceItem(
data: [
"title": "MaterialColor",
"detail": "MaterialColor is a complete Material Design color library. It uses base color values that expand to a range of lighter and darker shades, with the addition of accents.",
"title": "Recipe to try",
"detail": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date": "February 26, 2016"
],
width: 250, // Applied when scrollDirection is .Horizontal
height: 250 // Applied when scrollDirection is .Vertical
height: 150 // Applied when scrollDirection is .Vertical
),
MaterialDataSourceItem(
data: [
"title": "MaterialColor",
"detail": "MaterialColor is a complete Material Design color library. It uses base color values that expand to a range of lighter and darker shades, with the addition of accents.",
"title": "Interview",
"detail": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"date": "February 26, 2016"
],
width: 350, // Applied when scrollDirection is .Horizontal
height: 350 // Applied when scrollDirection is .Vertical
height: 150 // Applied when scrollDirection is .Vertical
)
]
}
......@@ -150,12 +150,55 @@ extension FeedViewController: MaterialCollectionViewDataSource {
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let c: MaterialCollectionViewCell = collectionView.dequeueReusableCellWithReuseIdentifier("MaterialCollectionViewCell", forIndexPath: indexPath) as! MaterialCollectionViewCell
c.backgroundColor = MaterialColor.grey.darken1
let item: MaterialDataSourceItem = items()[indexPath.item]
if let data: Dictionary<String, AnyObject> = item.data as? Dictionary<String, AnyObject> {
var cardView: CardView? = c.contentView.subviews.first as? CardView
// Only build the template if the cardView doesn't exist.
if nil == cardView {
// CardView template example.
cardView = CardView()
c.contentView.addSubview(cardView!)
cardView!.pulseColor = nil
cardView!.pulseScale = false
cardView!.divider = false
cardView!.depth = .None
// Access the item data property to set data values.
// let item: MaterialDataSourceItem = items()[indexPath.item]
// let data: Dictionary<String, AnyObject>? = item.data as? Dictionary<String, AnyObject>
// print(data)
let titleLabel: UILabel = UILabel()
titleLabel.textColor = MaterialColor.blueGrey.darken4
titleLabel.font = RobotoFont.mediumWithSize(18)
titleLabel.text = data["title"] as? String
cardView!.titleLabel = titleLabel
let detailLabel: UILabel = UILabel()
detailLabel.numberOfLines = 2
detailLabel.textColor = MaterialColor.blueGrey.darken2
detailLabel.font = RobotoFont.regular
detailLabel.text = data["detail"] as? String
cardView!.detailView = detailLabel
let image: UIImage? = UIImage(named: "ic_share_white")?.imageWithRenderingMode(.AlwaysTemplate)
let shareButton: FlatButton = FlatButton()
shareButton.pulseColor = MaterialColor.blueGrey.base
shareButton.tintColor = MaterialColor.blueGrey.base
shareButton.setImage(image, forState: .Normal)
shareButton.setImage(image, forState: .Highlighted)
cardView!.rightButtons = [shareButton]
c.contentView.addSubview(cardView!)
} else {
cardView?.titleLabel?.text = data["title"] as? String
(cardView?.detailView as? UILabel)?.text = data["detail"] as? String
}
cardView!.frame = c.bounds
}
return c
}
......
......@@ -116,7 +116,7 @@ extension InboxViewController: UITableViewDataSource {
cell.textLabel!.font = RobotoFont.regular
cell.detailTextLabel!.text = item.detail
cell.detailTextLabel!.font = RobotoFont.regular
cell.detailTextLabel!.textColor = MaterialColor.grey.darken1
cell.detailTextLabel!.textColor = MaterialColor.blueGrey.darken1
cell.imageView!.image = item.image?.resize(toWidth: 40)
cell.imageView!.layer.cornerRadius = 20
......@@ -130,7 +130,7 @@ extension InboxViewController: UITableViewDataSource {
let label: UILabel = UILabel()
label.font = RobotoFont.medium
label.textColor = MaterialColor.grey.darken1
label.textColor = MaterialColor.blueGrey.darken1
label.text = "Today"
header.addSubview(label)
......
......@@ -106,7 +106,7 @@ extension SearchListViewController: UITableViewDataSource {
cell.textLabel!.font = RobotoFont.regular
cell.detailTextLabel!.text = item.detail
cell.detailTextLabel!.font = RobotoFont.regular
cell.detailTextLabel!.textColor = MaterialColor.grey.darken1
cell.detailTextLabel!.textColor = MaterialColor.blueGrey.darken1
cell.imageView!.image = item.image?.resize(toWidth: 40)
cell.imageView!.layer.cornerRadius = 20
......@@ -120,7 +120,7 @@ extension SearchListViewController: UITableViewDataSource {
let label: UILabel = UILabel()
label.font = RobotoFont.medium
label.textColor = MaterialColor.grey.darken1
label.textColor = MaterialColor.blueGrey.darken1
label.text = "Suggestions"
header.addSubview(label)
......
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '1.34.6'
s.version = '1.34.7'
s.license = 'BSD'
s.summary = 'Express your creativity with Material, an animation and graphics framework for Google\'s Material Design and Apple\'s Flat UI in Swift.'
s.homepage = 'http://cosmicmind.io'
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.34.6</string>
<string>1.34.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -32,6 +32,24 @@ import UIKit
@objc(MaterialCollectionViewCell)
public class MaterialCollectionViewCell : UICollectionViewCell {
/**
A property that manages an image for the visualLayer's contents
property. Images should not be set to the backing layer's contents
property to avoid conflicts when using clipsToBounds.
*/
public var image: UIImage? {
didSet {
visualLayer.contents = image?.CGImage
}
}
/// Determines how content should be aligned within the visualLayer's bounds.
public var contentsGravity: MaterialGravity {
didSet {
visualLayer.contentsGravity = MaterialGravityToString(contentsGravity)
}
}
/// A preset wrapper around contentInset.
public var contentInsetPreset: MaterialEdgeInset {
get {
......@@ -321,6 +339,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
depth = .None
cornerRadiusPreset = .None
shape = .None
contentsGravity = .ResizeAspectFill
super.init(coder: aDecoder)
prepareView()
}
......@@ -335,6 +354,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
depth = .None
cornerRadiusPreset = .None
shape = .None
contentsGravity = .ResizeAspectFill
super.init(frame: frame)
prepareView()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment