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
e85b4f14
Commit
e85b4f14
authored
Mar 02, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue-196, where NavigationBarView was not sizing correctly on iPad
parent
83bb987b
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
83 additions
and
51 deletions
+83
-51
Examples/Programmatic/App/App/AppDelegate.swift
+1
-1
Examples/Programmatic/CaptureView/CaptureView/AppDelegate.swift
+1
-1
Examples/Programmatic/CardView/CardView/AppDelegate.swift
+1
-1
Examples/Programmatic/Grid/Grid/AppDelegate.swift
+1
-1
Examples/Programmatic/ImageCardView/ImageCardView/AppDelegate.swift
+1
-1
Examples/Programmatic/ImageCardView/ImageCardView/ViewController.swift
+1
-1
Examples/Programmatic/MaterialButton/MaterialButton/AppDelegate.swift
+1
-1
Examples/Programmatic/MaterialLayer/MaterialLayer/AppDelegate.swift
+1
-1
Examples/Programmatic/MaterialLayer/MaterialLayer/ViewController.swift
+1
-1
Examples/Programmatic/MaterialLayout/MaterialLayout/AppDelegate.swift
+1
-1
Examples/Programmatic/MaterialPulseView/MaterialPulseView/AppDelegate.swift
+1
-1
Examples/Programmatic/MaterialPulseView/MaterialPulseView/ViewController.swift
+1
-1
Examples/Programmatic/MaterialSwitch/MaterialSwitch/AppDelegate.swift
+1
-1
Examples/Programmatic/MaterialView/MaterialView/AppDelegate.swift
+1
-1
Examples/Programmatic/MaterialView/MaterialView/ViewController.swift
+1
-1
Examples/Programmatic/Menu/Menu/AppDelegate.swift
+1
-1
Examples/Programmatic/MenuView/MenuView/AppDelegate.swift
+1
-1
Examples/Programmatic/MenuViewController/MenuViewController/AppDelegate.swift
+1
-1
Examples/Programmatic/NavigationBarView/NavigationBarView/AppDelegate.swift
+1
-1
Examples/Programmatic/NavigationBarViewController/NavigationBarViewController/AppDelegate.swift
+1
-1
Examples/Programmatic/SearchBarView/SearchBarView/AppDelegate.swift
+1
-1
Examples/Programmatic/SearchBarViewController/SearchBarViewController/AppDelegate.swift
+1
-1
Examples/Programmatic/SideNavigationViewController/SideNavigationViewController/AppDelegate.swift
+1
-1
Examples/Programmatic/TableCardView/TableCardView/AppDelegate.swift
+1
-1
Examples/Programmatic/TextField/TextField/AppDelegate.swift
+1
-1
Examples/Programmatic/TextView/TextView/AppDelegate.swift
+1
-1
Examples/Storyboards/SideNavigationViewController/SideNavigationViewController/AppDelegate.swift
+1
-1
Material.xcodeproj/project.pbxproj
+16
-0
Sources/MaterialButton.swift
+2
-2
Sources/MaterialCollectionViewCell.swift
+2
-2
Sources/MaterialDevice.swift
+16
-0
Sources/MaterialPulseView.swift
+2
-2
Sources/MaterialTableViewCell.swift
+2
-2
Sources/NavigationBarView.swift
+1
-1
Sources/SearchBarView.swift
+1
-1
Sources/SearchBarViewController.swift
+1
-1
Sources/SideNavigationViewController.swift
+1
-1
Sources/StatusBarView.swift
+3
-9
Sources/StatusBarViewController.swift
+9
-3
No files found.
Examples/Programmatic/App/App/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
SideNavigationViewController
(
mainViewController
:
AppMenuViewController
(
mainViewController
:
AppNavigationBarViewController
(
mainViewController
:
InboxViewController
())),
leftViewController
:
AppLeftViewController
(),
rightViewController
:
AppRightViewController
())
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/CaptureView/CaptureView/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/CardView/CardView/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/Grid/Grid/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/ImageCardView/ImageCardView/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/ImageCardView/ImageCardView/ViewController.swift
View file @
e85b4f14
...
...
@@ -59,7 +59,7 @@ class ViewController: UIViewController {
let
imageCardView
:
ImageCardView
=
ImageCardView
()
// Image.
let
size
:
CGSize
=
CGSizeMake
(
UIScreen
.
mainScreen
()
.
bounds
.
width
-
CGFloat
(
40
),
150
)
let
size
:
CGSize
=
CGSizeMake
(
MaterialDevice
.
bounds
.
width
-
CGFloat
(
40
),
150
)
imageCardView
.
image
=
UIImage
.
imageWithColor
(
MaterialColor
.
cyan
.
darken1
,
size
:
size
)
// Title label.
...
...
Examples/Programmatic/MaterialButton/MaterialButton/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/MaterialLayer/MaterialLayer/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/MaterialLayer/MaterialLayer/ViewController.swift
View file @
e85b4f14
...
...
@@ -60,7 +60,7 @@ class ViewController: UIViewController {
*/
private
func
prepareGeneralMaterialLayerExample
()
{
let
diameter
:
CGFloat
=
150
let
point
:
CGFloat
=
UIScreen
.
mainScreen
()
.
bounds
.
width
/
2
-
diameter
/
2
let
point
:
CGFloat
=
MaterialDevice
.
bounds
.
width
/
2
-
diameter
/
2
let
materialLayer
:
MaterialLayer
=
MaterialLayer
(
frame
:
CGRectMake
(
point
,
point
,
diameter
,
diameter
))
materialLayer
.
shape
=
.
Circle
...
...
Examples/Programmatic/MaterialLayout/MaterialLayout/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/MaterialPulseView/MaterialPulseView/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/MaterialPulseView/MaterialPulseView/ViewController.swift
View file @
e85b4f14
...
...
@@ -51,7 +51,7 @@ class ViewController: UIViewController {
/// Prepares the MaterialPulseView example.
private
func
prepareGeneralMaterialPulseViewExample
()
{
let
point
:
CGFloat
=
(
UIScreen
.
mainScreen
()
.
bounds
.
width
-
150
)
/
2
let
point
:
CGFloat
=
(
MaterialDevice
.
bounds
.
width
-
150
)
/
2
let
pulseView
:
MaterialPulseView
=
MaterialPulseView
(
frame
:
CGRectMake
(
point
,
point
,
150
,
150
))
pulseView
.
image
=
UIImage
(
named
:
"Graph"
)
...
...
Examples/Programmatic/MaterialSwitch/MaterialSwitch/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/MaterialView/MaterialView/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/MaterialView/MaterialView/ViewController.swift
View file @
e85b4f14
...
...
@@ -52,7 +52,7 @@ class ViewController: UIViewController {
/// Prepare the MaterialView.
private
func
prepareGeneralMaterialViewExample
()
{
let
point
:
CGFloat
=
(
UIScreen
.
mainScreen
()
.
bounds
.
width
-
125
)
/
2
let
point
:
CGFloat
=
(
MaterialDevice
.
bounds
.
width
-
125
)
/
2
let
materialView
:
MaterialView
=
MaterialView
(
frame
:
CGRectMake
(
point
,
point
,
125
,
125
))
materialView
.
image
=
UIImage
(
named
:
"CosmicMind"
)
...
...
Examples/Programmatic/Menu/Menu/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/MenuView/MenuView/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/MenuViewController/MenuViewController/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
AppMenuViewController
(
mainViewController
:
YellowViewController
())
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/NavigationBarView/NavigationBarView/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -37,7 +37,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/NavigationBarViewController/NavigationBarViewController/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
AppNavigationBarViewController
(
mainViewController
:
YellowViewController
())
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/SearchBarView/SearchBarView/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -37,7 +37,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/SearchBarViewController/SearchBarViewController/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
AppSearchBarViewController
(
mainViewController
:
YellowViewController
())
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/SideNavigationViewController/SideNavigationViewController/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
SideNavigationViewController
(
mainViewController
:
YellowViewController
(),
leftViewController
:
GreenViewController
(),
rightViewController
:
BlueViewController
())
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/TableCardView/TableCardView/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/TextField/TextField/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Programmatic/TextView/TextView/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -38,7 +38,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
// Override point for customization after application launch.
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
return
true
...
...
Examples/Storyboards/SideNavigationViewController/SideNavigationViewController/AppDelegate.swift
View file @
e85b4f14
...
...
@@ -44,7 +44,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
let
sideViewController
=
storyboard
.
instantiateViewControllerWithIdentifier
(
"SideViewController"
)
as!
SideViewController
// Configure the window with the SideNavigationViewController as the root view controller
window
=
UIWindow
(
frame
:
UIScreen
.
mainScreen
()
.
bounds
)
window
=
UIWindow
(
frame
:
MaterialDevice
.
bounds
)
window
?
.
rootViewController
=
SideNavigationViewController
(
mainViewController
:
mainViewController
,
leftViewController
:
sideViewController
)
window
?
.
makeKeyAndVisible
()
return
true
...
...
Material.xcodeproj/project.pbxproj
View file @
e85b4f14
...
...
@@ -35,6 +35,14 @@
96442ADE1C28EF3700C3C574
/* MaterialTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96442ADD1C28EF3700C3C574
/* MaterialTableViewCell.swift */
;
};
96442ADF1C28EF3E00C3C574
/* MaterialTableViewCell.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96442ADD1C28EF3700C3C574
/* MaterialTableViewCell.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965626421C874FAE004ADEF7
/* MaterialDevice.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965626411C874FAE004ADEF7
/* MaterialDevice.swift */
;
};
965626431C8757B4004ADEF7
/* MaterialSpacing.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96CC089F1C80CB180034FF84
/* MaterialSpacing.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965626441C8757B4004ADEF7
/* MaterialDevice.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965626411C874FAE004ADEF7
/* MaterialDevice.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965626451C8757B4004ADEF7
/* MaterialCollectionView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96CC088B1C7FEC170034FF84
/* MaterialCollectionView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965626461C8757B4004ADEF7
/* MaterialCollectionViewCell.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96CC088C1C7FEC170034FF84
/* MaterialCollectionViewCell.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965626471C8757B4004ADEF7
/* MaterialCollectionViewDataSource.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96CC088D1C7FEC170034FF84
/* MaterialCollectionViewDataSource.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965626481C8757B4004ADEF7
/* MaterialCollectionViewDelegate.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96CC088E1C7FEC170034FF84
/* MaterialCollectionViewDelegate.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
965626491C8757B4004ADEF7
/* MaterialCollectionViewLayout.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96CC088F1C7FEC170034FF84
/* MaterialCollectionViewLayout.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
9656264A1C8757B4004ADEF7
/* MaterialDataSourceItem.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96CC08901C7FEC170034FF84
/* MaterialDataSourceItem.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
9656CD0C1C6BD33700EBCEF1
/* Grid.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9656CD0B1C6BD33700EBCEF1
/* Grid.swift */
;
};
966F57B81C226D75009185B7
/* TextField.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
966F57B71C226D75009185B7
/* TextField.swift */
;
};
96A71E911C6FBC2200C0C4AE
/* MenuView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96A71E901C6FBC2200C0C4AE
/* MenuView.swift */
;
};
...
...
@@ -599,6 +607,14 @@
96CC08371C7CCB7C0034FF84
/* SearchBarViewController.swift in Headers */
,
96CC08381C7CCB7C0034FF84
/* NavigationBarViewController.swift in Headers */
,
96CC083E1C7CFF2A0034FF84
/* StatusBarViewController.swift in Headers */
,
965626431C8757B4004ADEF7
/* MaterialSpacing.swift in Headers */
,
965626441C8757B4004ADEF7
/* MaterialDevice.swift in Headers */
,
965626451C8757B4004ADEF7
/* MaterialCollectionView.swift in Headers */
,
965626461C8757B4004ADEF7
/* MaterialCollectionViewCell.swift in Headers */
,
965626471C8757B4004ADEF7
/* MaterialCollectionViewDataSource.swift in Headers */
,
965626481C8757B4004ADEF7
/* MaterialCollectionViewDelegate.swift in Headers */
,
965626491C8757B4004ADEF7
/* MaterialCollectionViewLayout.swift in Headers */
,
9656264A1C8757B4004ADEF7
/* MaterialDataSourceItem.swift in Headers */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
Sources/MaterialButton.swift
View file @
e85b4f14
...
...
@@ -491,7 +491,7 @@ public class MaterialButton : UIButton {
let
d
:
CGFloat
=
2
*
f
let
s
:
CGFloat
=
1.05
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
UIScreen
.
mainScreen
()
.
bounds
.
width
)
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
MaterialDevice
.
bounds
.
width
)
if
0.55
<
t
||
0.25
>
t
{
t
=
0.55
}
...
...
@@ -534,7 +534,7 @@ public class MaterialButton : UIButton {
/// Executes the shrink animation for the pulse effect.
internal
func
shrinkAnimation
()
{
if
pulseScale
{
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
UIScreen
.
mainScreen
()
.
bounds
.
width
)
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
MaterialDevice
.
bounds
.
width
)
if
0.55
<
t
||
0.25
>
t
{
t
=
0.55
}
...
...
Sources/MaterialCollectionViewCell.swift
View file @
e85b4f14
...
...
@@ -545,7 +545,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
let
d
:
CGFloat
=
2
*
f
let
s
:
CGFloat
=
1.05
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
UIScreen
.
mainScreen
()
.
bounds
.
width
)
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
MaterialDevice
.
bounds
.
width
)
if
0.55
<
t
||
0.25
>
t
{
t
=
0.55
}
...
...
@@ -588,7 +588,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
/// Executes the shrink animation for the pulse effect.
internal
func
shrinkAnimation
()
{
if
pulseScale
{
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
UIScreen
.
mainScreen
()
.
bounds
.
width
)
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
MaterialDevice
.
bounds
.
width
)
if
0.55
<
t
||
0.25
>
t
{
t
=
0.55
}
...
...
Sources/MaterialDevice.swift
View file @
e85b4f14
...
...
@@ -56,4 +56,19 @@ public struct MaterialDevice {
public
static
var
landscape
:
Bool
{
return
UIApplication
.
sharedApplication
()
.
statusBarOrientation
.
isLandscape
}
/// Retrieves the device bounds.
public
static
var
bounds
:
CGRect
{
return
UIScreen
.
mainScreen
()
.
bounds
}
/// Retrieves the device width.
public
static
var
width
:
CGFloat
{
return
bounds
.
width
}
/// Retrieves the device height.
public
static
var
height
:
CGFloat
{
return
bounds
.
height
}
}
\ No newline at end of file
Sources/MaterialPulseView.swift
View file @
e85b4f14
...
...
@@ -116,7 +116,7 @@ public class MaterialPulseView : MaterialView {
let
d
:
CGFloat
=
2
*
f
let
s
:
CGFloat
=
1.05
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
UIScreen
.
mainScreen
()
.
bounds
.
width
)
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
MaterialDevice
.
bounds
.
width
)
if
0.55
<
t
||
0.25
>
t
{
t
=
0.55
}
...
...
@@ -159,7 +159,7 @@ public class MaterialPulseView : MaterialView {
/// Executes the shrink animation for the pulse effect.
internal
func
shrinkAnimation
()
{
if
pulseScale
{
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
UIScreen
.
mainScreen
()
.
bounds
.
width
)
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
MaterialDevice
.
bounds
.
width
)
if
0.55
<
t
||
0.25
>
t
{
t
=
0.55
}
...
...
Sources/MaterialTableViewCell.swift
View file @
e85b4f14
...
...
@@ -444,7 +444,7 @@ public class MaterialTableViewCell: UITableViewCell {
let
d
:
CGFloat
=
2
*
f
let
s
:
CGFloat
=
1.05
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
UIScreen
.
mainScreen
()
.
bounds
.
width
)
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
MaterialDevice
.
bounds
.
width
)
if
0.55
<
t
||
0.25
>
t
{
t
=
0.55
}
...
...
@@ -487,7 +487,7 @@ public class MaterialTableViewCell: UITableViewCell {
/// Executes the shrink animation for the pulse effect.
internal
func
shrinkAnimation
()
{
if
pulseScale
{
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
UIScreen
.
mainScreen
()
.
bounds
.
width
)
var
t
:
CFTimeInterval
=
CFTimeInterval
(
1.5
*
width
/
MaterialDevice
.
bounds
.
width
)
if
0.55
<
t
||
0.25
>
t
{
t
=
0.55
}
...
...
Sources/NavigationBarView.swift
View file @
e85b4f14
...
...
@@ -64,7 +64,7 @@ public class NavigationBarView : StatusBarView {
- Parameter rightControls: An Array of UIControls that go on the right side.
*/
public
convenience
init
?(
titleLabel
:
UILabel
?
=
nil
,
detailLabel
:
UILabel
?
=
nil
,
leftControls
:
Array
<
UIControl
>
?
=
nil
,
rightControls
:
Array
<
UIControl
>
?
=
nil
)
{
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
UIScreen
.
mainScreen
()
.
bounds
.
width
,
64
))
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
MaterialDevice
.
bounds
.
width
,
64
))
prepareProperties
(
titleLabel
,
detailLabel
:
detailLabel
,
leftControls
:
leftControls
,
rightControls
:
rightControls
)
}
...
...
Sources/SearchBarView.swift
View file @
e85b4f14
...
...
@@ -82,7 +82,7 @@ public class SearchBarView : StatusBarView {
/// A convenience initializer.
public
convenience
init
()
{
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
UIScreen
.
mainScreen
()
.
bounds
.
width
,
64
))
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
MaterialDevice
.
bounds
.
width
,
64
))
}
/**
...
...
Sources/SearchBarViewController.swift
View file @
e85b4f14
...
...
@@ -78,7 +78,7 @@ public class SearchBarViewController: StatusBarViewController {
/// Layout subviews.
private
func
layoutSubviews
()
{
let
size
:
CGSize
=
UIScreen
.
mainScreen
()
.
bounds
.
size
let
size
:
CGSize
=
MaterialDevice
.
bounds
.
size
let
h
:
CGFloat
=
UIApplication
.
sharedApplication
()
.
statusBarFrame
.
size
.
height
mainViewController
.
view
.
frame
=
CGRectMake
(
0
,
searchBarView
.
height
,
size
.
width
,
size
.
height
-
searchBarView
.
height
-
(
20
>=
h
?
0
:
h
-
20
))
}
...
...
Sources/SideNavigationViewController.swift
View file @
e85b4f14
...
...
@@ -848,7 +848,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
private
func
toggleStatusBar
(
hide
:
Bool
=
false
)
{
if
hideStatusBar
{
// General alignment.
if
UIApplication
.
sharedApplication
()
.
statusBarOrientation
.
isL
andscape
{
if
.
iPhone
==
MaterialDevice
.
type
&&
MaterialDevice
.
l
andscape
{
UIApplication
.
sharedApplication
()
.
statusBarHidden
=
true
}
else
{
UIApplication
.
sharedApplication
()
.
statusBarHidden
=
opened
?
true
:
hide
...
...
Sources/StatusBarView.swift
View file @
e85b4f14
...
...
@@ -47,21 +47,19 @@ public class StatusBarView : ControlView {
- Parameter rightControls: An Array of UIControls that go on the right side.
*/
public
convenience
init
?(
leftControls
:
Array
<
UIControl
>
?
=
nil
,
rightControls
:
Array
<
UIControl
>
?
=
nil
)
{
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
UIScreen
.
mainScreen
()
.
bounds
.
width
,
64
))
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
MaterialDevice
.
width
,
64
))
prepareProperties
(
leftControls
,
rightControls
:
rightControls
)
}
/// A convenience initializer.
public
convenience
init
()
{
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
UIScreen
.
mainScreen
()
.
bounds
.
width
,
64
))
self
.
init
(
frame
:
CGRectMake
(
0
,
0
,
MaterialDevice
.
width
,
64
))
}
public
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
grid
.
axis
.
columns
=
Int
(
width
/
48
)
print
(
UIDevice
.
currentDevice
()
.
userInterfaceIdiom
)
// General alignment.
if
.
iPhone
==
MaterialDevice
.
type
&&
MaterialDevice
.
landscape
{
grid
.
contentInset
.
top
=
8
...
...
@@ -82,11 +80,7 @@ public class StatusBarView : ControlView {
}
public
override
func
intrinsicContentSize
()
->
CGSize
{
if
UIApplication
.
sharedApplication
()
.
statusBarOrientation
.
isLandscape
{
return
CGSizeMake
(
UIScreen
.
mainScreen
()
.
bounds
.
width
,
44
)
}
else
{
return
CGSizeMake
(
UIScreen
.
mainScreen
()
.
bounds
.
width
,
64
)
}
return
CGSizeMake
(
MaterialDevice
.
width
,
.
iPhone
==
MaterialDevice
.
type
&&
MaterialDevice
.
landscape
?
44
:
64
)
}
/**
...
...
Sources/StatusBarViewController.swift
View file @
e85b4f14
...
...
@@ -114,15 +114,21 @@ public class StatusBarViewController: UIViewController {
/// Layout subviews.
private
func
layoutSubviews
()
{
let
size
:
CGSize
=
UIScreen
.
mainScreen
()
.
bounds
.
size
let
size
:
CGSize
=
MaterialDevice
.
bounds
.
size
let
h
:
CGFloat
=
UIApplication
.
sharedApplication
()
.
statusBarFrame
.
size
.
height
print
(
size
)
// mainViewController.view.frame = CGRectMake(0, navigationBarView.height, size.width, size.height - navigationBarView.height - (20 >= h ? 0 : h - 20))
if
.
iPhone
==
MaterialDevice
.
type
&&
MaterialDevice
.
landscape
{
mainViewController
.
view
.
frame
.
origin
.
y
=
44
mainViewController
.
view
.
frame
.
size
.
height
=
size
.
height
-
(
20
>=
h
?
44
:
h
-
64
)
}
else
{
mainViewController
.
view
.
frame
.
origin
.
y
=
64
mainViewController
.
view
.
frame
.
size
.
height
=
size
.
height
-
(
20
>=
h
?
64
:
h
-
84
)
}
}
/// A method that prepares the mainViewController.
private
func
prepareMainViewController
()
{
mainViewController
.
view
.
autoresizingMask
=
.
FlexibleWidth
prepareViewControllerWithinContainer
(
mainViewController
,
container
:
view
)
}
...
...
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