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
7c317d50
Unverified
Commit
7c317d50
authored
Jun 18, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: updated Device enum to inherit from Int
parent
68cc626f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
Material.xcodeproj/project.pbxproj
+9
-1
Sources/iOS/Device.swift
+12
-1
No files found.
Material.xcodeproj/project.pbxproj
View file @
7c317d50
...
@@ -442,7 +442,6 @@
...
@@ -442,7 +442,6 @@
children
=
(
children
=
(
9606CFAB1E957AC3006B4E74
/* TabsController.swift */
,
9606CFAB1E957AC3006B4E74
/* TabsController.swift */
,
96BCB79A1CB40DC500C806FE
/* TabBar.swift */
,
96BCB79A1CB40DC500C806FE
/* TabBar.swift */
,
96DE566B1EF1B63B006DA70E
/* PanController.swift */
,
);
);
name
=
Tabs
;
name
=
Tabs
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -560,6 +559,7 @@
...
@@ -560,6 +559,7 @@
96BCB8041CB40F6C00C806FE
/* Layout */
,
96BCB8041CB40F6C00C806FE
/* Layout */
,
96BCB8011CB40F1700C806FE
/* Navigation */
,
96BCB8011CB40F1700C806FE
/* Navigation */
,
961E6BEF1DDA4B04004E6C93
/* NavigationDrawer */
,
961E6BEF1DDA4B04004E6C93
/* NavigationDrawer */
,
96DE566D1EF1B6E3006DA70E
/* Pan */
,
96717B151DBE6B1800DA84DB
/* Photos */
,
96717B151DBE6B1800DA84DB
/* Photos */
,
9626CA951DAB5370003E2611
/* Root */
,
9626CA951DAB5370003E2611
/* Root */
,
961E6BE01DDA2ADD004E6C93
/* Screen */
,
961E6BE01DDA2ADD004E6C93
/* Screen */
,
...
@@ -755,6 +755,14 @@
...
@@ -755,6 +755,14 @@
path
=
Sources
;
path
=
Sources
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
96DE566D1EF1B6E3006DA70E
/* Pan */
=
{
isa
=
PBXGroup
;
children
=
(
96DE566B1EF1B63B006DA70E
/* PanController.swift */
,
);
name
=
Pan
;
sourceTree
=
"<group>"
;
};
96EF418E1E835E850012CA1C
/* Animation */
=
{
96EF418E1E835E850012CA1C
/* Animation */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
...
Sources/iOS/Device.swift
View file @
7c317d50
...
@@ -30,7 +30,8 @@
...
@@ -30,7 +30,8 @@
import
UIKit
import
UIKit
public
enum
DeviceModel
{
@objc(DeviceModel)
public
enum
DeviceModel
:
Int
{
case
iPodTouch5
case
iPodTouch5
case
iPodTouch6
case
iPodTouch6
case
iPhone4
case
iPhone4
...
@@ -116,3 +117,13 @@ public struct Device {
...
@@ -116,3 +117,13 @@ public struct Device {
return
UIDevice
.
current
.
userInterfaceIdiom
return
UIDevice
.
current
.
userInterfaceIdiom
}
}
}
}
public
func
==
(
lhs
:
DeviceModel
,
rhs
:
DeviceModel
)
->
Bool
{
return
lhs
.
rawValue
==
rhs
.
rawValue
}
public
func
!=
(
lhs
:
DeviceModel
,
rhs
:
DeviceModel
)
->
Bool
{
return
lhs
.
rawValue
!=
rhs
.
rawValue
}
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