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
18e10652
Unverified
Commit
18e10652
authored
Sep 19, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: updated PhotoLibrary sample
parent
d4a97c1e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
272 additions
and
42 deletions
+272
-42
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController.xcodeproj/project.pbxproj
+38
-4
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/AppDelegate.swift
+34
-11
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/AppToolbarController.swift
+47
-0
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/Info.plist
+4
-0
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryCollectionReusableView.swift
+40
-0
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryCollectionView.swift
+51
-0
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryCollectionViewCell.swift
+56
-0
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryViewController.swift
+0
-0
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/ViewController.swift
+0
-25
Sources/iOS/CollectionReusableView.swift
+2
-2
No files found.
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController.xcodeproj/project.pbxproj
View file @
18e10652
...
...
@@ -8,18 +8,39 @@
/* Begin PBXBuildFile section */
96784F561D901F7C0061C06C
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784F551D901F7C0061C06C
/* AppDelegate.swift */
;
};
96784F581D901F7C0061C06C
/* ViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784F571D901F7C0061C06C
/* ViewController.swift */
;
};
96784F5D1D901F7C0061C06C
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784F5C1D901F7C0061C06C
/* Assets.xcassets */
;
};
96784F601D901F7C0061C06C
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784F5E1D901F7C0061C06C
/* LaunchScreen.storyboard */
;
};
96784FB61D905DBF0061C06C
/* PhotoLibraryViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FB51D905DBF0061C06C
/* PhotoLibraryViewController.swift */
;
};
96784FB81D905E3A0061C06C
/* PhotoLibraryCollectionView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FB71D905E3A0061C06C
/* PhotoLibraryCollectionView.swift */
;
};
96784FBA1D905E750061C06C
/* PhotoLibraryCollectionViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FB91D905E750061C06C
/* PhotoLibraryCollectionViewCell.swift */
;
};
96784FC01D9061920061C06C
/* AppToolbarController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FBF1D9061920061C06C
/* AppToolbarController.swift */
;
};
96784FC21D9063A50061C06C
/* PhotoLibraryCollectionReusableView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96784FC11D9063A50061C06C
/* PhotoLibraryCollectionReusableView.swift */
;
};
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
96784FBE1D905EEA0061C06C
/* Embed Frameworks */
=
{
isa
=
PBXCopyFilesBuildPhase
;
buildActionMask
=
2147483647
;
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
);
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
96784F521D901F7C0061C06C
/* PhotoLibraryController.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
PhotoLibraryController.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
96784F551D901F7C0061C06C
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
96784F571D901F7C0061C06C
/* ViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ViewController.swift
;
sourceTree
=
"<group>"
;
};
96784F5C1D901F7C0061C06C
/* Assets.xcassets */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder.assetcatalog
;
path
=
Assets.xcassets
;
sourceTree
=
"<group>"
;
};
96784F5F1D901F7C0061C06C
/* Base */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.storyboard
;
name
=
Base
;
path
=
Base.lproj/LaunchScreen.storyboard
;
sourceTree
=
"<group>"
;
};
96784F611D901F7C0061C06C
/* Info.plist */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.xml
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
96784FB51D905DBF0061C06C
/* PhotoLibraryViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PhotoLibraryViewController.swift
;
sourceTree
=
"<group>"
;
};
96784FB71D905E3A0061C06C
/* PhotoLibraryCollectionView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PhotoLibraryCollectionView.swift
;
sourceTree
=
"<group>"
;
};
96784FB91D905E750061C06C
/* PhotoLibraryCollectionViewCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PhotoLibraryCollectionViewCell.swift
;
sourceTree
=
"<group>"
;
};
96784FBF1D9061920061C06C
/* AppToolbarController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppToolbarController.swift
;
sourceTree
=
"<group>"
;
};
96784FC11D9063A50061C06C
/* PhotoLibraryCollectionReusableView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PhotoLibraryCollectionReusableView.swift
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -53,7 +74,11 @@
isa
=
PBXGroup
;
children
=
(
96784F551D901F7C0061C06C
/* AppDelegate.swift */
,
96784F571D901F7C0061C06C
/* ViewController.swift */
,
96784FBF1D9061920061C06C
/* AppToolbarController.swift */
,
96784FB51D905DBF0061C06C
/* PhotoLibraryViewController.swift */
,
96784FB71D905E3A0061C06C
/* PhotoLibraryCollectionView.swift */
,
96784FC11D9063A50061C06C
/* PhotoLibraryCollectionReusableView.swift */
,
96784FB91D905E750061C06C
/* PhotoLibraryCollectionViewCell.swift */
,
96784F5C1D901F7C0061C06C
/* Assets.xcassets */
,
96784F5E1D901F7C0061C06C
/* LaunchScreen.storyboard */
,
96784F611D901F7C0061C06C
/* Info.plist */
,
...
...
@@ -71,6 +96,7 @@
96784F4E1D901F7C0061C06C
/* Sources */
,
96784F4F1D901F7C0061C06C
/* Frameworks */
,
96784F501D901F7C0061C06C
/* Resources */
,
96784FBE1D905EEA0061C06C
/* Embed Frameworks */
,
);
buildRules
=
(
);
...
...
@@ -93,6 +119,7 @@
TargetAttributes
=
{
96784F511D901F7C0061C06C
=
{
CreatedOnToolsVersion
=
8.0
;
DevelopmentTeam
=
9Z76XCNLGL
;
ProvisioningStyle
=
Automatic
;
};
};
...
...
@@ -132,8 +159,12 @@
isa
=
PBXSourcesBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
96784F
581D901F7C0061C06C
/* ViewController
.swift in Sources */
,
96784F
C21D9063A50061C06C
/* PhotoLibraryCollectionReusableView
.swift in Sources */
,
96784F561D901F7C0061C06C
/* AppDelegate.swift in Sources */
,
96784FBA1D905E750061C06C
/* PhotoLibraryCollectionViewCell.swift in Sources */
,
96784FB81D905E3A0061C06C
/* PhotoLibraryCollectionView.swift in Sources */
,
96784FB61D905DBF0061C06C
/* PhotoLibraryViewController.swift in Sources */
,
96784FC01D9061920061C06C
/* AppToolbarController.swift in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
@@ -248,6 +279,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
9Z76XCNLGL
;
INFOPLIST_FILE
=
PhotoLibraryController/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.PhotoLibraryController
;
...
...
@@ -260,6 +292,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
9Z76XCNLGL
;
INFOPLIST_FILE
=
PhotoLibraryController/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.PhotoLibraryController
;
...
...
@@ -287,6 +320,7 @@
96784F661D901F7C0061C06C
/* Release */
,
);
defaultConfigurationIsVisible
=
0
;
defaultConfigurationName
=
Release
;
};
/* End XCConfigurationList section */
};
...
...
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/AppDelegate.swift
View file @
18e10652
//
// AppDelegate.swift
// PhotoLibraryController
//
// Created by Daniel Dahan on 2016-09-19.
// Copyright © 2016 CosmicMind. All rights reserved.
//
/*
* 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.
*/
import
UIKit
import
Material
@UIApplicationMain
class
AppDelegate
:
UIResponder
,
UIApplicationDelegate
{
var
window
:
UIWindow
?
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
UIApplicationLaunchOptionsKey
:
Any
]?)
->
Bool
{
// Override point for customization after application launch.
return
true
func
applicationDidFinishLaunching
(
_
application
:
UIApplication
)
{
window
=
UIWindow
(
frame
:
Device
.
bounds
)
window
!.
rootViewController
=
AppToolbarController
(
rootViewController
:
PhotoLibraryViewController
())
window
!.
makeKeyAndVisible
()
}
func
applicationWillResignActive
(
_
application
:
UIApplication
)
{
...
...
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/AppToolbarController.swift
0 → 100644
View file @
18e10652
/*
* 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.
*/
import
UIKit
import
Material
class
AppToolbarController
:
ToolbarController
{
open
override
func
prepare
()
{
super
.
prepare
()
statusBarStyle
=
.
default
prepareToolbar
()
}
private
func
prepareToolbar
()
{
toolbar
.
title
=
"Photo Library"
toolbar
.
depthPreset
=
.
none
toolbar
.
divider
.
color
=
Color
.
grey
.
lighten3
}
}
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/Info.plist
View file @
18e10652
...
...
@@ -2,6 +2,10 @@
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
UIViewControllerBasedStatusBarAppearance
<
/k
e
y
>
<
fa
ls
e
/
>
<
k
e
y
>
NSPhotoLibraryUsageDescription
<
/k
e
y
>
<
string
>
May
I
access
the
Photo
Library
?
<
/string
>
<
k
e
y
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
...
...
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryCollectionReusableView.swift
0 → 100644
View file @
18e10652
/*
* 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.
*/
import
UIKit
import
Material
class
PhotoLibraryCollectionViewCell
:
CollectionViewCell
{
open
override
func
prepare
()
{
super
.
prepare
()
pulseAnimation
=
.
backing
contentsGravityPreset
=
.
ResizeAspectFill
}
}
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryCollectionView.swift
0 → 100644
View file @
18e10652
/*
* 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.
*/
import
UIKit
import
Material
class
PhotoLibraryCollectionView
:
UICollectionView
{
override
init
(
frame
:
CGRect
,
collectionViewLayout
layout
:
UICollectionViewLayout
)
{
super
.
init
(
frame
:
frame
,
collectionViewLayout
:
layout
)
prepare
()
}
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
()
}
func
prepare
()
{
register
(
PhotoLibraryCollectionReusableView
.
self
,
forSupplementaryViewOfKind
:
UICollectionElementKindSectionHeader
,
withReuseIdentifier
:
"PhotoLibraryCollectionReusableView"
)
register
(
PhotoLibraryCollectionViewCell
.
self
,
forCellWithReuseIdentifier
:
"PhotoLibraryCollectionViewCell"
)
}
}
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryCollectionViewCell.swift
0 → 100644
View file @
18e10652
/*
* 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.
*/
import
UIKit
import
Material
class
PhotoLibraryCollectionReusableView
:
CollectionReusableView
{
/// A reference to the toolbar.
private(set)
var
toolbar
:
Toolbar
!
open
override
func
prepare
()
{
super
.
prepare
()
backgroundColor
=
nil
prepareToolbar
()
}
/// Prepares the toolbar.
private
func
prepareToolbar
()
{
toolbar
=
Toolbar
()
toolbar
.
titleLabel
.
font
=
RobotoFont
.
regular
(
with
:
14
)
toolbar
.
titleLabel
.
textAlignment
=
.
left
toolbar
.
contentEdgeInsets
.
left
=
16
toolbar
.
contentEdgeInsets
.
right
=
16
toolbar
.
depthPreset
=
.
none
toolbar
.
divider
.
color
=
Color
.
grey
.
lighten3
layout
(
toolbar
)
.
edges
()
}
}
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/PhotoLibraryViewController.swift
0 → 100644
View file @
18e10652
This diff is collapsed.
Click to expand it.
Examples/Programmatic/PhotoLibraryController/PhotoLibraryController/ViewController.swift
deleted
100644 → 0
View file @
d4a97c1e
//
// ViewController.swift
// PhotoLibraryController
//
// Created by Daniel Dahan on 2016-09-19.
// Copyright © 2016 CosmicMind. All rights reserved.
//
import
UIKit
class
ViewController
:
UIViewController
{
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
// Do any additional setup after loading the view, typically from a nib.
}
override
func
didReceiveMemoryWarning
()
{
super
.
didReceiveMemoryWarning
()
// Dispose of any resources that can be recreated.
}
}
Sources/iOS/CollectionReusableView.swift
View file @
18e10652
...
...
@@ -30,8 +30,8 @@
import
UIKit
@objc(
Material
CollectionReusableView)
open
class
Material
CollectionReusableView
:
UICollectionReusableView
{
@objc(CollectionReusableView)
open
class
CollectionReusableView
:
UICollectionReusableView
{
/**
A CAShapeLayer used to manage elements that would be affected by
the clipToBounds property of the backing layer. For example, this
...
...
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