Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
d0b141df
Commit
d0b141df
authored
Jan 02, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added SideNavigationViewController gesture toggle within enabled property
parent
f65afdde
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
460 additions
and
323 deletions
+460
-323
Examples/Programmatic/CaptureView/CaptureView.xcodeproj/project.pbxproj
+8
-2
Examples/Programmatic/SideNavigationViewController/SideNavigationViewController.xcodeproj/project.pbxproj
+20
-0
Examples/Programmatic/SideNavigationViewController/SideNavigationViewController/AMainViewController.swift
+24
-10
MaterialKit.xcodeproj/project.pbxproj
+19
-14
Sources/CaptureView.swift
+2
-14
Sources/CardView.swift
+10
-21
Sources/File.swift
+333
-0
Sources/ImageCardView.swift
+10
-21
Sources/MaterialLabel.swift
+10
-8
Sources/MaterialTextLayer.swift
+5
-6
Sources/MaterialTheme.swift
+0
-207
Sources/MaterialView.swift
+1
-0
Sources/NavigationBarView.swift
+8
-19
Sources/SideNavigationViewController.swift
+10
-1
No files found.
Examples/Programmatic/CaptureView/CaptureView.xcodeproj/project.pbxproj
View file @
d0b141df
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
/* End PBXBuildFile section */
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
/* Begin PBXCopyFilesBuildPhase section */
96
7C0E6E1C1CBEDE005175A6
/* Embed Frameworks */
=
{
96
0590051C38877D00691E88
/* Embed Frameworks */
=
{
isa
=
PBXCopyFilesBuildPhase
;
isa
=
PBXCopyFilesBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
dstPath
=
""
;
dstPath
=
""
;
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
967C0E521C1CB980005175A6
/* Sources */
,
967C0E521C1CB980005175A6
/* Sources */
,
967C0E531C1CB980005175A6
/* Frameworks */
,
967C0E531C1CB980005175A6
/* Frameworks */
,
967C0E541C1CB980005175A6
/* Resources */
,
967C0E541C1CB980005175A6
/* Resources */
,
96
7C0E6E1C1CBEDE005175A6
/* Embed Frameworks */
,
96
0590051C38877D00691E88
/* Embed Frameworks */
,
);
);
buildRules
=
(
buildRules
=
(
);
);
...
@@ -251,10 +251,13 @@
...
@@ -251,10 +251,13 @@
isa
=
XCBuildConfiguration
;
isa
=
XCBuildConfiguration
;
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
INFOPLIST_FILE
=
CaptureView/Info.plist
;
INFOPLIST_FILE
=
CaptureView/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.CaptureView
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.CaptureView
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
""
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
};
name
=
Debug
;
name
=
Debug
;
...
@@ -263,10 +266,13 @@
...
@@ -263,10 +266,13 @@
isa
=
XCBuildConfiguration
;
isa
=
XCBuildConfiguration
;
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
INFOPLIST_FILE
=
CaptureView/Info.plist
;
INFOPLIST_FILE
=
CaptureView/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.CaptureView
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.CaptureView
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
""
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
};
name
=
Release
;
name
=
Release
;
...
...
Examples/Programmatic/SideNavigationViewController/SideNavigationViewController.xcodeproj/project.pbxproj
View file @
d0b141df
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
objects
=
{
objects
=
{
/* Begin PBXBuildFile section */
/* Begin PBXBuildFile section */
9605900D1C388B8500691E88
/* MaterialKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9605900C1C388B8500691E88
/* MaterialKit.framework */
;
};
9605900E1C388B8500691E88
/* MaterialKit.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9605900C1C388B8500691E88
/* MaterialKit.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
9642FA1B1C1B50E700022BC6
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9642FA1A1C1B50E700022BC6
/* AppDelegate.swift */
;
};
9642FA1B1C1B50E700022BC6
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9642FA1A1C1B50E700022BC6
/* AppDelegate.swift */
;
};
9642FA1D1C1B50E700022BC6
/* AMainViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9642FA1C1C1B50E700022BC6
/* AMainViewController.swift */
;
};
9642FA1D1C1B50E700022BC6
/* AMainViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9642FA1C1C1B50E700022BC6
/* AMainViewController.swift */
;
};
9642FA221C1B50E700022BC6
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9642FA211C1B50E700022BC6
/* Assets.xcassets */
;
};
9642FA221C1B50E700022BC6
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9642FA211C1B50E700022BC6
/* Assets.xcassets */
;
};
...
@@ -15,7 +17,22 @@
...
@@ -15,7 +17,22 @@
9642FA331C1B909700022BC6
/* SideViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9642FA321C1B909700022BC6
/* SideViewController.swift */
;
};
9642FA331C1B909700022BC6
/* SideViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9642FA321C1B909700022BC6
/* SideViewController.swift */
;
};
/* End PBXBuildFile section */
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9605900F1C388B8500691E88
/* Embed Frameworks */
=
{
isa
=
PBXCopyFilesBuildPhase
;
buildActionMask
=
2147483647
;
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
9605900E1C388B8500691E88
/* MaterialKit.framework in Embed Frameworks */
,
);
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
/* Begin PBXFileReference section */
9605900C1C388B8500691E88
/* MaterialKit.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
name
=
MaterialKit.framework
;
path
=
"/Users/danieldahan/Library/Developer/Xcode/DerivedData/MaterialKit-gdulktuccbcfwbdfadtpxkworhyc/Build/Products/Debug-iphoneos/MaterialKit.framework"
;
sourceTree
=
"<absolute>"
;
};
9642FA171C1B50E700022BC6
/* SideNavigationViewController.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
SideNavigationViewController.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
9642FA171C1B50E700022BC6
/* SideNavigationViewController.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
SideNavigationViewController.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
9642FA1A1C1B50E700022BC6
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
9642FA1A1C1B50E700022BC6
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
9642FA1C1C1B50E700022BC6
/* AMainViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AMainViewController.swift
;
sourceTree
=
"<group>"
;
};
9642FA1C1C1B50E700022BC6
/* AMainViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AMainViewController.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -31,6 +48,7 @@
...
@@ -31,6 +48,7 @@
isa
=
PBXFrameworksBuildPhase
;
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
9605900D1C388B8500691E88
/* MaterialKit.framework in Frameworks */
,
);
);
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
};
};
...
@@ -40,6 +58,7 @@
...
@@ -40,6 +58,7 @@
9642FA0E1C1B50E700022BC6
=
{
9642FA0E1C1B50E700022BC6
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
9605900C1C388B8500691E88
/* MaterialKit.framework */
,
9642FA191C1B50E700022BC6
/* SideNavigationViewController */
,
9642FA191C1B50E700022BC6
/* SideNavigationViewController */
,
9642FA181C1B50E700022BC6
/* Products */
,
9642FA181C1B50E700022BC6
/* Products */
,
);
);
...
@@ -77,6 +96,7 @@
...
@@ -77,6 +96,7 @@
9642FA131C1B50E700022BC6
/* Sources */
,
9642FA131C1B50E700022BC6
/* Sources */
,
9642FA141C1B50E700022BC6
/* Frameworks */
,
9642FA141C1B50E700022BC6
/* Frameworks */
,
9642FA151C1B50E700022BC6
/* Resources */
,
9642FA151C1B50E700022BC6
/* Resources */
,
9605900F1C388B8500691E88
/* Embed Frameworks */
,
);
);
buildRules
=
(
buildRules
=
(
);
);
...
...
Examples/Programmatic/SideNavigationViewController/SideNavigationViewController/AMainViewController.swift
View file @
d0b141df
...
@@ -20,11 +20,11 @@ import UIKit
...
@@ -20,11 +20,11 @@ import UIKit
import
MaterialKit
import
MaterialKit
class
AMainViewController
:
UIViewController
{
class
AMainViewController
:
UIViewController
{
lazy
var
enabledButton
:
RaisedButton
=
RaisedButton
()
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
prepareView
()
prepareView
()
// Examples of using SideNavigationViewController.
prepareSwapSideNavigationViewControllerExample
()
prepareSwapSideNavigationViewControllerExample
()
}
}
...
@@ -36,18 +36,32 @@ class AMainViewController: UIViewController {
...
@@ -36,18 +36,32 @@ class AMainViewController: UIViewController {
completion
:
nil
)
completion
:
nil
)
}
}
/**
internal
func
handleEnabledButton
()
{
:name: prepareView
if
true
==
sideNavigationViewController
?
.
enabled
{
:description: General preparation statements.
sideNavigationViewController
?
.
enabled
=
false
*/
enabledButton
.
setTitle
(
"Disabled"
,
forState
:
.
Normal
)
}
else
{
sideNavigationViewController
?
.
enabled
=
true
enabledButton
.
setTitle
(
"Enabled"
,
forState
:
.
Normal
)
}
}
private
func
prepareView
()
{
private
func
prepareView
()
{
view
.
backgroundColor
=
MaterialColor
.
blue
.
base
view
.
backgroundColor
=
MaterialColor
.
blue
.
base
prepareEnabledButton
()
}
private
func
prepareEnabledButton
()
{
enabledButton
.
setTitle
(
"Enabled"
,
forState
:
.
Normal
)
enabledButton
.
addTarget
(
self
,
action
:
"handleEnabledButton"
,
forControlEvents
:
.
TouchUpInside
)
// Add the enabledButton through MaterialLayout.
view
.
addSubview
(
enabledButton
)
enabledButton
.
translatesAutoresizingMaskIntoConstraints
=
false
MaterialLayout
.
alignFromTopRight
(
view
,
child
:
enabledButton
,
top
:
124
,
right
:
24
)
MaterialLayout
.
size
(
view
,
child
:
enabledButton
,
width
:
200
,
height
:
50
)
}
}
/**
:name: prepareGeneralSideNavigationViewControllerExample
:description: General usage example.
*/
private
func
prepareSwapSideNavigationViewControllerExample
()
{
private
func
prepareSwapSideNavigationViewControllerExample
()
{
let
button
:
FabButton
=
FabButton
()
let
button
:
FabButton
=
FabButton
()
button
.
addTarget
(
self
,
action
:
"handleSwapViewControllers"
,
forControlEvents
:
.
TouchUpInside
)
button
.
addTarget
(
self
,
action
:
"handleSwapViewControllers"
,
forControlEvents
:
.
TouchUpInside
)
...
...
MaterialKit.xcodeproj/project.pbxproj
View file @
d0b141df
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
objects
=
{
objects
=
{
/* Begin PBXBuildFile section */
/* Begin PBXBuildFile section */
9605900A1C388A8400691E88
/* File.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
960590091C388A8400691E88
/* File.swift */
;
};
9605900B1C388B0B00691E88
/* File.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
960590091C388A8400691E88
/* File.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
960B23271C383E5500E96216
/* MaterialKit+String.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
960B23261C383E5500E96216
/* MaterialKit+String.swift */
;
};
960B23271C383E5500E96216
/* MaterialKit+String.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
960B23261C383E5500E96216
/* MaterialKit+String.swift */
;
};
960B232E1C383EAA00E96216
/* MaterialKit+UIImage.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
960B23281C383EAA00E96216
/* MaterialKit+UIImage.swift */
;
};
960B232E1C383EAA00E96216
/* MaterialKit+UIImage.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
960B23281C383EAA00E96216
/* MaterialKit+UIImage.swift */
;
};
960B232F1C383EAA00E96216
/* MaterialKit+UIImage+Crop.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
960B23291C383EAA00E96216
/* MaterialKit+UIImage+Crop.swift */
;
};
960B232F1C383EAA00E96216
/* MaterialKit+UIImage+Crop.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
960B23291C383EAA00E96216
/* MaterialKit+UIImage+Crop.swift */
;
};
...
@@ -59,7 +61,6 @@
...
@@ -59,7 +61,6 @@
96D88C371C1328D800B91418
/* MaterialRadius.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0E1C1328D800B91418
/* MaterialRadius.swift */
;
};
96D88C371C1328D800B91418
/* MaterialRadius.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0E1C1328D800B91418
/* MaterialRadius.swift */
;
};
96D88C381C1328D800B91418
/* MaterialShape.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0F1C1328D800B91418
/* MaterialShape.swift */
;
};
96D88C381C1328D800B91418
/* MaterialShape.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0F1C1328D800B91418
/* MaterialShape.swift */
;
};
96D88C3A1C1328D800B91418
/* MaterialTextLayer.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C111C1328D800B91418
/* MaterialTextLayer.swift */
;
};
96D88C3A1C1328D800B91418
/* MaterialTextLayer.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C111C1328D800B91418
/* MaterialTextLayer.swift */
;
};
96D88C3B1C1328D800B91418
/* MaterialTheme.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C121C1328D800B91418
/* MaterialTheme.swift */
;
};
96D88C3C1C1328D800B91418
/* MaterialTransitionAnimation.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C131C1328D800B91418
/* MaterialTransitionAnimation.swift */
;
};
96D88C3C1C1328D800B91418
/* MaterialTransitionAnimation.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C131C1328D800B91418
/* MaterialTransitionAnimation.swift */
;
};
96D88C3D1C1328D800B91418
/* MaterialView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C141C1328D800B91418
/* MaterialView.swift */
;
};
96D88C3D1C1328D800B91418
/* MaterialView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C141C1328D800B91418
/* MaterialView.swift */
;
};
96D88C3E1C1328D800B91418
/* NavigationBarView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C151C1328D800B91418
/* NavigationBarView.swift */
;
};
96D88C3E1C1328D800B91418
/* NavigationBarView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C151C1328D800B91418
/* NavigationBarView.swift */
;
};
...
@@ -72,7 +73,6 @@
...
@@ -72,7 +73,6 @@
96D88C451C1328D800B91418
/* RobotoFont.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C1C1C1328D800B91418
/* RobotoFont.swift */
;
};
96D88C451C1328D800B91418
/* RobotoFont.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C1C1C1328D800B91418
/* RobotoFont.swift */
;
};
96D88C461C1328D800B91418
/* SideNavigationViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C1D1C1328D800B91418
/* SideNavigationViewController.swift */
;
};
96D88C461C1328D800B91418
/* SideNavigationViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C1D1C1328D800B91418
/* SideNavigationViewController.swift */
;
};
96D88C551C132ABF00B91418
/* MaterialKeyframeAnimation.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C081C1328D800B91418
/* MaterialKeyframeAnimation.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C551C132ABF00B91418
/* MaterialKeyframeAnimation.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C081C1328D800B91418
/* MaterialKeyframeAnimation.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C561C132ABF00B91418
/* MaterialTheme.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C121C1328D800B91418
/* MaterialTheme.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C571C132ABF00B91418
/* CardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88BF61C1328D800B91418
/* CardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C571C132ABF00B91418
/* CardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88BF61C1328D800B91418
/* CardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C581C132ABF00B91418
/* ImageCardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88BFB1C1328D800B91418
/* ImageCardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C581C132ABF00B91418
/* ImageCardView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88BFB1C1328D800B91418
/* ImageCardView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C5A1C132ABF00B91418
/* MaterialRadius.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0E1C1328D800B91418
/* MaterialRadius.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C5A1C132ABF00B91418
/* MaterialRadius.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C0E1C1328D800B91418
/* MaterialRadius.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
...
@@ -116,6 +116,7 @@
...
@@ -116,6 +116,7 @@
/* End PBXContainerItemProxy section */
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
/* Begin PBXFileReference section */
960590091C388A8400691E88
/* File.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
File.swift
;
sourceTree
=
"<group>"
;
};
960B23261C383E5500E96216
/* MaterialKit+String.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"MaterialKit+String.swift"
;
sourceTree
=
"<group>"
;
};
960B23261C383E5500E96216
/* MaterialKit+String.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"MaterialKit+String.swift"
;
sourceTree
=
"<group>"
;
};
960B23281C383EAA00E96216
/* MaterialKit+UIImage.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"MaterialKit+UIImage.swift"
;
sourceTree
=
"<group>"
;
};
960B23281C383EAA00E96216
/* MaterialKit+UIImage.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"MaterialKit+UIImage.swift"
;
sourceTree
=
"<group>"
;
};
960B23291C383EAA00E96216
/* MaterialKit+UIImage+Crop.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"MaterialKit+UIImage+Crop.swift"
;
sourceTree
=
"<group>"
;
};
960B23291C383EAA00E96216
/* MaterialKit+UIImage+Crop.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"MaterialKit+UIImage+Crop.swift"
;
sourceTree
=
"<group>"
;
};
...
@@ -160,7 +161,6 @@
...
@@ -160,7 +161,6 @@
96D88C0E1C1328D800B91418
/* MaterialRadius.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialRadius.swift
;
sourceTree
=
"<group>"
;
};
96D88C0E1C1328D800B91418
/* MaterialRadius.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialRadius.swift
;
sourceTree
=
"<group>"
;
};
96D88C0F1C1328D800B91418
/* MaterialShape.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialShape.swift
;
sourceTree
=
"<group>"
;
};
96D88C0F1C1328D800B91418
/* MaterialShape.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialShape.swift
;
sourceTree
=
"<group>"
;
};
96D88C111C1328D800B91418
/* MaterialTextLayer.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTextLayer.swift
;
sourceTree
=
"<group>"
;
};
96D88C111C1328D800B91418
/* MaterialTextLayer.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTextLayer.swift
;
sourceTree
=
"<group>"
;
};
96D88C121C1328D800B91418
/* MaterialTheme.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTheme.swift
;
sourceTree
=
"<group>"
;
};
96D88C131C1328D800B91418
/* MaterialTransitionAnimation.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTransitionAnimation.swift
;
sourceTree
=
"<group>"
;
};
96D88C131C1328D800B91418
/* MaterialTransitionAnimation.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialTransitionAnimation.swift
;
sourceTree
=
"<group>"
;
};
96D88C141C1328D800B91418
/* MaterialView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialView.swift
;
sourceTree
=
"<group>"
;
};
96D88C141C1328D800B91418
/* MaterialView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
MaterialView.swift
;
sourceTree
=
"<group>"
;
};
96D88C151C1328D800B91418
/* NavigationBarView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
NavigationBarView.swift
;
sourceTree
=
"<group>"
;
};
96D88C151C1328D800B91418
/* NavigationBarView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
NavigationBarView.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -193,6 +193,14 @@
...
@@ -193,6 +193,14 @@
/* End PBXFrameworksBuildPhase section */
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
/* Begin PBXGroup section */
960590081C388A6F00691E88
/* File */
=
{
isa
=
PBXGroup
;
children
=
(
960590091C388A8400691E88
/* File.swift */
,
);
name
=
File
;
sourceTree
=
"<group>"
;
};
9638322C1B88DFD80015F710
=
{
9638322C1B88DFD80015F710
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -253,7 +261,6 @@
...
@@ -253,7 +261,6 @@
96D88C4F1C132A1400B91418
/* Layer */
,
96D88C4F1C132A1400B91418
/* Layer */
,
96D88C4E1C1329CD00B91418
/* Button */
,
96D88C4E1C1329CD00B91418
/* Button */
,
96D88C4D1C1329BB00B91418
/* Animation */
,
96D88C4D1C1329BB00B91418
/* Animation */
,
96D88C4C1C1329AC00B91418
/* Theme */
,
96D88C4B1C13296500B91418
/* Card */
,
96D88C4B1C13296500B91418
/* Card */
,
96DB1C751C14C11B00825BE6
/* Color */
,
96DB1C751C14C11B00825BE6
/* Color */
,
96D88C4A1C13294200B91418
/* Type */
,
96D88C4A1C13294200B91418
/* Type */
,
...
@@ -261,6 +268,7 @@
...
@@ -261,6 +268,7 @@
96D88C471C1328F500B91418
/* Font */
,
96D88C471C1328F500B91418
/* Font */
,
966F57B61C226D65009185B7
/* Text */
,
966F57B61C226D65009185B7
/* Text */
,
96442ADC1C28EF1400C3C574
/* TableView */
,
96442ADC1C28EF1400C3C574
/* TableView */
,
960590081C388A6F00691E88
/* File */
,
);
);
path
=
Sources
;
path
=
Sources
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -319,14 +327,6 @@
...
@@ -319,14 +327,6 @@
name
=
Card
;
name
=
Card
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
96D88C4C1C1329AC00B91418
/* Theme */
=
{
isa
=
PBXGroup
;
children
=
(
96D88C121C1328D800B91418
/* MaterialTheme.swift */
,
);
name
=
Theme
;
sourceTree
=
"<group>"
;
};
96D88C4D1C1329BB00B91418
/* Animation */
=
{
96D88C4D1C1329BB00B91418
/* Animation */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -439,7 +439,6 @@
...
@@ -439,7 +439,6 @@
96D88C731C132ACC00B91418
/* MaterialAnimation.swift in Headers */
,
96D88C731C132ACC00B91418
/* MaterialAnimation.swift in Headers */
,
96D88C741C132ACC00B91418
/* MaterialBasicAnimation.swift in Headers */
,
96D88C741C132ACC00B91418
/* MaterialBasicAnimation.swift in Headers */
,
96D88C551C132ABF00B91418
/* MaterialKeyframeAnimation.swift in Headers */
,
96D88C551C132ABF00B91418
/* MaterialKeyframeAnimation.swift in Headers */
,
96D88C561C132ABF00B91418
/* MaterialTheme.swift in Headers */
,
96D88C571C132ABF00B91418
/* CardView.swift in Headers */
,
96D88C571C132ABF00B91418
/* CardView.swift in Headers */
,
96D88C581C132ABF00B91418
/* ImageCardView.swift in Headers */
,
96D88C581C132ABF00B91418
/* ImageCardView.swift in Headers */
,
96D88C5A1C132ABF00B91418
/* MaterialRadius.swift in Headers */
,
96D88C5A1C132ABF00B91418
/* MaterialRadius.swift in Headers */
,
...
@@ -467,6 +466,7 @@
...
@@ -467,6 +466,7 @@
960B23501C38490D00E96216
/* Text.swift in Headers */
,
960B23501C38490D00E96216
/* Text.swift in Headers */
,
960B23511C38490D00E96216
/* TextStorage.swift in Headers */
,
960B23511C38490D00E96216
/* TextStorage.swift in Headers */
,
960B23521C38490D00E96216
/* TextView.swift in Headers */
,
960B23521C38490D00E96216
/* TextView.swift in Headers */
,
9605900B1C388B0B00691E88
/* File.swift in Headers */
,
);
);
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
};
};
...
@@ -522,6 +522,7 @@
...
@@ -522,6 +522,7 @@
TargetAttributes
=
{
TargetAttributes
=
{
963832351B88DFD80015F710
=
{
963832351B88DFD80015F710
=
{
CreatedOnToolsVersion
=
6.4
;
CreatedOnToolsVersion
=
6.4
;
DevelopmentTeam
=
6R427Q9MFC
;
};
};
963832401B88DFD80015F710
=
{
963832401B88DFD80015F710
=
{
CreatedOnToolsVersion
=
6.4
;
CreatedOnToolsVersion
=
6.4
;
...
@@ -598,6 +599,7 @@
...
@@ -598,6 +599,7 @@
96D88C3C1C1328D800B91418
/* MaterialTransitionAnimation.swift in Sources */
,
96D88C3C1C1328D800B91418
/* MaterialTransitionAnimation.swift in Sources */
,
96D88C361C1328D800B91418
/* MaterialPulseView.swift in Sources */
,
96D88C361C1328D800B91418
/* MaterialPulseView.swift in Sources */
,
960B23301C383EAA00E96216
/* MaterialKit+UIImage+Network.swift in Sources */
,
960B23301C383EAA00E96216
/* MaterialKit+UIImage+Network.swift in Sources */
,
9605900A1C388A8400691E88
/* File.swift in Sources */
,
96D88C1E1C1328D800B91418
/* CaptureView.swift in Sources */
,
96D88C1E1C1328D800B91418
/* CaptureView.swift in Sources */
,
96D88C2D1C1328D800B91418
/* MaterialDepth.swift in Sources */
,
96D88C2D1C1328D800B91418
/* MaterialDepth.swift in Sources */
,
96D88C331C1328D800B91418
/* MaterialLabel.swift in Sources */
,
96D88C331C1328D800B91418
/* MaterialLabel.swift in Sources */
,
...
@@ -613,7 +615,6 @@
...
@@ -613,7 +615,6 @@
960B23471C38480E00E96216
/* TextStorage.swift in Sources */
,
960B23471C38480E00E96216
/* TextStorage.swift in Sources */
,
96D88C341C1328D800B91418
/* MaterialLayer.swift in Sources */
,
96D88C341C1328D800B91418
/* MaterialLayer.swift in Sources */
,
96D88C461C1328D800B91418
/* SideNavigationViewController.swift in Sources */
,
96D88C461C1328D800B91418
/* SideNavigationViewController.swift in Sources */
,
96D88C3B1C1328D800B91418
/* MaterialTheme.swift in Sources */
,
96D88C381C1328D800B91418
/* MaterialShape.swift in Sources */
,
96D88C381C1328D800B91418
/* MaterialShape.swift in Sources */
,
960B23331C383EAA00E96216
/* MaterialKit+UIImage+Size.swift in Sources */
,
960B23331C383EAA00E96216
/* MaterialKit+UIImage+Size.swift in Sources */
,
96D88C271C1328D800B91418
/* MaterialKit+UIFont.swift in Sources */
,
96D88C271C1328D800B91418
/* MaterialKit+UIFont.swift in Sources */
,
...
@@ -736,6 +737,7 @@
...
@@ -736,6 +737,7 @@
buildSettings
=
{
buildSettings
=
{
CLANG_ENABLE_MODULES
=
YES
;
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
DEFINES_MODULE
=
YES
;
DEFINES_MODULE
=
YES
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_CURRENT_VERSION
=
1
;
DYLIB_CURRENT_VERSION
=
1
;
...
@@ -746,6 +748,7 @@
...
@@ -746,6 +748,7 @@
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.MaterialKit
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.MaterialKit
;
PRODUCT_NAME
=
MaterialKit
;
PRODUCT_NAME
=
MaterialKit
;
PROVISIONING_PROFILE
=
""
;
SKIP_INSTALL
=
YES
;
SKIP_INSTALL
=
YES
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
};
};
...
@@ -756,6 +759,7 @@
...
@@ -756,6 +759,7 @@
buildSettings
=
{
buildSettings
=
{
CLANG_ENABLE_MODULES
=
YES
;
CLANG_ENABLE_MODULES
=
YES
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
DEFINES_MODULE
=
YES
;
DEFINES_MODULE
=
YES
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_COMPATIBILITY_VERSION
=
1
;
DYLIB_CURRENT_VERSION
=
1
;
DYLIB_CURRENT_VERSION
=
1
;
...
@@ -766,6 +770,7 @@
...
@@ -766,6 +770,7 @@
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.MaterialKit
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.MaterialKit
;
PRODUCT_NAME
=
MaterialKit
;
PRODUCT_NAME
=
MaterialKit
;
PROVISIONING_PROFILE
=
""
;
SKIP_INSTALL
=
YES
;
SKIP_INSTALL
=
YES
;
};
};
name
=
Release
;
name
=
Release
;
...
...
Sources/CaptureView.swift
View file @
d0b141df
...
@@ -182,7 +182,7 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
...
@@ -182,7 +182,7 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
/**
/**
:name: contentInsetsRef
:name: contentInsetsRef
*/
*/
public
var
contentInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
captureView
.
contentInsetsRef
{
public
var
contentInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
Square4
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -308,19 +308,7 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
...
@@ -308,19 +308,7 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
*/
*/
public
override
func
prepareView
()
{
public
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
userInteractionEnabled
=
MaterialTheme
.
captureView
.
userInteractionEnabled
backgroundColor
=
MaterialColor
.
black
backgroundColor
=
MaterialTheme
.
captureView
.
backgroundColor
contentsRect
=
MaterialTheme
.
captureView
.
contentsRect
contentsCenter
=
MaterialTheme
.
captureView
.
contentsCenter
contentsScale
=
MaterialTheme
.
captureView
.
contentsScale
contentsGravity
=
MaterialTheme
.
captureView
.
contentsGravity
depth
=
MaterialTheme
.
captureView
.
depth
shadowColor
=
MaterialTheme
.
captureView
.
shadowColor
zPosition
=
MaterialTheme
.
captureView
.
zPosition
borderWidth
=
MaterialTheme
.
captureView
.
borderWidth
borderColor
=
MaterialTheme
.
captureView
.
bordercolor
preparePreviewView
()
preparePreviewView
()
}
}
...
...
Sources/CardView.swift
View file @
d0b141df
...
@@ -36,7 +36,7 @@ public class CardView : MaterialPulseView {
...
@@ -36,7 +36,7 @@ public class CardView : MaterialPulseView {
/**
/**
:name: divider
:name: divider
*/
*/
public
var
divider
:
Bool
=
MaterialTheme
.
basicCardView
.
divider
{
public
var
divider
:
Bool
=
true
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -54,7 +54,7 @@ public class CardView : MaterialPulseView {
...
@@ -54,7 +54,7 @@ public class CardView : MaterialPulseView {
/**
/**
:name: dividerInsetsRef
:name: dividerInsetsRef
*/
*/
public
var
dividerInsetsRef
:
UIEdgeInsets
=
MaterialTheme
.
basicCardView
.
dividerInsetsRef
{
public
var
dividerInsetsRef
:
UIEdgeInsets
=
UIEdgeInsets
(
top
:
8
,
left
:
0
,
bottom
:
8
,
right
:
0
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -72,7 +72,7 @@ public class CardView : MaterialPulseView {
...
@@ -72,7 +72,7 @@ public class CardView : MaterialPulseView {
/**
/**
:name: contentInsetsRef
:name: contentInsetsRef
*/
*/
public
var
contentInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
basicCardView
.
contentInsetsRef
{
public
var
contentInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
Square2
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -90,7 +90,7 @@ public class CardView : MaterialPulseView {
...
@@ -90,7 +90,7 @@ public class CardView : MaterialPulseView {
/**
/**
:name: titleLabelInsetsRef
:name: titleLabelInsetsRef
*/
*/
public
var
titleLabelInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
basicCardView
.
titleLabelInsetsRef
{
public
var
titleLabelInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
Square2
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -118,7 +118,7 @@ public class CardView : MaterialPulseView {
...
@@ -118,7 +118,7 @@ public class CardView : MaterialPulseView {
/**
/**
:name: detailLabelInsetsRef
:name: detailLabelInsetsRef
*/
*/
public
var
detailLabelInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
basicCardView
.
detailLabelInsetsRef
{
public
var
detailLabelInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
Square2
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -146,7 +146,7 @@ public class CardView : MaterialPulseView {
...
@@ -146,7 +146,7 @@ public class CardView : MaterialPulseView {
/**
/**
:name: leftButtonsInsetsRef
:name: leftButtonsInsetsRef
*/
*/
public
var
leftButtonsInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
basicCardView
.
leftButtonsInsetsRef
{
public
var
leftButtonsInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
None
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -178,7 +178,7 @@ public class CardView : MaterialPulseView {
...
@@ -178,7 +178,7 @@ public class CardView : MaterialPulseView {
/**
/**
:name: rightButtonsInsetsRef
:name: rightButtonsInsetsRef
*/
*/
public
var
rightButtonsInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
basicCardView
.
rightButtonsInsetsRef
{
public
var
rightButtonsInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
None
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -394,20 +394,9 @@ public class CardView : MaterialPulseView {
...
@@ -394,20 +394,9 @@ public class CardView : MaterialPulseView {
*/
*/
public
override
func
prepareView
()
{
public
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
userInteractionEnabled
=
MaterialTheme
.
basicCardView
.
userInteractionEnabled
pulseColor
=
MaterialColor
.
blueGrey
.
lighten4
backgroundColor
=
MaterialTheme
.
basicCardView
.
backgroundColor
depth
=
.
Depth2
pulseColor
=
MaterialTheme
.
basicCardView
.
pulseColor
dividerColor
=
MaterialColor
.
blueGrey
.
lighten5
contentsRect
=
MaterialTheme
.
basicCardView
.
contentsRect
contentsCenter
=
MaterialTheme
.
basicCardView
.
contentsCenter
contentsScale
=
MaterialTheme
.
basicCardView
.
contentsScale
contentsGravity
=
MaterialTheme
.
basicCardView
.
contentsGravity
depth
=
MaterialTheme
.
basicCardView
.
depth
shadowColor
=
MaterialTheme
.
basicCardView
.
shadowColor
zPosition
=
MaterialTheme
.
basicCardView
.
zPosition
borderWidth
=
MaterialTheme
.
basicCardView
.
borderWidth
borderColor
=
MaterialTheme
.
basicCardView
.
bordercolor
dividerColor
=
MaterialTheme
.
basicCardView
.
dividerColor
}
}
/**
/**
...
...
Sources/File.swift
0 → 100644
View file @
d0b141df
//
// Copyright (C) 2015 - 2016 CosmicMind, Inc. <http://cosmicmind.io>. All rights reserved.
//
// 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
Foundation
/**
:name: VideoExtension
*/
public
enum
VideoExtension
{
case
MOV
case
M4V
case
MP4
}
/**
:name: VideoExtensionToString
*/
public
func
VideoExtensionToString
(
type
:
VideoExtension
)
->
String
{
switch
type
{
case
.
MOV
:
return
"mov"
case
.
M4V
:
return
"m4v"
case
.
MP4
:
return
"mp4"
}
}
/**
:name: ImageExtensionToString
*/
public
enum
ImageExtension
{
case
PNG
case
JPG
case
JPEG
case
TIFF
case
GIF
}
/**
:name: ImageExtensionToString
*/
public
func
ImageExtensionToString
(
type
:
ImageExtension
)
->
String
{
switch
type
{
case
.
PNG
:
return
"png"
case
.
JPG
:
return
"jpg"
case
.
JPEG
:
return
"jpeg"
case
.
TIFF
:
return
"tiff"
case
.
GIF
:
return
"gif"
}
}
/**
:name: TextExtension
*/
public
enum
TextExtension
{
case
TXT
case
RTF
case
HTML
}
/**
:name: TextExtensionToString
*/
public
func
TextExtensionToString
(
type
:
TextExtension
)
->
String
{
switch
type
{
case
.
TXT
:
return
"txt"
case
.
RTF
:
return
"rtf"
case
.
HTML
:
return
"html"
}
}
public
enum
SQLiteExtension
{
case
SQLite
case
SQLiteSHM
}
/**
:name: SQLiteExtensionToString
*/
public
func
SQLiteExtensionToString
(
type
:
SQLiteExtension
)
->
String
{
switch
type
{
case
.
SQLite
:
return
"sqlite"
case
.
SQLiteSHM
:
return
"sqlite-shm"
}
}
/**
:name: Schemas used with Persistant Storage
*/
public
struct
Schema
{
public
static
let
File
:
String
=
"File://"
}
/**
:name: Result enum
*/
public
enum
Result
{
case
Success
case
Failure
(
error
:
NSError
)
}
/**
:name: FileType enum
*/
public
enum
FileType
{
case
Directory
case
Image
case
Video
case
Text
case
SQLite
case
Unknown
}
public
struct
File
{
/**
:name: documentDirectoryPath
*/
public
static
let
documentDirectoryPath
:
NSURL
?
=
File
.
pathForDirectory
(
.
DocumentDirectory
)
/**
:name: libraryDirectoryPath
*/
public
static
let
libraryDirectoryPath
:
NSURL
?
=
File
.
pathForDirectory
(
.
LibraryDirectory
)
/**
:name: applicationDirectoryPath
*/
public
static
let
applicationSupportDirectoryPath
:
NSURL
?
=
File
.
pathForDirectory
(
.
ApplicationSupportDirectory
)
/**
:name: cachesDirectoryPath
*/
public
static
let
cachesDirectoryPath
:
NSURL
?
=
File
.
pathForDirectory
(
.
CachesDirectory
)
/**
:name: rootPath
*/
public
static
var
rootPath
:
NSURL
?
{
let
path
:
NSURL
?
=
File
.
documentDirectoryPath
var
pathComponents
=
path
?
.
pathComponents
pathComponents
?
.
removeLast
()
return
NSURL
(
string
:
Schema
.
File
.
stringByAppendingString
((
pathComponents
?
.
joinWithSeparator
(
"/"
))
!
))
}
/**
:name: fileExistsAtPath
*/
public
static
func
fileExistsAtPath
(
url
:
NSURL
)
->
Bool
{
return
NSFileManager
.
defaultManager
()
.
fileExistsAtPath
(
url
.
path
!
)
}
/**
:name: contentsEqualAtPath
*/
public
static
func
contentsEqualAtPath
(
path
:
NSURL
,
andPath
:
NSURL
)
->
Bool
{
return
NSFileManager
.
defaultManager
()
.
contentsEqualAtPath
(
path
.
path
!
,
andPath
:
andPath
.
path
!
)
}
/**
:name: isWritableFileAtPath
*/
public
static
func
isWritableFileAtPath
(
url
:
NSURL
)
->
Bool
{
return
NSFileManager
.
defaultManager
()
.
isWritableFileAtPath
(
url
.
path
!
)
}
/**
:name: removeItemAtPath
*/
public
static
func
removeItemAtPath
(
path
:
NSURL
,
completion
:
((
removed
:
Bool
?,
error
:
NSError
?)
->
Void
))
{
do
{
try
NSFileManager
.
defaultManager
()
.
removeItemAtPath
(
path
.
path
!
)
completion
(
removed
:
true
,
error
:
nil
)
}
catch
let
error
as
NSError
{
completion
(
removed
:
nil
,
error
:
error
)
}
}
/**
:name: createDirectory
*/
public
static
func
createDirectory
(
path
:
NSURL
,
name
:
String
,
withIntermediateDirectories
createIntermediates
:
Bool
,
attributes
:
[
String
:
AnyObject
]?,
completion
:
((
created
:
Bool
?,
error
:
NSError
?)
->
Void
)){
do
{
let
newPath
=
path
.
URLByAppendingPathComponent
(
name
)
try
NSFileManager
.
defaultManager
()
.
createDirectoryAtPath
(
newPath
.
path
!
,
withIntermediateDirectories
:
createIntermediates
,
attributes
:
attributes
)
completion
(
created
:
true
,
error
:
nil
)
}
catch
let
error
as
NSError
{
completion
(
created
:
nil
,
error
:
error
)
}
}
/**
:name: removeDirectory
*/
public
static
func
removeDirectory
(
path
:
NSURL
,
completion
:
((
removed
:
Bool
?,
error
:
NSError
?)
->
Void
))
{
do
{
try
NSFileManager
.
defaultManager
()
.
removeItemAtURL
(
path
)
completion
(
removed
:
true
,
error
:
nil
)
}
catch
let
error
as
NSError
{
completion
(
removed
:
false
,
error
:
error
)
}
}
/**
:name: contentsOfDirectory
*/
public
static
func
contentsOfDirectory
(
path
:
NSURL
,
shouldSkipHiddenFiles
skip
:
Bool
=
false
,
completion
:
((
contents
:
[
NSURL
]?,
error
:
NSError
?)
->
Void
))
{
do
{
let
contents
=
try
NSFileManager
.
defaultManager
()
.
contentsOfDirectoryAtURL
(
path
,
includingPropertiesForKeys
:
nil
,
options
:
skip
==
true
?
NSDirectoryEnumerationOptions
.
SkipsHiddenFiles
:
NSDirectoryEnumerationOptions
(
rawValue
:
0
))
completion
(
contents
:
contents
,
error
:
nil
)
}
catch
let
error
as
NSError
{
return
completion
(
contents
:
nil
,
error
:
error
)
}
}
/**
:name: writeTo
*/
public
static
func
writeTo
(
path
:
NSURL
,
value
:
String
,
name
:
String
,
completion
:
((
write
:
Bool
?,
error
:
NSError
?)
->
Void
))
{
do
{
try
value
.
writeToURL
(
path
.
URLByAppendingPathComponent
(
"/
\(
name
)
"
),
atomically
:
true
,
encoding
:
NSUTF8StringEncoding
)
completion
(
write
:
true
,
error
:
nil
)
}
catch
let
error
as
NSError
{
completion
(
write
:
false
,
error
:
error
)
}
}
/**
:name: readFrom
*/
public
static
func
readFrom
(
path
:
NSURL
,
completion
:
((
string
:
String
?,
error
:
NSError
?)
->
Void
))
{
let
data
:
NSData
?
=
NSData
(
contentsOfURL
:
path
)
if
let
fileData
=
data
{
let
content
=
String
(
data
:
fileData
,
encoding
:
NSUTF8StringEncoding
)
completion
(
string
:
content
,
error
:
nil
)
return
}
completion
(
string
:
nil
,
error
:
NSError
(
domain
:
"com.contentkit.fileReadError"
,
code
:
0
,
userInfo
:
nil
))
}
/**
:name: url
*/
public
static
func
url
(
searchPathDirectory
:
NSSearchPathDirectory
,
path
:
String
)
->
NSURL
?
{
var
url
:
NSURL
?
switch
searchPathDirectory
{
case
.
DocumentDirectory
:
url
=
File
.
documentDirectoryPath
case
.
LibraryDirectory
:
url
=
File
.
libraryDirectoryPath
case
.
CachesDirectory
:
url
=
File
.
cachesDirectoryPath
case
.
ApplicationSupportDirectory
:
url
=
File
.
applicationSupportDirectoryPath
default
:
url
=
nil
break
}
return
url
?
.
URLByAppendingPathComponent
(
path
)
}
/**
:name: pathForDirectory
*/
public
static
func
pathForDirectory
(
searchPath
:
NSSearchPathDirectory
)
->
NSURL
?
{
return
try
?
NSFileManager
.
defaultManager
()
.
URLForDirectory
(
searchPath
,
inDomain
:
.
UserDomainMask
,
appropriateForURL
:
nil
,
create
:
true
)
}
/**
:name: fileType
*/
public
static
func
fileType
(
url
:
NSURL
)
->
FileType
{
var
isDir
:
Bool
=
false
File
.
contentsOfDirectory
(
url
)
{
(
contents
,
error
)
->
Void
in
if
nil
==
error
{
return
isDir
=
true
}
}
if
isDir
{
return
.
Directory
}
if
let
v
:
String
=
url
.
pathExtension
{
switch
v
{
case
ImageExtensionToString
(
.
PNG
),
ImageExtensionToString
(
.
JPG
),
ImageExtensionToString
(
.
JPEG
),
ImageExtensionToString
(
.
GIF
):
return
.
Image
case
TextExtensionToString
(
.
TXT
),
TextExtensionToString
(
.
RTF
),
TextExtensionToString
(
.
HTML
):
return
.
Text
case
VideoExtensionToString
(
.
MOV
),
VideoExtensionToString
(
.
M4V
),
VideoExtensionToString
(
.
MP4
):
return
.
Video
case
SQLiteExtensionToString
(
.
SQLite
),
SQLiteExtensionToString
(
.
SQLiteSHM
):
return
.
SQLite
default
:
break
}
}
return
.
Unknown
}
}
\ No newline at end of file
Sources/ImageCardView.swift
View file @
d0b141df
...
@@ -36,7 +36,7 @@ public class ImageCardView : MaterialPulseView {
...
@@ -36,7 +36,7 @@ public class ImageCardView : MaterialPulseView {
/**
/**
:name: divider
:name: divider
*/
*/
public
var
divider
:
Bool
=
MaterialTheme
.
imageCardView
.
divider
{
public
var
divider
:
Bool
=
true
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -54,7 +54,7 @@ public class ImageCardView : MaterialPulseView {
...
@@ -54,7 +54,7 @@ public class ImageCardView : MaterialPulseView {
/**
/**
:name: dividerInsetsRef
:name: dividerInsetsRef
*/
*/
public
var
dividerInsetsRef
:
UIEdgeInsets
=
MaterialTheme
.
imageCardView
.
dividerInsetsRef
{
public
var
dividerInsetsRef
:
UIEdgeInsets
=
UIEdgeInsets
(
top
:
8
,
left
:
0
,
bottom
:
8
,
right
:
0
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -162,7 +162,7 @@ public class ImageCardView : MaterialPulseView {
...
@@ -162,7 +162,7 @@ public class ImageCardView : MaterialPulseView {
/**
/**
:name: contentInsetsRef
:name: contentInsetsRef
*/
*/
public
var
contentInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
imageCardView
.
contentInsetsRef
{
public
var
contentInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
Square2
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -180,7 +180,7 @@ public class ImageCardView : MaterialPulseView {
...
@@ -180,7 +180,7 @@ public class ImageCardView : MaterialPulseView {
/**
/**
:name: titleLabelInsetsRef
:name: titleLabelInsetsRef
*/
*/
public
var
titleLabelInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
imageCardView
.
titleLabelInsetsRef
{
public
var
titleLabelInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
Square2
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -208,7 +208,7 @@ public class ImageCardView : MaterialPulseView {
...
@@ -208,7 +208,7 @@ public class ImageCardView : MaterialPulseView {
/**
/**
:name: detailLabelInsetsRef
:name: detailLabelInsetsRef
*/
*/
public
var
detailLabelInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
imageCardView
.
detailLabelInsetsRef
{
public
var
detailLabelInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
Square2
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -236,7 +236,7 @@ public class ImageCardView : MaterialPulseView {
...
@@ -236,7 +236,7 @@ public class ImageCardView : MaterialPulseView {
/**
/**
:name: leftButtonsInsetsRef
:name: leftButtonsInsetsRef
*/
*/
public
var
leftButtonsInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
imageCardView
.
leftButtonsInsetsRef
{
public
var
leftButtonsInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
None
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -268,7 +268,7 @@ public class ImageCardView : MaterialPulseView {
...
@@ -268,7 +268,7 @@ public class ImageCardView : MaterialPulseView {
/**
/**
:name: rightButtonsInsetsRef
:name: rightButtonsInsetsRef
*/
*/
public
var
rightButtonsInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
imageCardView
.
rightButtonsInsetsRef
{
public
var
rightButtonsInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
None
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -531,20 +531,9 @@ public class ImageCardView : MaterialPulseView {
...
@@ -531,20 +531,9 @@ public class ImageCardView : MaterialPulseView {
*/
*/
public
override
func
prepareView
()
{
public
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
userInteractionEnabled
=
MaterialTheme
.
imageCardView
.
userInteractionEnabled
pulseColor
=
MaterialColor
.
blueGrey
.
lighten4
backgroundColor
=
MaterialTheme
.
imageCardView
.
backgroundColor
depth
=
.
Depth2
pulseColor
=
MaterialTheme
.
imageCardView
.
pulseColor
dividerColor
=
MaterialColor
.
blueGrey
.
lighten5
contentsRect
=
MaterialTheme
.
imageCardView
.
contentsRect
contentsCenter
=
MaterialTheme
.
imageCardView
.
contentsCenter
contentsScale
=
MaterialTheme
.
imageCardView
.
contentsScale
contentsGravity
=
MaterialTheme
.
imageCardView
.
contentsGravity
depth
=
MaterialTheme
.
imageCardView
.
depth
shadowColor
=
MaterialTheme
.
imageCardView
.
shadowColor
zPosition
=
MaterialTheme
.
imageCardView
.
zPosition
borderWidth
=
MaterialTheme
.
imageCardView
.
borderWidth
borderColor
=
MaterialTheme
.
imageCardView
.
bordercolor
dividerColor
=
MaterialTheme
.
imageCardView
.
dividerColor
}
}
/**
/**
...
...
Sources/MaterialLabel.swift
View file @
d0b141df
...
@@ -72,18 +72,18 @@ public class MaterialLabel : UILabel {
...
@@ -72,18 +72,18 @@ public class MaterialLabel : UILabel {
/**
/**
:name: wrapped
:name: wrapped
*/
*/
public
var
wrapped
:
Bool
!
{
public
var
wrapped
:
Bool
{
didSet
{
didSet
{
textLayer
.
wrapped
=
nil
==
wrapped
?
MaterialTheme
.
label
.
wrapped
:
wrapped
!
textLayer
.
wrapped
=
wrapped
}
}
}
}
/**
/**
:name: contentsScale
:name: contentsScale
*/
*/
public
var
contentsScale
:
CGFloat
!
{
public
var
contentsScale
:
CGFloat
{
didSet
{
didSet
{
textLayer
.
contentsScale
=
nil
==
contentsScale
?
MaterialTheme
.
label
.
contentsScale
:
contentsScale
!
textLayer
.
contentsScale
=
contentsScale
}
}
}
}
...
@@ -100,6 +100,8 @@ public class MaterialLabel : UILabel {
...
@@ -100,6 +100,8 @@ public class MaterialLabel : UILabel {
:name: init
:name: init
*/
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
wrapped
=
true
contentsScale
=
UIScreen
.
mainScreen
()
.
scale
super
.
init
(
coder
:
aDecoder
)
super
.
init
(
coder
:
aDecoder
)
}
}
...
@@ -107,6 +109,8 @@ public class MaterialLabel : UILabel {
...
@@ -107,6 +109,8 @@ public class MaterialLabel : UILabel {
:name: init
:name: init
*/
*/
public
override
init
(
frame
:
CGRect
)
{
public
override
init
(
frame
:
CGRect
)
{
wrapped
=
true
contentsScale
=
UIScreen
.
mainScreen
()
.
scale
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
prepareView
()
prepareView
()
}
}
...
@@ -130,9 +134,6 @@ public class MaterialLabel : UILabel {
...
@@ -130,9 +134,6 @@ public class MaterialLabel : UILabel {
:name: prepareView
:name: prepareView
*/
*/
public
func
prepareView
()
{
public
func
prepareView
()
{
textAlignment
=
MaterialTheme
.
label
.
textAlignment
textAlignment
=
.
Left
wrapped
=
MaterialTheme
.
label
.
wrapped
contentsScale
=
MaterialTheme
.
label
.
contentsScale
font
=
MaterialTheme
.
label
.
font
}
}
}
}
\ No newline at end of file
Sources/MaterialTextLayer.swift
View file @
d0b141df
...
@@ -196,11 +196,10 @@ public class MaterialTextLayer : CATextLayer {
...
@@ -196,11 +196,10 @@ public class MaterialTextLayer : CATextLayer {
:name: prepareLayer
:name: prepareLayer
*/
*/
internal
func
prepareLayer
()
{
internal
func
prepareLayer
()
{
textColor
=
MaterialTheme
.
textLayer
.
textColor
textColor
=
MaterialColor
.
black
textAlignment
=
MaterialTheme
.
textLayer
.
textAlignment
textAlignment
=
.
Left
wrapped
=
MaterialTheme
.
textLayer
.
wrapped
wrapped
=
true
contentsScale
=
MaterialTheme
.
textLayer
.
contentsScale
contentsScale
=
UIScreen
.
mainScreen
()
.
scale
font
=
MaterialTheme
.
textLayer
.
font
lineBreakMode
=
.
ByWordWrapping
lineBreakMode
=
MaterialTheme
.
textLayer
.
lineBreakMode
}
}
}
}
Sources/MaterialTheme.swift
deleted
100644 → 0
View file @
f65afdde
//
// Copyright (C) 2015 - 2016 CosmicMind, Inc. <http://cosmicmind.io>. All rights reserved.
//
// 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
struct
MaterialTheme
{
public
struct
basicCardView
{}
public
struct
imageCardView
{}
public
struct
navigationBarView
{}
public
struct
captureView
{}
public
struct
textLayer
{}
public
struct
label
{}
}
// basicCardView
public
extension
MaterialTheme
.
basicCardView
{
// shadow
public
static
var
depth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
public
static
var
contentInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
Square2
)
public
static
var
titleLabelInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
Square2
)
public
static
var
detailLabelInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
Square2
)
public
static
var
leftButtonsInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
None
)
public
static
var
rightButtonsInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
None
)
public
static
var
dividerInsetsRef
:
UIEdgeInsets
=
UIEdgeInsets
(
top
:
8
,
left
:
0
,
bottom
:
8
,
right
:
0
)
// border
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
bordercolor
:
UIColor
=
MaterialColor
.
black
// color
public
static
var
backgroundColor
:
UIColor
=
MaterialColor
.
white
public
static
var
pulseColor
:
UIColor
=
MaterialColor
.
blueGrey
.
lighten4
public
static
var
pulseColorOpacity
:
CGFloat
=
0.25
// interaction
public
static
var
userInteractionEnabled
:
Bool
=
true
// image
public
static
var
contentsRect
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsCenter
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsScale
:
CGFloat
=
UIScreen
.
mainScreen
()
.
scale
public
static
var
contentsGravity
:
MaterialGravity
=
.
ResizeAspectFill
// position
public
static
var
zPosition
:
CGFloat
=
0
// divider
public
static
var
divider
:
Bool
=
true
public
static
var
dividerColor
:
UIColor
=
MaterialColor
.
blueGrey
.
lighten5
}
// imageCardView
public
extension
MaterialTheme
.
imageCardView
{
// shadow
public
static
var
depth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
public
static
var
contentInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
Square2
)
public
static
var
titleLabelInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
Square2
)
public
static
var
detailLabelInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
Square2
)
public
static
var
leftButtonsInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
None
)
public
static
var
rightButtonsInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
None
)
public
static
var
dividerInsetsRef
:
UIEdgeInsets
=
UIEdgeInsets
(
top
:
8
,
left
:
0
,
bottom
:
8
,
right
:
0
)
// border
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
bordercolor
:
UIColor
=
MaterialColor
.
black
// color
public
static
var
backgroundColor
:
UIColor
=
MaterialColor
.
white
public
static
var
pulseColor
:
UIColor
=
MaterialColor
.
blueGrey
.
lighten4
public
static
var
pulseColorOpacity
:
CGFloat
=
0.25
// interaction
public
static
var
userInteractionEnabled
:
Bool
=
true
// image
public
static
var
contentsRect
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsCenter
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsScale
:
CGFloat
=
UIScreen
.
mainScreen
()
.
scale
public
static
var
contentsGravity
:
MaterialGravity
=
.
ResizeAspectFill
// position
public
static
var
zPosition
:
CGFloat
=
0
// divider
public
static
var
divider
:
Bool
=
true
public
static
var
dividerColor
:
UIColor
=
MaterialColor
.
blueGrey
.
lighten5
}
// navigationBarView
public
extension
MaterialTheme
.
navigationBarView
{
// frame
public
static
var
x
:
CGFloat
=
0
public
static
var
y
:
CGFloat
=
0
public
static
var
width
:
CGFloat
=
UIScreen
.
mainScreen
()
.
bounds
.
width
public
static
var
height
:
CGFloat
=
70
// shadow
public
static
var
depth
:
MaterialDepth
=
.
Depth2
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
public
static
var
contentInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
Square2
)
public
static
var
titleLabelInsetsRef
:
UIEdgeInsets
=
UIEdgeInsets
(
top
:
8
,
left
:
0
,
bottom
:
0
,
right
:
0
)
public
static
var
detailLabelInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
None
)
public
static
var
leftButtonsInsetsRef
:
UIEdgeInsets
=
UIEdgeInsets
(
top
:
8
,
left
:
0
,
bottom
:
0
,
right
:
0
)
public
static
var
rightButtonsInsetsRef
:
UIEdgeInsets
=
UIEdgeInsets
(
top
:
8
,
left
:
0
,
bottom
:
0
,
right
:
0
)
// border
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
bordercolor
:
UIColor
=
MaterialColor
.
black
// color
public
static
var
backgroundColor
:
UIColor
=
MaterialColor
.
white
// interaction
public
static
var
userInteractionEnabled
:
Bool
=
true
// image
public
static
var
contentsRect
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsCenter
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsScale
:
CGFloat
=
UIScreen
.
mainScreen
()
.
scale
public
static
var
contentsGravity
:
MaterialGravity
=
.
ResizeAspectFill
// position
public
static
var
zPosition
:
CGFloat
=
100
}
// captureView
public
extension
MaterialTheme
.
captureView
{
// shadow
public
static
var
depth
:
MaterialDepth
=
.
None
public
static
var
shadowColor
:
UIColor
=
MaterialColor
.
black
// shape
public
static
var
contentInsetsRef
:
UIEdgeInsets
=
MaterialEdgeInsetsToValue
(
.
Square4
)
// border
public
static
var
borderWidth
:
MaterialBorder
=
.
None
public
static
var
bordercolor
:
UIColor
=
MaterialColor
.
black
// color
public
static
var
backgroundColor
:
UIColor
=
MaterialColor
.
black
// interaction
public
static
var
userInteractionEnabled
:
Bool
=
true
// image
public
static
var
contentsRect
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsCenter
:
CGRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
public
static
var
contentsScale
:
CGFloat
=
UIScreen
.
mainScreen
()
.
scale
public
static
var
contentsGravity
:
MaterialGravity
=
.
ResizeAspectFill
// position
public
static
var
zPosition
:
CGFloat
=
0
}
// textLayer
public
extension
MaterialTheme
.
textLayer
{
// scale
public
static
var
contentsScale
:
CGFloat
=
UIScreen
.
mainScreen
()
.
scale
// alignment
public
static
var
wrapped
:
Bool
=
true
public
static
var
textAlignment
:
NSTextAlignment
=
.
Left
public
static
var
lineBreakMode
:
NSLineBreakMode
=
.
ByWordWrapping
// font
public
static
var
font
:
UIFont
=
RobotoFont
.
regular
// color
public
static
var
textColor
:
UIColor
=
MaterialColor
.
black
}
// label
public
extension
MaterialTheme
.
label
{
// scale
public
static
var
contentsScale
:
CGFloat
=
UIScreen
.
mainScreen
()
.
scale
// alignment
public
static
var
wrapped
:
Bool
=
true
public
static
var
textAlignment
:
NSTextAlignment
=
.
Left
// font
public
static
var
font
:
UIFont
=
RobotoFont
.
regular
}
Sources/MaterialView.swift
View file @
d0b141df
...
@@ -406,6 +406,7 @@ public class MaterialView : UIView {
...
@@ -406,6 +406,7 @@ public class MaterialView : UIView {
*/
*/
public
func
prepareView
()
{
public
func
prepareView
()
{
prepareVisualLayer
()
prepareVisualLayer
()
backgroundColor
=
MaterialColor
.
white
shadowColor
=
MaterialColor
.
black
shadowColor
=
MaterialColor
.
black
borderColor
=
MaterialColor
.
black
borderColor
=
MaterialColor
.
black
}
}
...
...
Sources/NavigationBarView.swift
View file @
d0b141df
...
@@ -40,7 +40,7 @@ public class NavigationBarView : MaterialView {
...
@@ -40,7 +40,7 @@ public class NavigationBarView : MaterialView {
/**
/**
:name: contentInsetsRef
:name: contentInsetsRef
*/
*/
public
var
contentInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
navigationBarView
.
contentInsetsRef
{
public
var
contentInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
Square2
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -58,7 +58,7 @@ public class NavigationBarView : MaterialView {
...
@@ -58,7 +58,7 @@ public class NavigationBarView : MaterialView {
/**
/**
:name: titleLabelInsetsRef
:name: titleLabelInsetsRef
*/
*/
public
var
titleLabelInsetsRef
:
UIEdgeInsets
=
MaterialTheme
.
navigationBarView
.
titleLabelInsetsRef
{
public
var
titleLabelInsetsRef
:
UIEdgeInsets
=
UIEdgeInsets
(
top
:
8
,
left
:
0
,
bottom
:
0
,
right
:
0
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -86,7 +86,7 @@ public class NavigationBarView : MaterialView {
...
@@ -86,7 +86,7 @@ public class NavigationBarView : MaterialView {
/**
/**
:name: detailLabelInsetsRef
:name: detailLabelInsetsRef
*/
*/
public
var
detailLabelInsetsRef
:
UIEdgeInsets
=
Material
Theme
.
navigationBarView
.
detailLabelInsetsRef
{
public
var
detailLabelInsetsRef
:
UIEdgeInsets
=
Material
EdgeInsetsToValue
(
.
None
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -114,7 +114,7 @@ public class NavigationBarView : MaterialView {
...
@@ -114,7 +114,7 @@ public class NavigationBarView : MaterialView {
/**
/**
:name: leftButtonsInsetsRef
:name: leftButtonsInsetsRef
*/
*/
public
var
leftButtonsInsetsRef
:
UIEdgeInsets
=
MaterialTheme
.
navigationBarView
.
leftButtonsInsetsRef
{
public
var
leftButtonsInsetsRef
:
UIEdgeInsets
=
UIEdgeInsets
(
top
:
8
,
left
:
0
,
bottom
:
0
,
right
:
0
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -146,7 +146,7 @@ public class NavigationBarView : MaterialView {
...
@@ -146,7 +146,7 @@ public class NavigationBarView : MaterialView {
/**
/**
:name: rightButtonsInsetsRef
:name: rightButtonsInsetsRef
*/
*/
public
var
rightButtonsInsetsRef
:
UIEdgeInsets
=
MaterialTheme
.
navigationBarView
.
rightButtonsInsetsRef
{
public
var
rightButtonsInsetsRef
:
UIEdgeInsets
=
UIEdgeInsets
(
top
:
8
,
left
:
0
,
bottom
:
0
,
right
:
0
)
{
didSet
{
didSet
{
reloadView
()
reloadView
()
}
}
...
@@ -184,14 +184,14 @@ public class NavigationBarView : MaterialView {
...
@@ -184,14 +184,14 @@ public class NavigationBarView : MaterialView {
:name: init
:name: init
*/
*/
public
convenience
init
()
{
public
convenience
init
()
{
self
.
init
(
frame
:
CGRectMake
(
MaterialTheme
.
navigationBarView
.
x
,
MaterialTheme
.
navigationBarView
.
y
,
MaterialTheme
.
navigationBarView
.
width
,
MaterialTheme
.
navigationBarView
.
height
))
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
UIScreen
.
mainScreen
()
.
bounds
.
width
,
70
))
}
}
/**
/**
:name: init
:name: init
*/
*/
public
convenience
init
?(
titleLabel
:
UILabel
?
=
nil
,
detailLabel
:
UILabel
?
=
nil
,
leftButtons
:
Array
<
UIButton
>
?
=
nil
,
rightButtons
:
Array
<
UIButton
>
?
=
nil
)
{
public
convenience
init
?(
titleLabel
:
UILabel
?
=
nil
,
detailLabel
:
UILabel
?
=
nil
,
leftButtons
:
Array
<
UIButton
>
?
=
nil
,
rightButtons
:
Array
<
UIButton
>
?
=
nil
)
{
self
.
init
(
frame
:
CGRectMake
(
MaterialTheme
.
navigationBarView
.
x
,
MaterialTheme
.
navigationBarView
.
y
,
MaterialTheme
.
navigationBarView
.
width
,
MaterialTheme
.
navigationBarView
.
height
))
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
UIScreen
.
mainScreen
()
.
bounds
.
width
,
70
))
prepareProperties
(
titleLabel
,
detailLabel
:
detailLabel
,
leftButtons
:
leftButtons
,
rightButtons
:
rightButtons
)
prepareProperties
(
titleLabel
,
detailLabel
:
detailLabel
,
leftButtons
:
leftButtons
,
rightButtons
:
rightButtons
)
}
}
...
@@ -320,18 +320,7 @@ public class NavigationBarView : MaterialView {
...
@@ -320,18 +320,7 @@ public class NavigationBarView : MaterialView {
*/
*/
public
override
func
prepareView
()
{
public
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
userInteractionEnabled
=
MaterialTheme
.
navigationBarView
.
userInteractionEnabled
depth
=
.
Depth2
backgroundColor
=
MaterialTheme
.
navigationBarView
.
backgroundColor
contentsRect
=
MaterialTheme
.
navigationBarView
.
contentsRect
contentsCenter
=
MaterialTheme
.
navigationBarView
.
contentsCenter
contentsScale
=
MaterialTheme
.
navigationBarView
.
contentsScale
contentsGravity
=
MaterialTheme
.
navigationBarView
.
contentsGravity
depth
=
MaterialTheme
.
navigationBarView
.
depth
shadowColor
=
MaterialTheme
.
navigationBarView
.
shadowColor
zPosition
=
MaterialTheme
.
navigationBarView
.
zPosition
borderWidth
=
MaterialTheme
.
navigationBarView
.
borderWidth
borderColor
=
MaterialTheme
.
navigationBarView
.
bordercolor
}
}
/**
/**
...
...
Sources/SideNavigationViewController.swift
View file @
d0b141df
...
@@ -154,7 +154,16 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
...
@@ -154,7 +154,16 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
A Boolean property that enables and disables the sideView from
A Boolean property that enables and disables the sideView from
opening and closing. Defaults to true.
opening and closing. Defaults to true.
*/
*/
public
var
enabled
:
Bool
=
true
public
var
enabled
:
Bool
=
true
{
didSet
{
if
enabled
{
removeGestures
(
&
sidePanGesture
,
tap
:
&
sideTapGesture
)
prepareGestures
(
&
sidePanGesture
,
panSelector
:
"handlePanGesture:"
,
tap
:
&
sideTapGesture
,
tapSelector
:
"handleTapGesture:"
)
}
else
{
removeGestures
(
&
sidePanGesture
,
tap
:
&
sideTapGesture
)
}
}
}
/**
/**
A Boolean property that triggers the status bar to be hidden
A Boolean property that triggers the status bar to be hidden
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment