Commit d7b65e8d by Daniel Dahan

updated default width of SideNavigationController

parent c9b9a841
...@@ -235,19 +235,17 @@ extension RecipesViewController: UITableViewDataSource { ...@@ -235,19 +235,17 @@ extension RecipesViewController: UITableViewDataSource {
/// Prepares the cells within the tableView. /// Prepares the cells within the tableView.
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell: MaterialTableViewCell = MaterialTableViewCell(style: .Subtitle, reuseIdentifier: "MaterialTableViewCell") let cell: MaterialTableViewCell = MaterialTableViewCell(style: .Subtitle, reuseIdentifier: "MaterialTableViewCell")
let item: MaterialDataSourceItem = dataSourceItems[indexPath.row] let item: MaterialDataSourceItem = dataSourceItems[indexPath.row]
if let data: Dictionary<String, AnyObject> = item.data as? Dictionary<String, AnyObject> { if let data: Dictionary<String, AnyObject> = item.data as? Dictionary<String, AnyObject> {
cell.selectionStyle = .None cell.selectionStyle = .None
cell.textLabel?.text = data["title"] as? String cell.textLabel?.text = data["title"] as? String
cell.textLabel?.font = RobotoFont.regular cell.textLabel?.font = RobotoFont.regular
cell.detailTextLabel?.text = data["detail"] as? String cell.detailTextLabel?.text = data["detail"] as? String
cell.detailTextLabel?.font = RobotoFont.regular cell.detailTextLabel?.font = RobotoFont.regular
cell.detailTextLabel?.textColor = MaterialColor.grey.darken1 cell.detailTextLabel?.textColor = MaterialColor.grey.darken1
cell.imageView!.layer.cornerRadius = 32 cell.imageView?.layer.cornerRadius = 32
cell.imageView!.image = UIImage(named: data["image"] as! String)?.crop(toWidth: 64, toHeight: 64) cell.imageView?.image = UIImage(named: data["image"] as! String)?.crop(toWidth: 64, toHeight: 64)
} }
return cell return cell
......
...@@ -90,19 +90,17 @@ extension RecommendationViewController: UITableViewDataSource { ...@@ -90,19 +90,17 @@ extension RecommendationViewController: UITableViewDataSource {
/// Prepares the cells within the tableView. /// Prepares the cells within the tableView.
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell: MaterialTableViewCell = MaterialTableViewCell(style: .Subtitle, reuseIdentifier: "MaterialTableViewCell") let cell: MaterialTableViewCell = MaterialTableViewCell(style: .Subtitle, reuseIdentifier: "MaterialTableViewCell")
let item: MaterialDataSourceItem = dataSourceItems[indexPath.row] let item: MaterialDataSourceItem = dataSourceItems[indexPath.row]
if let data: Dictionary<String, AnyObject> = item.data as? Dictionary<String, AnyObject> { if let data: Dictionary<String, AnyObject> = item.data as? Dictionary<String, AnyObject> {
cell.selectionStyle = .None cell.selectionStyle = .None
cell.textLabel?.text = data["title"] as? String cell.textLabel?.text = data["title"] as? String
cell.textLabel?.font = RobotoFont.regular cell.textLabel?.font = RobotoFont.regular
cell.detailTextLabel?.text = data["detail"] as? String cell.detailTextLabel?.text = data["detail"] as? String
cell.detailTextLabel?.font = RobotoFont.regular cell.detailTextLabel?.font = RobotoFont.regular
cell.detailTextLabel?.textColor = MaterialColor.grey.darken1 cell.detailTextLabel?.textColor = MaterialColor.grey.darken1
cell.imageView!.layer.cornerRadius = 32 cell.imageView?.layer.cornerRadius = 32
cell.imageView!.image = UIImage(named: data["image"] as! String)?.crop(toWidth: 64, toHeight: 64) cell.imageView?.image = UIImage(named: data["image"] as! String)?.crop(toWidth: 64, toHeight: 64)
} }
return cell return cell
......
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Material' s.name = 'Material'
s.version = '1.37.1' s.version = '1.37.2'
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.37.1</string> <string>1.37.2</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -280,13 +280,13 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel ...@@ -280,13 +280,13 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
A CGFloat property to access the width that the leftView A CGFloat property to access the width that the leftView
opens up to. opens up to.
*/ */
@IBInspectable public private(set) var leftViewWidth: CGFloat = 240 @IBInspectable public private(set) var leftViewWidth: CGFloat = .iPhone == MaterialDevice.type ? 280 : 320
/** /**
A CGFloat property to access the width that the rightView A CGFloat property to access the width that the rightView
opens up to. opens up to.
*/ */
@IBInspectable public private(set) var rightViewWidth: CGFloat = 240 @IBInspectable public private(set) var rightViewWidth: CGFloat = .iPhone == MaterialDevice.type ? 280 : 320
/** /**
An initializer for the SideNavigationController. An initializer for the SideNavigationController.
......
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