Commit ac8fb0e1 by Daniel Dahan

closing branch

parent c7d124bd
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'MK' s.name = 'MK'
s.version = '1.20.1' s.version = '1.21.0'
s.license = { :type => "AGPLv3+", :file => "LICENSE" } s.license = { :type => "AGPLv3+", :file => "LICENSE" }
s.summary = 'A Material Design Framework In Swift' s.summary = 'A Material Design Framework In Swift'
s.homepage = 'http://materialkit.io' s.homepage = 'http://materialkit.io'
......
...@@ -44,7 +44,6 @@ ...@@ -44,7 +44,6 @@
65DBE4211B9A9244000C804F /* Roboto-Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 65DBE41F1B9A9244000C804F /* Roboto-Thin.ttf */; }; 65DBE4211B9A9244000C804F /* Roboto-Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 65DBE41F1B9A9244000C804F /* Roboto-Thin.ttf */; };
962F3E531BACA68C0004B8AD /* NavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 962F3E521BACA68C0004B8AD /* NavigationBarView.swift */; }; 962F3E531BACA68C0004B8AD /* NavigationBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 962F3E521BACA68C0004B8AD /* NavigationBarView.swift */; };
962F3E541BACA7FB0004B8AD /* NavigationBarView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 962F3E521BACA68C0004B8AD /* NavigationBarView.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 962F3E541BACA7FB0004B8AD /* NavigationBarView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 962F3E521BACA68C0004B8AD /* NavigationBarView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96312E761BC46540007C0E9D /* MaterialTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96312E751BC46540007C0E9D /* MaterialTableViewCell.swift */; settings = {ASSET_TAGS = (); }; };
963832421B88DFD80015F710 /* MaterialKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 963832361B88DFD80015F710 /* MaterialKit.framework */; }; 963832421B88DFD80015F710 /* MaterialKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 963832361B88DFD80015F710 /* MaterialKit.framework */; };
9638325A1B88E31A0015F710 /* MaterialKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832581B88E31A0015F710 /* MaterialKitTests.swift */; }; 9638325A1B88E31A0015F710 /* MaterialKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 963832581B88E31A0015F710 /* MaterialKitTests.swift */; };
964B17B41BBA447F002A9CA0 /* MaterialLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 964B17B31BBA447F002A9CA0 /* MaterialLayout.swift */; settings = {ASSET_TAGS = (); }; }; 964B17B41BBA447F002A9CA0 /* MaterialLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 964B17B31BBA447F002A9CA0 /* MaterialLayout.swift */; settings = {ASSET_TAGS = (); }; };
...@@ -102,7 +101,6 @@ ...@@ -102,7 +101,6 @@
65DBE41E1B9A9244000C804F /* Roboto-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Bold.ttf"; sourceTree = "<group>"; }; 65DBE41E1B9A9244000C804F /* Roboto-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Bold.ttf"; sourceTree = "<group>"; };
65DBE41F1B9A9244000C804F /* Roboto-Thin.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Thin.ttf"; sourceTree = "<group>"; }; 65DBE41F1B9A9244000C804F /* Roboto-Thin.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Roboto-Thin.ttf"; sourceTree = "<group>"; };
962F3E521BACA68C0004B8AD /* NavigationBarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationBarView.swift; sourceTree = "<group>"; }; 962F3E521BACA68C0004B8AD /* NavigationBarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationBarView.swift; sourceTree = "<group>"; };
96312E751BC46540007C0E9D /* MaterialTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MaterialTableViewCell.swift; sourceTree = "<group>"; };
963832361B88DFD80015F710 /* MaterialKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MaterialKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 963832361B88DFD80015F710 /* MaterialKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MaterialKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
963832411B88DFD80015F710 /* MaterialKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MaterialKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 963832411B88DFD80015F710 /* MaterialKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MaterialKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
963832541B88E30F0015F710 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 963832541B88E30F0015F710 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
...@@ -152,7 +150,6 @@ ...@@ -152,7 +150,6 @@
65BDD1461BB5B916006F7F2B /* MaterialView.swift */, 65BDD1461BB5B916006F7F2B /* MaterialView.swift */,
65BDD16D1BB899F2006F7F2B /* MaterialPulseView.swift */, 65BDD16D1BB899F2006F7F2B /* MaterialPulseView.swift */,
962F3E521BACA68C0004B8AD /* NavigationBarView.swift */, 962F3E521BACA68C0004B8AD /* NavigationBarView.swift */,
96312E751BC46540007C0E9D /* MaterialTableViewCell.swift */,
); );
name = View; name = View;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -459,7 +456,6 @@ ...@@ -459,7 +456,6 @@
65BDD1741BB8D443006F7F2B /* MaterialAnimation.swift in Sources */, 65BDD1741BB8D443006F7F2B /* MaterialAnimation.swift in Sources */,
65BDD14B1BB5DD02006F7F2B /* MaterialFont.swift in Sources */, 65BDD14B1BB5DD02006F7F2B /* MaterialFont.swift in Sources */,
65BDD16A1BB7146B006F7F2B /* MaterialBorder.swift in Sources */, 65BDD16A1BB7146B006F7F2B /* MaterialBorder.swift in Sources */,
96312E761BC46540007C0E9D /* MaterialTableViewCell.swift in Sources */,
65BDD15B1BB7095E006F7F2B /* MaterialRadius.swift in Sources */, 65BDD15B1BB7095E006F7F2B /* MaterialRadius.swift in Sources */,
65BDD1721BB8CD77006F7F2B /* MaterialLabel.swift in Sources */, 65BDD1721BB8CD77006F7F2B /* MaterialLabel.swift in Sources */,
65BDD1491BB5DC98006F7F2B /* MaterialColor.swift in Sources */, 65BDD1491BB5DC98006F7F2B /* MaterialColor.swift in Sources */,
......
...@@ -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.20.1</string> <string>1.21.0</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
//
// Copyright (C) 2015 GraphKit, Inc. <http://graphkit.io> and other GraphKit contributors.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program located at the root of the software package
// in a file called LICENSE. If not, see <http://www.gnu.org/licenses/>.
//
import UIKit
public class MaterialTableViewCell: UITableViewCell {
//
// :name: panRecognizer
//
private var panRecognizer: UIPanGestureRecognizer!
//
// :name: originalCenter
//
private var originalCenter: CGPoint!
//
// :name: leftView
//
public var leftView: UIView? {
didSet {
if let v: UIView = leftView {
contentView.addSubview(v)
}
}
}
//
// :name: rightView
//
public var rightView: UIView? {
didSet {
if let v: UIView = rightView {
contentView.addSubview(v)
}
}
}
//
// :name: init
//
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
//
// :name: init
//
public override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
prepareView()
}
//
// :name: layoutSubviews
//
public override func layoutSubviews() {
super.layoutSubviews()
leftView?.frame = CGRectMake(-bounds.size.width, 0, bounds.size.width, bounds.size.height)
rightView?.frame = CGRectMake(bounds.size.width, 0, bounds.size.width, bounds.size.height)
}
//
// :name: gestureRecognizerShouldBegin
//
public override func gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer) -> Bool {
if let panGestureRecognizer = gestureRecognizer as? UIPanGestureRecognizer {
let translation = panGestureRecognizer.translationInView(superview!)
if fabs(translation.x) > fabs(translation.y) {
return true
}
return false
}
return false
}
//
// :name: handlePanGesture
//
internal func handlePanGesture(recognizer: UIPanGestureRecognizer) {
switch recognizer.state {
case .Began:
break
case .Changed:
break
case .Ended:
break
default:
break
}
}
//
// :name: prepareView
//
private func prepareView() {
clipsToBounds = true
selectionStyle = .None
panRecognizer = UIPanGestureRecognizer(target: self, action: "handlePanGesture:")
panRecognizer.delegate = self
addGestureRecognizer(panRecognizer)
}
}
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