Commit d7fae2bf by Daniel Dahan

prepare for release

parent 489a97dd
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
9663F9501C7A74FC00AF0965 /* AppRightViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F94F1C7A74FC00AF0965 /* AppRightViewController.swift */; }; 9663F9501C7A74FC00AF0965 /* AppRightViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F94F1C7A74FC00AF0965 /* AppRightViewController.swift */; };
9663F9521C7A751D00AF0965 /* FeedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9511C7A751D00AF0965 /* FeedViewController.swift */; }; 9663F9521C7A751D00AF0965 /* FeedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9511C7A751D00AF0965 /* FeedViewController.swift */; };
96CC08881C7FEBD60034FF84 /* InboxViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CC08871C7FEBD60034FF84 /* InboxViewController.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 */ /* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
...@@ -29,7 +27,6 @@ ...@@ -29,7 +27,6 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
96D528671C81EB9E00D3BDD1 /* Material.framework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -50,7 +47,6 @@ ...@@ -50,7 +47,6 @@
9663F94F1C7A74FC00AF0965 /* AppRightViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppRightViewController.swift; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 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 */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
...@@ -58,7 +54,6 @@ ...@@ -58,7 +54,6 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
96D528661C81EB9E00D3BDD1 /* Material.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -68,7 +63,6 @@ ...@@ -68,7 +63,6 @@
9663F9251C7A744500AF0965 = { 9663F9251C7A744500AF0965 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
96D528651C81EB9E00D3BDD1 /* Material.framework */,
9663F9301C7A744600AF0965 /* App */, 9663F9301C7A744600AF0965 /* App */,
9663F92F1C7A744600AF0965 /* Products */, 9663F92F1C7A744600AF0965 /* Products */,
); );
......
...@@ -70,7 +70,7 @@ class AppLeftViewController: UIViewController { ...@@ -70,7 +70,7 @@ class AppLeftViewController: UIViewController {
/// General preparation statements. /// General preparation statements.
private func prepareView() { private func prepareView() {
view.backgroundColor = MaterialColor.grey.darken4 view.backgroundColor = MaterialColor.blueGrey.darken4
} }
/// Prepares the items that are displayed within the tableView. /// Prepares the items that are displayed within the tableView.
...@@ -137,10 +137,10 @@ extension AppLeftViewController: UITableViewDataSource { ...@@ -137,10 +137,10 @@ extension AppLeftViewController: UITableViewDataSource {
let item: Item = items[indexPath.row] let item: Item = items[indexPath.row]
cell.textLabel!.text = item.text cell.textLabel!.text = item.text
cell.textLabel!.textColor = MaterialColor.grey.lighten2 cell.textLabel!.textColor = MaterialColor.blueGrey.lighten2
cell.textLabel!.font = RobotoFont.medium cell.textLabel!.font = RobotoFont.medium
cell.imageView!.image = UIImage(named: item.imageName)?.imageWithRenderingMode(.AlwaysTemplate) 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 cell.backgroundColor = MaterialColor.clear
return cell return cell
......
...@@ -57,7 +57,7 @@ class AppRightViewController: UIViewController { ...@@ -57,7 +57,7 @@ class AppRightViewController: UIViewController {
/// General preparation statements. /// General preparation statements.
private func prepareView() { private func prepareView() {
view.backgroundColor = MaterialColor.grey.darken4 view.backgroundColor = MaterialColor.blueGrey.darken4
} }
override func viewWillAppear(animated: Bool) { override func viewWillAppear(animated: Bool) {
...@@ -104,10 +104,10 @@ extension AppRightViewController: UITableViewDataSource { ...@@ -104,10 +104,10 @@ extension AppRightViewController: UITableViewDataSource {
let item: Item = items[indexPath.row] let item: Item = items[indexPath.row]
cell.textLabel!.text = item.text cell.textLabel!.text = item.text
cell.textLabel!.textColor = MaterialColor.grey.lighten2 cell.textLabel!.textColor = MaterialColor.blueGrey.lighten2
cell.textLabel!.font = RobotoFont.medium cell.textLabel!.font = RobotoFont.medium
cell.imageView!.image = UIImage(named: item.imageName)?.imageWithRenderingMode(.AlwaysTemplate) 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 cell.backgroundColor = MaterialColor.clear
return cell return cell
......
...@@ -46,7 +46,6 @@ class AppSearchBarViewController: SearchBarViewController { ...@@ -46,7 +46,6 @@ class AppSearchBarViewController: SearchBarViewController {
override func viewWillDisappear(animated: Bool) { override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
sideNavigationViewController?.enabled = true sideNavigationViewController?.enabled = true
searchBarView.textField.resignFirstResponder()
} }
override func viewWillAppear(animated: Bool) { override func viewWillAppear(animated: Bool) {
...@@ -54,11 +53,16 @@ class AppSearchBarViewController: SearchBarViewController { ...@@ -54,11 +53,16 @@ class AppSearchBarViewController: SearchBarViewController {
searchBarView.statusBarStyle = .Default searchBarView.statusBarStyle = .Default
sideNavigationViewController?.delegate = self sideNavigationViewController?.delegate = self
sideNavigationViewController?.enabled = false sideNavigationViewController?.enabled = false
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
searchBarView.textField.becomeFirstResponder() searchBarView.textField.becomeFirstResponder()
} }
/// Toggle SideSearchViewController left UIViewController. /// Toggle SideSearchViewController left UIViewController.
internal func handleBackButton() { internal func handleBackButton() {
searchBarView.textField.resignFirstResponder()
navigationBarViewController?.floatingViewController = nil navigationBarViewController?.floatingViewController = nil
} }
...@@ -80,18 +84,18 @@ class AppSearchBarViewController: SearchBarViewController { ...@@ -80,18 +84,18 @@ class AppSearchBarViewController: SearchBarViewController {
var image = UIImage(named: "ic_close_white")?.imageWithRenderingMode(.AlwaysTemplate) var image = UIImage(named: "ic_close_white")?.imageWithRenderingMode(.AlwaysTemplate)
let clearButton: FlatButton = FlatButton() let clearButton: FlatButton = FlatButton()
clearButton.pulseColor = MaterialColor.grey.darken4 clearButton.pulseColor = MaterialColor.blueGrey.darken4
clearButton.pulseScale = false clearButton.pulseScale = false
clearButton.tintColor = MaterialColor.grey.darken4 clearButton.tintColor = MaterialColor.blueGrey.darken4
clearButton.setImage(image, forState: .Normal) clearButton.setImage(image, forState: .Normal)
clearButton.setImage(image, forState: .Highlighted) clearButton.setImage(image, forState: .Highlighted)
// Back button. // Back button.
image = UIImage(named: "ic_arrow_back_white")?.imageWithRenderingMode(.AlwaysTemplate) image = UIImage(named: "ic_arrow_back_white")?.imageWithRenderingMode(.AlwaysTemplate)
let backButton: FlatButton = FlatButton() let backButton: FlatButton = FlatButton()
backButton.pulseColor = MaterialColor.grey.darken4 backButton.pulseColor = MaterialColor.blueGrey.darken4
backButton.pulseScale = false backButton.pulseScale = false
backButton.tintColor = MaterialColor.grey.darken4 backButton.tintColor = MaterialColor.blueGrey.darken4
backButton.setImage(image, forState: .Normal) backButton.setImage(image, forState: .Normal)
backButton.setImage(image, forState: .Highlighted) backButton.setImage(image, forState: .Highlighted)
backButton.addTarget(self, action: "handleBackButton", forControlEvents: .TouchUpInside) backButton.addTarget(self, action: "handleBackButton", forControlEvents: .TouchUpInside)
...@@ -99,18 +103,18 @@ class AppSearchBarViewController: SearchBarViewController { ...@@ -99,18 +103,18 @@ class AppSearchBarViewController: SearchBarViewController {
// More button. // More button.
image = UIImage(named: "ic_more_horiz_white")?.imageWithRenderingMode(.AlwaysTemplate) image = UIImage(named: "ic_more_horiz_white")?.imageWithRenderingMode(.AlwaysTemplate)
let moreButton: FlatButton = FlatButton() let moreButton: FlatButton = FlatButton()
moreButton.pulseColor = MaterialColor.grey.darken4 moreButton.pulseColor = MaterialColor.blueGrey.darken4
moreButton.pulseScale = false moreButton.pulseScale = false
moreButton.tintColor = MaterialColor.grey.darken4 moreButton.tintColor = MaterialColor.blueGrey.darken4
moreButton.setImage(image, forState: .Normal) moreButton.setImage(image, forState: .Normal)
moreButton.setImage(image, forState: .Highlighted) moreButton.setImage(image, forState: .Highlighted)
moreButton.addTarget(self, action: "handleMoreButton", forControlEvents: .TouchUpInside) moreButton.addTarget(self, action: "handleMoreButton", forControlEvents: .TouchUpInside)
searchBarView.delegate = self searchBarView.delegate = self
searchBarView.placeholder = "Search" searchBarView.placeholder = "Search"
searchBarView.tintColor = MaterialColor.grey.darken4 searchBarView.tintColor = MaterialColor.blueGrey.darken4
searchBarView.textColor = MaterialColor.grey.darken4 searchBarView.textColor = MaterialColor.blueGrey.darken4
searchBarView.placeholderTextColor = MaterialColor.grey.darken4 searchBarView.placeholderTextColor = MaterialColor.blueGrey.darken4
searchBarView.textField.font = RobotoFont.regularWithSize(17) searchBarView.textField.font = RobotoFont.regularWithSize(17)
searchBarView.textField.delegate = self searchBarView.textField.delegate = self
......
...@@ -57,7 +57,7 @@ class FeedViewController: UIViewController { ...@@ -57,7 +57,7 @@ class FeedViewController: UIViewController {
/// Prepares view. /// Prepares view.
private func prepareView() { private func prepareView() {
view.backgroundColor = MaterialColor.grey.lighten4 view.backgroundColor = MaterialColor.blueGrey.lighten4
} }
/// Prepares the collectionView /// Prepares the collectionView
...@@ -81,8 +81,8 @@ extension FeedViewController: MaterialCollectionViewDataSource { ...@@ -81,8 +81,8 @@ extension FeedViewController: MaterialCollectionViewDataSource {
return [ return [
MaterialDataSourceItem( MaterialDataSourceItem(
data: [ data: [
"title": "MaterialColor", "title": "Summer BBQ",
"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.", "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" "date": "February 26, 2016"
], ],
width: 150, // Applied when scrollDirection is .Horizontal width: 150, // Applied when scrollDirection is .Horizontal
...@@ -90,26 +90,26 @@ extension FeedViewController: MaterialCollectionViewDataSource { ...@@ -90,26 +90,26 @@ extension FeedViewController: MaterialCollectionViewDataSource {
), ),
MaterialDataSourceItem( MaterialDataSourceItem(
data: [ data: [
"title": "MaterialColor", "title": "Birthday gift",
"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.", "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" "date": "February 26, 2016"
], ],
width: 250, // Applied when scrollDirection is .Horizontal width: 250, // Applied when scrollDirection is .Horizontal
height: 250 // Applied when scrollDirection is .Vertical height: 150 // Applied when scrollDirection is .Vertical
), ),
MaterialDataSourceItem( MaterialDataSourceItem(
data: [ data: [
"title": "MaterialColor", "title": "Brunch this weekend?",
"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.", "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" "date": "February 26, 2016"
], ],
width: 350, // Applied when scrollDirection is .Horizontal width: 350, // Applied when scrollDirection is .Horizontal
height: 350 // Applied when scrollDirection is .Vertical height: 150 // Applied when scrollDirection is .Vertical
), ),
MaterialDataSourceItem( MaterialDataSourceItem(
data: [ data: [
"title": "MaterialColor", "title": "Giants game",
"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.", "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" "date": "February 26, 2016"
], ],
width: 150, // Applied when scrollDirection is .Horizontal width: 150, // Applied when scrollDirection is .Horizontal
...@@ -117,21 +117,21 @@ extension FeedViewController: MaterialCollectionViewDataSource { ...@@ -117,21 +117,21 @@ extension FeedViewController: MaterialCollectionViewDataSource {
), ),
MaterialDataSourceItem( MaterialDataSourceItem(
data: [ data: [
"title": "MaterialColor", "title": "Recipe to try",
"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.", "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" "date": "February 26, 2016"
], ],
width: 250, // Applied when scrollDirection is .Horizontal width: 250, // Applied when scrollDirection is .Horizontal
height: 250 // Applied when scrollDirection is .Vertical height: 150 // Applied when scrollDirection is .Vertical
), ),
MaterialDataSourceItem( MaterialDataSourceItem(
data: [ data: [
"title": "MaterialColor", "title": "Interview",
"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.", "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" "date": "February 26, 2016"
], ],
width: 350, // Applied when scrollDirection is .Horizontal 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 { ...@@ -150,12 +150,55 @@ extension FeedViewController: MaterialCollectionViewDataSource {
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let c: MaterialCollectionViewCell = collectionView.dequeueReusableCellWithReuseIdentifier("MaterialCollectionViewCell", forIndexPath: indexPath) as! MaterialCollectionViewCell let c: MaterialCollectionViewCell = collectionView.dequeueReusableCellWithReuseIdentifier("MaterialCollectionViewCell", forIndexPath: indexPath) as! MaterialCollectionViewCell
c.backgroundColor = MaterialColor.grey.darken1 let item: MaterialDataSourceItem = items()[indexPath.item]
// Access the item data property to set data values. if let data: Dictionary<String, AnyObject> = item.data as? Dictionary<String, AnyObject> {
// let item: MaterialDataSourceItem = items()[indexPath.item]
// let data: Dictionary<String, AnyObject>? = item.data as? Dictionary<String, AnyObject> var cardView: CardView? = c.contentView.subviews.first as? CardView
// print(data)
// 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
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 return c
} }
......
...@@ -116,7 +116,7 @@ extension InboxViewController: UITableViewDataSource { ...@@ -116,7 +116,7 @@ extension InboxViewController: UITableViewDataSource {
cell.textLabel!.font = RobotoFont.regular cell.textLabel!.font = RobotoFont.regular
cell.detailTextLabel!.text = item.detail cell.detailTextLabel!.text = item.detail
cell.detailTextLabel!.font = RobotoFont.regular 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!.image = item.image?.resize(toWidth: 40)
cell.imageView!.layer.cornerRadius = 20 cell.imageView!.layer.cornerRadius = 20
...@@ -130,7 +130,7 @@ extension InboxViewController: UITableViewDataSource { ...@@ -130,7 +130,7 @@ extension InboxViewController: UITableViewDataSource {
let label: UILabel = UILabel() let label: UILabel = UILabel()
label.font = RobotoFont.medium label.font = RobotoFont.medium
label.textColor = MaterialColor.grey.darken1 label.textColor = MaterialColor.blueGrey.darken1
label.text = "Today" label.text = "Today"
header.addSubview(label) header.addSubview(label)
......
...@@ -106,7 +106,7 @@ extension SearchListViewController: UITableViewDataSource { ...@@ -106,7 +106,7 @@ extension SearchListViewController: UITableViewDataSource {
cell.textLabel!.font = RobotoFont.regular cell.textLabel!.font = RobotoFont.regular
cell.detailTextLabel!.text = item.detail cell.detailTextLabel!.text = item.detail
cell.detailTextLabel!.font = RobotoFont.regular 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!.image = item.image?.resize(toWidth: 40)
cell.imageView!.layer.cornerRadius = 20 cell.imageView!.layer.cornerRadius = 20
...@@ -120,7 +120,7 @@ extension SearchListViewController: UITableViewDataSource { ...@@ -120,7 +120,7 @@ extension SearchListViewController: UITableViewDataSource {
let label: UILabel = UILabel() let label: UILabel = UILabel()
label.font = RobotoFont.medium label.font = RobotoFont.medium
label.textColor = MaterialColor.grey.darken1 label.textColor = MaterialColor.blueGrey.darken1
label.text = "Suggestions" label.text = "Suggestions"
header.addSubview(label) header.addSubview(label)
......
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Material' s.name = 'Material'
s.version = '1.34.6' s.version = '1.34.7'
s.license = 'BSD' 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.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' s.homepage = 'http://cosmicmind.io'
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.34.6</string> <string>1.34.7</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -32,6 +32,24 @@ import UIKit ...@@ -32,6 +32,24 @@ import UIKit
@objc(MaterialCollectionViewCell) @objc(MaterialCollectionViewCell)
public class MaterialCollectionViewCell : UICollectionViewCell { 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. /// A preset wrapper around contentInset.
public var contentInsetPreset: MaterialEdgeInset { public var contentInsetPreset: MaterialEdgeInset {
get { get {
...@@ -321,6 +339,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell { ...@@ -321,6 +339,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
depth = .None depth = .None
cornerRadiusPreset = .None cornerRadiusPreset = .None
shape = .None shape = .None
contentsGravity = .ResizeAspectFill
super.init(coder: aDecoder) super.init(coder: aDecoder)
prepareView() prepareView()
} }
...@@ -335,6 +354,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell { ...@@ -335,6 +354,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
depth = .None depth = .None
cornerRadiusPreset = .None cornerRadiusPreset = .None
shape = .None shape = .None
contentsGravity = .ResizeAspectFill
super.init(frame: frame) super.init(frame: frame)
prepareView() 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