Commit 7820bede by Daniel Dahan

added sticker sheet link

parent 559225b4
......@@ -38,9 +38,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let navigationController: NavigationController = AppNavigationController(rootViewController: RecipesViewController())
let navigationController: AppNavigationController = AppNavigationController(rootViewController: RecipesViewController())
let menuViewController: MenuViewController = AppMenuViewController(rootViewController: navigationController)
let menuViewController: AppMenuViewController = AppMenuViewController(rootViewController: navigationController)
menuViewController.edgesForExtendedLayout = .None
let bottomNavigationController: BottomNavigationController = BottomNavigationController()
......
Pod::Spec.new do |s|
s.name = 'Material'
s.version = '1.39.10'
s.version = '1.39.11'
s.license = 'BSD'
s.summary = 'An animation and graphics framework for Material Design in Swift.'
s.homepage = 'http://cosmicmind.io'
......
......@@ -53,6 +53,14 @@ Material is a growing project and will encounter changes throughout its developm
* Visit the Examples directory to see example projects using Material.
* The [Installation](https://github.com/CosmicMind/Material/wiki/Installation) page has documentation on how to run the example projects.
## Sticker Sheet
To help template your project, checkout our latest addition, Material Sticker Sheet.
![MaterialStickerSheet](http://www.materialkit.io/material/images/stickers/material_iso_1.png)
[Purchase the Sticker Sheet](http://www.materialup.com/posts/material-design-sticker-sheets)
## Quick Access
#### Colors
......
......@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.39.10</string>
<string>1.39.11</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -34,6 +34,9 @@ public class MaterialCollectionViewLayout : UICollectionViewLayout {
/// Used to calculate the dimensions of the cells.
internal var offset: CGPoint = CGPointZero
/// The size of items.
public var itemSize: CGSize = CGSizeZero
/// A preset wrapper around contentInset.
public var contentInsetPreset: MaterialEdgeInset = .None {
didSet {
......@@ -85,10 +88,11 @@ public class MaterialCollectionViewLayout : UICollectionViewLayout {
let attributes: UICollectionViewLayoutAttributes = UICollectionViewLayoutAttributes(forCellWithIndexPath: indexPath)
let item: MaterialDataSourceItem = items![indexPath.item]
switch scrollDirection {
case .Vertical:
attributes.frame = CGRectMake(contentInset.left, offset.y, collectionView!.bounds.width - contentInset.left - contentInset.right, nil == item.height ? collectionView!.bounds.height : item.height!)
case .Horizontal:
if 0 < itemSize.width && 0 < itemSize.height {
attributes.frame = CGRectMake(offset.x, offset.y, itemSize.width - contentInset.left - contentInset.right, itemSize.height - contentInset.top - contentInset.bottom)
} else if .Vertical == scrollDirection {
attributes.frame = CGRectMake(contentInset.left, offset.y, collectionView!.bounds.width - contentInset.left - contentInset.right, nil == item.height ? collectionView!.bounds.height : item.height!)
} else {
attributes.frame = CGRectMake(offset.x, contentInset.top, nil == item.width ? collectionView!.bounds.width : item.width!, collectionView!.bounds.height - contentInset.top - contentInset.bottom)
}
......@@ -133,16 +137,22 @@ public class MaterialCollectionViewLayout : UICollectionViewLayout {
layoutItems.append((layoutAttributesForItemAtIndexPath(indexPath!)!, indexPath!))
offset.x += spacing
offset.x += nil == item.width ? 0 : item.width!
offset.x += nil == item.width ? itemSize.width : item.width!
offset.y += spacing
offset.y += nil == item.height ? 0 : item.height!
offset.y += nil == item.height ? itemSize.height : item.height!
}
offset.x += contentInset.right - spacing
offset.y += contentInset.bottom - spacing
contentSize = .Vertical == scrollDirection ? CGSizeMake(collectionView!.bounds.width, offset.y) : CGSizeMake(offset.x, collectionView!.bounds.height)
if 0 < itemSize.width && 0 < itemSize.height {
contentSize = CGSizeMake(offset.x, offset.y)
} else if .Vertical == scrollDirection {
contentSize = CGSizeMake(collectionView!.bounds.width, offset.y)
} else {
contentSize = CGSizeMake(offset.x, collectionView!.bounds.height)
}
}
public override func targetContentOffsetForProposedContentOffset(proposedContentOffset: CGPoint) -> CGPoint {
......
......@@ -62,16 +62,26 @@ public class StatusBarViewController : UIViewController {
*/
public private(set) var rootViewController: UIViewController!
public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
prepareView()
}
/**
An initializer for the StatusBarViewController.
- Parameter rootViewController: The main UIViewController.
*/
public convenience init(rootViewController: UIViewController) {
self.init()
public init(rootViewController: UIViewController) {
super.init(nibName: nil, bundle: nil)
self.rootViewController = rootViewController
prepareView()
}
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
}
/**
A method to swap rootViewController objects.
- Parameter toViewController: The UIViewController to swap
......
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