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
7e87e2ac
Commit
7e87e2ac
authored
Jul 22, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated MaterialDataSourceItem to DataSourceItem
parent
c0940d0f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
13 deletions
+84
-13
Material.xcodeproj/project.pbxproj
+18
-6
Sources/iOS/CollectionViewDataSource.swift
+2
-2
Sources/iOS/CollectionViewLayout.swift
+4
-4
Sources/iOS/DataSourceItem.swift
+1
-1
Sources/iOS/Material+Array.swift
+59
-0
No files found.
Material.xcodeproj/project.pbxproj
View file @
7e87e2ac
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
96BCB7BD1CB40DC500C806FE
/* CollectionViewDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7741CB40DC500C806FE
/* CollectionViewDelegate.swift */
;
};
96BCB7BD1CB40DC500C806FE
/* CollectionViewDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7741CB40DC500C806FE
/* CollectionViewDelegate.swift */
;
};
96BCB7BE1CB40DC500C806FE
/* CollectionViewLayout.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7751CB40DC500C806FE
/* CollectionViewLayout.swift */
;
};
96BCB7BE1CB40DC500C806FE
/* CollectionViewLayout.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7751CB40DC500C806FE
/* CollectionViewLayout.swift */
;
};
96BCB7BF1CB40DC500C806FE
/* Color.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7761CB40DC500C806FE
/* Color.swift */
;
};
96BCB7BF1CB40DC500C806FE
/* Color.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7761CB40DC500C806FE
/* Color.swift */
;
};
96BCB7C01CB40DC500C806FE
/*
MaterialDataSourceItem.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7771CB40DC500C806FE
/* Material
DataSourceItem.swift */
;
};
96BCB7C01CB40DC500C806FE
/*
DataSourceItem.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7771CB40DC500C806FE
/*
DataSourceItem.swift */
;
};
96BCB7C11CB40DC500C806FE
/* Depth.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7781CB40DC500C806FE
/* Depth.swift */
;
};
96BCB7C11CB40DC500C806FE
/* Depth.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7781CB40DC500C806FE
/* Depth.swift */
;
};
96BCB7C21CB40DC500C806FE
/* Device.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7791CB40DC500C806FE
/* Device.swift */
;
};
96BCB7C21CB40DC500C806FE
/* Device.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7791CB40DC500C806FE
/* Device.swift */
;
};
96BCB7C31CB40DC500C806FE
/* EdgeInsets.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB77A1CB40DC500C806FE
/* EdgeInsets.swift */
;
};
96BCB7C31CB40DC500C806FE
/* EdgeInsets.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB77A1CB40DC500C806FE
/* EdgeInsets.swift */
;
};
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
96BCB81B1CB4115200C806FE
/* CapturePreview.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB75A1CB40DC500C806FE
/* CapturePreview.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB81B1CB4115200C806FE
/* CapturePreview.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB75A1CB40DC500C806FE
/* CapturePreview.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB81C1CB4115200C806FE
/* CaptureSession.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB75B1CB40DC500C806FE
/* CaptureSession.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB81C1CB4115200C806FE
/* CaptureSession.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB75B1CB40DC500C806FE
/* CaptureSession.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB81D1CB4115200C806FE
/* Capture.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB75C1CB40DC500C806FE
/* Capture.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB81D1CB4115200C806FE
/* Capture.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB75C1CB40DC500C806FE
/* Capture.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB81E1CB4115200C806FE
/*
MaterialDataSourceItem.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7771CB40DC500C806FE
/* Material
DataSourceItem.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB81E1CB4115200C806FE
/*
DataSourceItem.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7771CB40DC500C806FE
/*
DataSourceItem.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB81F1CB4115200C806FE
/* CollectionView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7711CB40DC500C806FE
/* CollectionView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB81F1CB4115200C806FE
/* CollectionView.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7711CB40DC500C806FE
/* CollectionView.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB8201CB4115200C806FE
/* CollectionViewCell.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7721CB40DC500C806FE
/* CollectionViewCell.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB8201CB4115200C806FE
/* CollectionViewCell.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7721CB40DC500C806FE
/* CollectionViewCell.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB8211CB4115200C806FE
/* CollectionViewDataSource.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7731CB40DC500C806FE
/* CollectionViewDataSource.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB8211CB4115200C806FE
/* CollectionViewDataSource.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7731CB40DC500C806FE
/* CollectionViewDataSource.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
...
@@ -160,6 +160,7 @@
...
@@ -160,6 +160,7 @@
96BCB8561CB4115200C806FE
/* Switch.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7881CB40DC500C806FE
/* Switch.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB8561CB4115200C806FE
/* Switch.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB7881CB40DC500C806FE
/* Switch.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB8571CB4115200C806FE
/* View.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB78C1CB40DC500C806FE
/* View.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB8571CB4115200C806FE
/* View.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB78C1CB40DC500C806FE
/* View.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96BCB8591CB4118E00C806FE
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96334EF51C8B84660083986B
/* Assets.xcassets */
;
};
96BCB8591CB4118E00C806FE
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96334EF51C8B84660083986B
/* Assets.xcassets */
;
};
96C1C8811D42C62800E6608F
/* Material+Array.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96C1C8801D42C62800E6608F
/* Material+Array.swift */
;
};
96D88C321C1328D800B91418
/* Material.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C091C1328D800B91418
/* Material.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96D88C321C1328D800B91418
/* Material.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96D88C091C1328D800B91418
/* Material.h */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96E3C3941D397AE90086A024
/* Material+UIView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96E3C3931D397AE90086A024
/* Material+UIView.swift */
;
};
96E3C3941D397AE90086A024
/* Material+UIView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96E3C3931D397AE90086A024
/* Material+UIView.swift */
;
};
96E3C3951D3A1CC20086A024
/* IconButton.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9658F2161CD6FA4700B902C1
/* IconButton.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96E3C3951D3A1CC20086A024
/* IconButton.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9658F2161CD6FA4700B902C1
/* IconButton.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
...
@@ -228,7 +229,7 @@
...
@@ -228,7 +229,7 @@
96BCB7741CB40DC500C806FE
/* CollectionViewDelegate.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CollectionViewDelegate.swift
;
sourceTree
=
"<group>"
;
};
96BCB7741CB40DC500C806FE
/* CollectionViewDelegate.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CollectionViewDelegate.swift
;
sourceTree
=
"<group>"
;
};
96BCB7751CB40DC500C806FE
/* CollectionViewLayout.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CollectionViewLayout.swift
;
sourceTree
=
"<group>"
;
};
96BCB7751CB40DC500C806FE
/* CollectionViewLayout.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CollectionViewLayout.swift
;
sourceTree
=
"<group>"
;
};
96BCB7761CB40DC500C806FE
/* Color.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Color.swift
;
sourceTree
=
"<group>"
;
};
96BCB7761CB40DC500C806FE
/* Color.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Color.swift
;
sourceTree
=
"<group>"
;
};
96BCB7771CB40DC500C806FE
/*
MaterialDataSourceItem.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Material
DataSourceItem.swift
;
sourceTree
=
"<group>"
;
};
96BCB7771CB40DC500C806FE
/*
DataSourceItem.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DataSourceItem.swift
;
sourceTree
=
"<group>"
;
};
96BCB7781CB40DC500C806FE
/* Depth.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Depth.swift
;
sourceTree
=
"<group>"
;
};
96BCB7781CB40DC500C806FE
/* Depth.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Depth.swift
;
sourceTree
=
"<group>"
;
};
96BCB7791CB40DC500C806FE
/* Device.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Device.swift
;
sourceTree
=
"<group>"
;
};
96BCB7791CB40DC500C806FE
/* Device.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Device.swift
;
sourceTree
=
"<group>"
;
};
96BCB77A1CB40DC500C806FE
/* EdgeInsets.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
EdgeInsets.swift
;
sourceTree
=
"<group>"
;
};
96BCB77A1CB40DC500C806FE
/* EdgeInsets.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
EdgeInsets.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -274,6 +275,7 @@
...
@@ -274,6 +275,7 @@
96BCB7F01CB40DE900C806FE
/* Roboto-Medium.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Medium.ttf"
;
sourceTree
=
"<group>"
;
};
96BCB7F01CB40DE900C806FE
/* Roboto-Medium.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Medium.ttf"
;
sourceTree
=
"<group>"
;
};
96BCB7F11CB40DE900C806FE
/* Roboto-Regular.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Regular.ttf"
;
sourceTree
=
"<group>"
;
};
96BCB7F11CB40DE900C806FE
/* Roboto-Regular.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Regular.ttf"
;
sourceTree
=
"<group>"
;
};
96BCB7F21CB40DE900C806FE
/* Roboto-Thin.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Thin.ttf"
;
sourceTree
=
"<group>"
;
};
96BCB7F21CB40DE900C806FE
/* Roboto-Thin.ttf */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
"Roboto-Thin.ttf"
;
sourceTree
=
"<group>"
;
};
96C1C8801D42C62800E6608F
/* Material+Array.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"Material+Array.swift"
;
sourceTree
=
"<group>"
;
};
96D88BFC1C1328D800B91418
/* Info.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
96D88BFC1C1328D800B91418
/* Info.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
96D88BFD1C1328D800B91418
/* LICENSE */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text
;
path
=
LICENSE
;
sourceTree
=
"<group>"
;
};
96D88BFD1C1328D800B91418
/* LICENSE */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text
;
path
=
LICENSE
;
sourceTree
=
"<group>"
;
};
96D88C091C1328D800B91418
/* Material.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
Material.h
;
sourceTree
=
"<group>"
;
};
96D88C091C1328D800B91418
/* Material.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
Material.h
;
sourceTree
=
"<group>"
;
};
...
@@ -315,6 +317,14 @@
...
@@ -315,6 +317,14 @@
/* End PBXFrameworksBuildPhase section */
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
/* Begin PBXGroup section */
962A92581D42839100DBAF8E
/* Data */
=
{
isa
=
PBXGroup
;
children
=
(
96BCB7771CB40DC500C806FE
/* DataSourceItem.swift */
,
);
name
=
Data
;
sourceTree
=
"<group>"
;
};
9638322C1B88DFD80015F710
=
{
9638322C1B88DFD80015F710
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -401,6 +411,7 @@
...
@@ -401,6 +411,7 @@
96BCB7FF1CB40EF000C806FE
/* Capture */
,
96BCB7FF1CB40EF000C806FE
/* Capture */
,
96BCB8051CB40F9C00C806FE
/* Collection */
,
96BCB8051CB40F9C00C806FE
/* Collection */
,
96BCB8001CB40F0300C806FE
/* Color */
,
96BCB8001CB40F0300C806FE
/* Color */
,
962A92581D42839100DBAF8E
/* Data */
,
96BCB80B1CB410CC00C806FE
/* Device */
,
96BCB80B1CB410CC00C806FE
/* Device */
,
96BCB80A1CB410A100C806FE
/* Extension */
,
96BCB80A1CB410A100C806FE
/* Extension */
,
96BCB8071CB4101C00C806FE
/* Font */
,
96BCB8071CB4101C00C806FE
/* Font */
,
...
@@ -514,7 +525,6 @@
...
@@ -514,7 +525,6 @@
96BCB8051CB40F9C00C806FE
/* Collection */
=
{
96BCB8051CB40F9C00C806FE
/* Collection */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
96BCB7771CB40DC500C806FE
/* MaterialDataSourceItem.swift */
,
96BCB7711CB40DC500C806FE
/* CollectionView.swift */
,
96BCB7711CB40DC500C806FE
/* CollectionView.swift */
,
96BCB7721CB40DC500C806FE
/* CollectionViewCell.swift */
,
96BCB7721CB40DC500C806FE
/* CollectionViewCell.swift */
,
96BCB7731CB40DC500C806FE
/* CollectionViewDataSource.swift */
,
96BCB7731CB40DC500C806FE
/* CollectionViewDataSource.swift */
,
...
@@ -578,6 +588,7 @@
...
@@ -578,6 +588,7 @@
96BCB7641CB40DC500C806FE
/* Material+String.swift */
,
96BCB7641CB40DC500C806FE
/* Material+String.swift */
,
96BCB7651CB40DC500C806FE
/* Material+UIFont.swift */
,
96BCB7651CB40DC500C806FE
/* Material+UIFont.swift */
,
96BCB76C1CB40DC500C806FE
/* Material+UIImage.swift */
,
96BCB76C1CB40DC500C806FE
/* Material+UIImage.swift */
,
96C1C8801D42C62800E6608F
/* Material+Array.swift */
,
);
);
name
=
Extension
;
name
=
Extension
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -655,7 +666,7 @@
...
@@ -655,7 +666,7 @@
96BCB81B1CB4115200C806FE
/* CapturePreview.swift in Headers */
,
96BCB81B1CB4115200C806FE
/* CapturePreview.swift in Headers */
,
96BCB81C1CB4115200C806FE
/* CaptureSession.swift in Headers */
,
96BCB81C1CB4115200C806FE
/* CaptureSession.swift in Headers */
,
96BCB81D1CB4115200C806FE
/* Capture.swift in Headers */
,
96BCB81D1CB4115200C806FE
/* Capture.swift in Headers */
,
96BCB81E1CB4115200C806FE
/*
Material
DataSourceItem.swift in Headers */
,
96BCB81E1CB4115200C806FE
/* DataSourceItem.swift in Headers */
,
96BCB81F1CB4115200C806FE
/* CollectionView.swift in Headers */
,
96BCB81F1CB4115200C806FE
/* CollectionView.swift in Headers */
,
96BCB8201CB4115200C806FE
/* CollectionViewCell.swift in Headers */
,
96BCB8201CB4115200C806FE
/* CollectionViewCell.swift in Headers */
,
96BCB8211CB4115200C806FE
/* CollectionViewDataSource.swift in Headers */
,
96BCB8211CB4115200C806FE
/* CollectionViewDataSource.swift in Headers */
,
...
@@ -906,7 +917,7 @@
...
@@ -906,7 +917,7 @@
isa
=
PBXSourcesBuildPhase
;
isa
=
PBXSourcesBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
96BCB7C01CB40DC500C806FE
/*
Material
DataSourceItem.swift in Sources */
,
96BCB7C01CB40DC500C806FE
/* DataSourceItem.swift in Sources */
,
96BCB7AC1CB40DC500C806FE
/* Material+Obj-C.swift in Sources */
,
96BCB7AC1CB40DC500C806FE
/* Material+Obj-C.swift in Sources */
,
9658F2171CD6FA4700B902C1
/* IconButton.swift in Sources */
,
9658F2171CD6FA4700B902C1
/* IconButton.swift in Sources */
,
96BCB7BB1CB40DC500C806FE
/* CollectionViewCell.swift in Sources */
,
96BCB7BB1CB40DC500C806FE
/* CollectionViewCell.swift in Sources */
,
...
@@ -970,6 +981,7 @@
...
@@ -970,6 +981,7 @@
96BCB7A51CB40DC500C806FE
/* Capture.swift in Sources */
,
96BCB7A51CB40DC500C806FE
/* Capture.swift in Sources */
,
96BCB7B91CB40DC500C806FE
/* Button.swift in Sources */
,
96BCB7B91CB40DC500C806FE
/* Button.swift in Sources */
,
96BCB7B51CB40DC500C806FE
/* Material+UIImage.swift in Sources */
,
96BCB7B51CB40DC500C806FE
/* Material+UIImage.swift in Sources */
,
96C1C8811D42C62800E6608F
/* Material+Array.swift in Sources */
,
96BCB7E31CB40DC500C806FE
/* TabBar.swift in Sources */
,
96BCB7E31CB40DC500C806FE
/* TabBar.swift in Sources */
,
96BCB7CD1CB40DC500C806FE
/* PulseView.swift in Sources */
,
96BCB7CD1CB40DC500C806FE
/* PulseView.swift in Sources */
,
96BCB7DA1CB40DC500C806FE
/* NavigationController.swift in Sources */
,
96BCB7DA1CB40DC500C806FE
/* NavigationController.swift in Sources */
,
...
...
Sources/iOS/CollectionViewDataSource.swift
View file @
7e87e2ac
...
@@ -33,7 +33,7 @@ import UIKit
...
@@ -33,7 +33,7 @@ import UIKit
public
protocol
CollectionViewDataSource
:
UICollectionViewDataSource
{
public
protocol
CollectionViewDataSource
:
UICollectionViewDataSource
{
/**
/**
Retrieves the items for the collectionView.
Retrieves the items for the collectionView.
- Returns: An Array of Arrays of
Material
DataSourceItem objects.
- Returns: An Array of Arrays of DataSourceItem objects.
*/
*/
func
items
()
->
[
Material
DataSourceItem
]
func
items
()
->
[
DataSourceItem
]
}
}
Sources/iOS/CollectionViewLayout.swift
View file @
7e87e2ac
...
@@ -54,7 +54,7 @@ public class CollectionViewLayout: UICollectionViewLayout {
...
@@ -54,7 +54,7 @@ public class CollectionViewLayout: UICollectionViewLayout {
public
private(set)
var
layoutItems
:
Array
<
(
UICollectionViewLayoutAttributes
,
NSIndexPath
)
>
=
Array
<
(
UICollectionViewLayoutAttributes
,
NSIndexPath
)
>
()
public
private(set)
var
layoutItems
:
Array
<
(
UICollectionViewLayoutAttributes
,
NSIndexPath
)
>
=
Array
<
(
UICollectionViewLayoutAttributes
,
NSIndexPath
)
>
()
/// Cell data source items.
/// Cell data source items.
public
private(set)
var
dataSourceItems
:
Array
<
MaterialDataSourceItem
>
?
public
private(set)
var
dataSourceItems
:
[
DataSourceItem
]
?
/// Scroll direction.
/// Scroll direction.
public
var
scrollDirection
:
UICollectionViewScrollDirection
=
.
vertical
public
var
scrollDirection
:
UICollectionViewScrollDirection
=
.
vertical
...
@@ -86,7 +86,7 @@ public class CollectionViewLayout: UICollectionViewLayout {
...
@@ -86,7 +86,7 @@ public class CollectionViewLayout: UICollectionViewLayout {
public
override
func
layoutAttributesForItem
(
at
indexPath
:
IndexPath
)
->
UICollectionViewLayoutAttributes
?
{
public
override
func
layoutAttributesForItem
(
at
indexPath
:
IndexPath
)
->
UICollectionViewLayoutAttributes
?
{
let
attributes
=
UICollectionViewLayoutAttributes
(
forCellWith
:
indexPath
)
let
attributes
=
UICollectionViewLayoutAttributes
(
forCellWith
:
indexPath
)
let
item
:
Material
DataSourceItem
=
dataSourceItems
!
[
indexPath
.
item
]
let
item
:
DataSourceItem
=
dataSourceItems
!
[
indexPath
.
item
]
if
0
<
itemSize
.
width
&&
0
<
itemSize
.
height
{
if
0
<
itemSize
.
width
&&
0
<
itemSize
.
height
{
attributes
.
frame
=
CGRect
(
x
:
offset
.
x
,
y
:
offset
.
y
,
width
:
itemSize
.
width
-
contentInset
.
left
-
contentInset
.
right
,
height
:
itemSize
.
height
-
contentInset
.
top
-
contentInset
.
bottom
)
attributes
.
frame
=
CGRect
(
x
:
offset
.
x
,
y
:
offset
.
y
,
width
:
itemSize
.
width
-
contentInset
.
left
-
contentInset
.
right
,
height
:
itemSize
.
height
-
contentInset
.
top
-
contentInset
.
bottom
)
...
@@ -127,7 +127,7 @@ public class CollectionViewLayout: UICollectionViewLayout {
...
@@ -127,7 +127,7 @@ public class CollectionViewLayout: UICollectionViewLayout {
return
proposedContentOffset
return
proposedContentOffset
}
}
private
func
prepareLayoutForItems
(
dataSourceItems
:
Array
<
MaterialDataSourceItem
>
)
{
private
func
prepareLayoutForItems
(
dataSourceItems
:
[
DataSourceItem
]
)
{
self
.
dataSourceItems
=
dataSourceItems
self
.
dataSourceItems
=
dataSourceItems
layoutItems
.
removeAll
()
layoutItems
.
removeAll
()
...
@@ -135,7 +135,7 @@ public class CollectionViewLayout: UICollectionViewLayout {
...
@@ -135,7 +135,7 @@ public class CollectionViewLayout: UICollectionViewLayout {
offset
.
y
=
contentInset
.
top
offset
.
y
=
contentInset
.
top
for
i
in
0
..<
dataSourceItems
.
count
{
for
i
in
0
..<
dataSourceItems
.
count
{
let
item
:
Material
DataSourceItem
=
dataSourceItems
[
i
]
let
item
:
DataSourceItem
=
dataSourceItems
[
i
]
let
indexPath
=
IndexPath
(
item
:
i
,
section
:
0
)
let
indexPath
=
IndexPath
(
item
:
i
,
section
:
0
)
layoutItems
.
append
((
layoutAttributesForItem
(
at
:
indexPath
)
!
,
indexPath
))
layoutItems
.
append
((
layoutAttributesForItem
(
at
:
indexPath
)
!
,
indexPath
))
...
...
Sources/iOS/
Material
DataSourceItem.swift
→
Sources/iOS/DataSourceItem.swift
View file @
7e87e2ac
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
import
UIKit
import
UIKit
public
struct
Material
DataSourceItem
{
public
struct
DataSourceItem
{
/// Stores an the data for the item.
/// Stores an the data for the item.
public
var
data
:
AnyObject
?
public
var
data
:
AnyObject
?
...
...
Sources/iOS/Material+Array.swift
0 → 100644
View file @
7e87e2ac
/*
* Copyright (C) 2015 - 2016, Daniel Dahan and CosmicMind, Inc. <http://cosmicmind.io>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* * Neither the name of CosmicMind nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
public
extension
Array
where
Element
:
Equatable
{
/**
Slices a out a segment of an array based on the start
and end positions.
- Parameter start: A start index.
- Parameter end: An end index.
- Returns: A segmented array based on the start and end
indices.
*/
public
func
slice
(
start
:
Int
,
end
:
Int
?)
->
[
Element
]
{
var
e
=
end
??
count
-
1
if
e
>=
count
{
e
=
count
-
1
}
guard
-
1
<
start
else
{
fatalError
(
"Range out of bounds for
\(
start
)
-
\(
end
)
, should be 0 -
\(
count
)
."
)
}
var
diff
=
abs
(
e
-
start
)
guard
count
>
diff
else
{
return
self
}
var
ret
=
[
Element
]()
while
-
1
<
diff
{
ret
.
insert
(
self
[
start
+
diff
],
at
:
0
)
diff
-=
1
}
return
ret
}
}
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