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
b701f1b7
Unverified
Commit
b701f1b7
authored
Sep 23, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: added PresenterCard sample project
parent
9756078e
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
681 additions
and
0 deletions
+681
-0
Examples/Material.xcworkspace/contents.xcworkspacedata
+3
-0
Examples/Programmatic/PresenterCard/PresenterCard.xcodeproj/project.pbxproj
+309
-0
Examples/Programmatic/PresenterCard/PresenterCard.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+7
-0
Examples/Programmatic/PresenterCard/PresenterCard/AppDelegate.swift
+45
-0
Examples/Programmatic/PresenterCard/PresenterCard/Assets.xcassets/AppIcon.appiconset/Contents.json
+94
-0
Examples/Programmatic/PresenterCard/PresenterCard/Assets.xcassets/Contents.json
+7
-0
Examples/Programmatic/PresenterCard/PresenterCard/Assets.xcassets/frontier.imageset/Contents.json
+22
-0
Examples/Programmatic/PresenterCard/PresenterCard/Assets.xcassets/frontier.imageset/frontier.jpg
+0
-0
Examples/Programmatic/PresenterCard/PresenterCard/Base.lproj/LaunchScreen.storyboard
+27
-0
Examples/Programmatic/PresenterCard/PresenterCard/Info.plist
+44
-0
Examples/Programmatic/PresenterCard/PresenterCard/ViewController.swift
+123
-0
No files found.
Examples/Material.xcworkspace/contents.xcworkspacedata
View file @
b701f1b7
...
@@ -44,6 +44,9 @@
...
@@ -44,6 +44,9 @@
location =
"group:Programmatic/PhotoLibraryController/PhotoLibraryController.xcodeproj"
>
location =
"group:Programmatic/PhotoLibraryController/PhotoLibraryController.xcodeproj"
>
</FileRef>
</FileRef>
<FileRef
<FileRef
location =
"group:Programmatic/PresenterCard/PresenterCard.xcodeproj"
>
</FileRef>
<FileRef
location =
"group:Programmatic/RemindersController/RemindersController.xcodeproj"
>
location =
"group:Programmatic/RemindersController/RemindersController.xcodeproj"
>
</FileRef>
</FileRef>
<FileRef
<FileRef
...
...
Examples/Programmatic/PresenterCard/PresenterCard.xcodeproj/project.pbxproj
0 → 100644
View file @
b701f1b7
// !$*UTF8*$!
{
archiveVersion
=
1
;
classes
=
{
};
objectVersion
=
46
;
objects
=
{
/* Begin PBXBuildFile section */
9631A7E41D95F08000CFB109
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9631A7E31D95F08000CFB109
/* AppDelegate.swift */
;
};
9631A7E61D95F08000CFB109
/* ViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9631A7E51D95F08000CFB109
/* ViewController.swift */
;
};
9631A7EB1D95F08000CFB109
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9631A7EA1D95F08000CFB109
/* Assets.xcassets */
;
};
9631A7EE1D95F08000CFB109
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9631A7EC1D95F08000CFB109
/* LaunchScreen.storyboard */
;
};
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9631A7F81D95F0BC00CFB109
/* Embed Frameworks */
=
{
isa
=
PBXCopyFilesBuildPhase
;
buildActionMask
=
2147483647
;
dstPath
=
""
;
dstSubfolderSpec
=
10
;
files
=
(
);
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
9631A7E01D95F08000CFB109
/* PresenterCard.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
PresenterCard.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
9631A7E31D95F08000CFB109
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
9631A7E51D95F08000CFB109
/* ViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
ViewController.swift
;
sourceTree
=
"<group>"
;
};
9631A7EA1D95F08000CFB109
/* Assets.xcassets */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
folder.assetcatalog
;
path
=
Assets.xcassets
;
sourceTree
=
"<group>"
;
};
9631A7ED1D95F08000CFB109
/* Base */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file.storyboard
;
name
=
Base
;
path
=
Base.lproj/LaunchScreen.storyboard
;
sourceTree
=
"<group>"
;
};
9631A7EF1D95F08000CFB109
/* Info.plist */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
text.plist.xml
;
path
=
Info.plist
;
sourceTree
=
"<group>"
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
9631A7DD1D95F08000CFB109
/* Frameworks */
=
{
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
);
runOnlyForDeploymentPostprocessing
=
0
;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9631A7D71D95F08000CFB109
=
{
isa
=
PBXGroup
;
children
=
(
9631A7E21D95F08000CFB109
/* PresenterCard */
,
9631A7E11D95F08000CFB109
/* Products */
,
);
sourceTree
=
"<group>"
;
};
9631A7E11D95F08000CFB109
/* Products */
=
{
isa
=
PBXGroup
;
children
=
(
9631A7E01D95F08000CFB109
/* PresenterCard.app */
,
);
name
=
Products
;
sourceTree
=
"<group>"
;
};
9631A7E21D95F08000CFB109
/* PresenterCard */
=
{
isa
=
PBXGroup
;
children
=
(
9631A7E31D95F08000CFB109
/* AppDelegate.swift */
,
9631A7E51D95F08000CFB109
/* ViewController.swift */
,
9631A7EA1D95F08000CFB109
/* Assets.xcassets */
,
9631A7EC1D95F08000CFB109
/* LaunchScreen.storyboard */
,
9631A7EF1D95F08000CFB109
/* Info.plist */
,
);
path
=
PresenterCard
;
sourceTree
=
"<group>"
;
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
9631A7DF1D95F08000CFB109
/* PresenterCard */
=
{
isa
=
PBXNativeTarget
;
buildConfigurationList
=
9631A7F21D95F08000CFB109
/* Build configuration list for PBXNativeTarget "PresenterCard" */
;
buildPhases
=
(
9631A7DC1D95F08000CFB109
/* Sources */
,
9631A7DD1D95F08000CFB109
/* Frameworks */
,
9631A7DE1D95F08000CFB109
/* Resources */
,
9631A7F81D95F0BC00CFB109
/* Embed Frameworks */
,
);
buildRules
=
(
);
dependencies
=
(
);
name
=
PresenterCard
;
productName
=
PresenterCard
;
productReference
=
9631A7E01D95F08000CFB109
/* PresenterCard.app */
;
productType
=
"com.apple.product-type.application"
;
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
9631A7D81D95F08000CFB109
/* Project object */
=
{
isa
=
PBXProject
;
attributes
=
{
LastSwiftUpdateCheck
=
0800
;
LastUpgradeCheck
=
0800
;
ORGANIZATIONNAME
=
CosmicMind
;
TargetAttributes
=
{
9631A7DF1D95F08000CFB109
=
{
CreatedOnToolsVersion
=
8.0
;
ProvisioningStyle
=
Automatic
;
};
};
};
buildConfigurationList
=
9631A7DB1D95F08000CFB109
/* Build configuration list for PBXProject "PresenterCard" */
;
compatibilityVersion
=
"Xcode 3.2"
;
developmentRegion
=
English
;
hasScannedForEncodings
=
0
;
knownRegions
=
(
en
,
Base
,
);
mainGroup
=
9631A7D71D95F08000CFB109
;
productRefGroup
=
9631A7E11D95F08000CFB109
/* Products */
;
projectDirPath
=
""
;
projectRoot
=
""
;
targets
=
(
9631A7DF1D95F08000CFB109
/* PresenterCard */
,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
9631A7DE1D95F08000CFB109
/* Resources */
=
{
isa
=
PBXResourcesBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
9631A7EE1D95F08000CFB109
/* LaunchScreen.storyboard in Resources */
,
9631A7EB1D95F08000CFB109
/* Assets.xcassets in Resources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
9631A7DC1D95F08000CFB109
/* Sources */
=
{
isa
=
PBXSourcesBuildPhase
;
buildActionMask
=
2147483647
;
files
=
(
9631A7E61D95F08000CFB109
/* ViewController.swift in Sources */
,
9631A7E41D95F08000CFB109
/* AppDelegate.swift in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
9631A7EC1D95F08000CFB109
/* LaunchScreen.storyboard */
=
{
isa
=
PBXVariantGroup
;
children
=
(
9631A7ED1D95F08000CFB109
/* Base */
,
);
name
=
LaunchScreen.storyboard
;
sourceTree
=
"<group>"
;
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
9631A7F01D95F08000CFB109
/* Debug */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ALWAYS_SEARCH_USER_PATHS
=
NO
;
CLANG_ANALYZER_NONNULL
=
YES
;
CLANG_CXX_LANGUAGE_STANDARD
=
"gnu++0x"
;
CLANG_CXX_LIBRARY
=
"libc++"
;
CLANG_ENABLE_MODULES
=
YES
;
CLANG_ENABLE_OBJC_ARC
=
YES
;
CLANG_WARN_BOOL_CONVERSION
=
YES
;
CLANG_WARN_CONSTANT_CONVERSION
=
YES
;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE
=
YES_ERROR
;
CLANG_WARN_DOCUMENTATION_COMMENTS
=
YES
;
CLANG_WARN_EMPTY_BODY
=
YES
;
CLANG_WARN_ENUM_CONVERSION
=
YES
;
CLANG_WARN_INFINITE_RECURSION
=
YES
;
CLANG_WARN_INT_CONVERSION
=
YES
;
CLANG_WARN_OBJC_ROOT_CLASS
=
YES_ERROR
;
CLANG_WARN_SUSPICIOUS_MOVES
=
YES
;
CLANG_WARN_UNREACHABLE_CODE
=
YES
;
CLANG_WARN__DUPLICATE_METHOD_MATCH
=
YES
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
COPY_PHASE_STRIP
=
NO
;
DEBUG_INFORMATION_FORMAT
=
dwarf
;
ENABLE_STRICT_OBJC_MSGSEND
=
YES
;
ENABLE_TESTABILITY
=
YES
;
GCC_C_LANGUAGE_STANDARD
=
gnu99
;
GCC_DYNAMIC_NO_PIC
=
NO
;
GCC_NO_COMMON_BLOCKS
=
YES
;
GCC_OPTIMIZATION_LEVEL
=
0
;
GCC_PREPROCESSOR_DEFINITIONS
=
(
"DEBUG=1"
,
"$(inherited)"
,
);
GCC_WARN_64_TO_32_BIT_CONVERSION
=
YES
;
GCC_WARN_ABOUT_RETURN_TYPE
=
YES_ERROR
;
GCC_WARN_UNDECLARED_SELECTOR
=
YES
;
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
10.0
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
iphoneos
;
SWIFT_ACTIVE_COMPILATION_CONDITIONS
=
DEBUG
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
};
name
=
Debug
;
};
9631A7F11D95F08000CFB109
/* Release */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ALWAYS_SEARCH_USER_PATHS
=
NO
;
CLANG_ANALYZER_NONNULL
=
YES
;
CLANG_CXX_LANGUAGE_STANDARD
=
"gnu++0x"
;
CLANG_CXX_LIBRARY
=
"libc++"
;
CLANG_ENABLE_MODULES
=
YES
;
CLANG_ENABLE_OBJC_ARC
=
YES
;
CLANG_WARN_BOOL_CONVERSION
=
YES
;
CLANG_WARN_CONSTANT_CONVERSION
=
YES
;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE
=
YES_ERROR
;
CLANG_WARN_DOCUMENTATION_COMMENTS
=
YES
;
CLANG_WARN_EMPTY_BODY
=
YES
;
CLANG_WARN_ENUM_CONVERSION
=
YES
;
CLANG_WARN_INFINITE_RECURSION
=
YES
;
CLANG_WARN_INT_CONVERSION
=
YES
;
CLANG_WARN_OBJC_ROOT_CLASS
=
YES_ERROR
;
CLANG_WARN_SUSPICIOUS_MOVES
=
YES
;
CLANG_WARN_UNREACHABLE_CODE
=
YES
;
CLANG_WARN__DUPLICATE_METHOD_MATCH
=
YES
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
COPY_PHASE_STRIP
=
NO
;
DEBUG_INFORMATION_FORMAT
=
"dwarf-with-dsym"
;
ENABLE_NS_ASSERTIONS
=
NO
;
ENABLE_STRICT_OBJC_MSGSEND
=
YES
;
GCC_C_LANGUAGE_STANDARD
=
gnu99
;
GCC_NO_COMMON_BLOCKS
=
YES
;
GCC_WARN_64_TO_32_BIT_CONVERSION
=
YES
;
GCC_WARN_ABOUT_RETURN_TYPE
=
YES_ERROR
;
GCC_WARN_UNDECLARED_SELECTOR
=
YES
;
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
IPHONEOS_DEPLOYMENT_TARGET
=
10.0
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
iphoneos
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Owholemodule"
;
TARGETED_DEVICE_FAMILY
=
"1,2"
;
VALIDATE_PRODUCT
=
YES
;
};
name
=
Release
;
};
9631A7F31D95F08000CFB109
/* Debug */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
INFOPLIST_FILE
=
PresenterCard/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.PresenterCard
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
SWIFT_VERSION
=
3.0
;
};
name
=
Debug
;
};
9631A7F41D95F08000CFB109
/* Release */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
INFOPLIST_FILE
=
PresenterCard/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.PresenterCard
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
SWIFT_VERSION
=
3.0
;
};
name
=
Release
;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
9631A7DB1D95F08000CFB109
/* Build configuration list for PBXProject "PresenterCard" */
=
{
isa
=
XCConfigurationList
;
buildConfigurations
=
(
9631A7F01D95F08000CFB109
/* Debug */
,
9631A7F11D95F08000CFB109
/* Release */
,
);
defaultConfigurationIsVisible
=
0
;
defaultConfigurationName
=
Release
;
};
9631A7F21D95F08000CFB109
/* Build configuration list for PBXNativeTarget "PresenterCard" */
=
{
isa
=
XCConfigurationList
;
buildConfigurations
=
(
9631A7F31D95F08000CFB109
/* Debug */
,
9631A7F41D95F08000CFB109
/* Release */
,
);
defaultConfigurationIsVisible
=
0
;
defaultConfigurationName
=
Release
;
};
/* End XCConfigurationList section */
};
rootObject
=
9631A7D81D95F08000CFB109
/* Project object */
;
}
Examples/Programmatic/PresenterCard/PresenterCard.xcodeproj/project.xcworkspace/contents.xcworkspacedata
0 → 100644
View file @
b701f1b7
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"self:PresenterCard.xcodeproj"
>
</FileRef>
</Workspace>
Examples/Programmatic/PresenterCard/PresenterCard/AppDelegate.swift
0 → 100644
View file @
b701f1b7
/*
* 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
applicationDidFinishLaunching
(
_
application
:
UIApplication
)
{
window
=
UIWindow
(
frame
:
Device
.
bounds
)
window
!.
rootViewController
=
ViewController
()
window
!.
makeKeyAndVisible
()
}
}
Examples/Programmatic/PresenterCard/PresenterCard/Assets.xcassets/AppIcon.appiconset/Contents.json
0 → 100644
View file @
b701f1b7
{
"images"
:
[
{
"idiom"
:
"iphone"
,
"size"
:
"20x20"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"20x20"
,
"scale"
:
"3x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"29x29"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"29x29"
,
"scale"
:
"3x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"40x40"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"40x40"
,
"scale"
:
"3x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"60x60"
,
"scale"
:
"2x"
},
{
"idiom"
:
"iphone"
,
"size"
:
"60x60"
,
"scale"
:
"3x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"20x20"
,
"scale"
:
"1x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"20x20"
,
"scale"
:
"2x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"29x29"
,
"scale"
:
"1x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"29x29"
,
"scale"
:
"2x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"40x40"
,
"scale"
:
"1x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"40x40"
,
"scale"
:
"2x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"76x76"
,
"scale"
:
"1x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"76x76"
,
"scale"
:
"2x"
},
{
"idiom"
:
"ipad"
,
"size"
:
"83.5x83.5"
,
"scale"
:
"2x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Examples/Programmatic/PresenterCard/PresenterCard/Assets.xcassets/Contents.json
0 → 100644
View file @
b701f1b7
{
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Examples/Programmatic/PresenterCard/PresenterCard/Assets.xcassets/frontier.imageset/Contents.json
0 → 100644
View file @
b701f1b7
{
"images"
:
[
{
"idiom"
:
"universal"
,
"filename"
:
"frontier.jpg"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"version"
:
1
,
"author"
:
"xcode"
}
}
\ No newline at end of file
Examples/Programmatic/PresenterCard/PresenterCard/Assets.xcassets/frontier.imageset/frontier.jpg
0 → 100644
View file @
b701f1b7
This image diff could not be displayed because it is too large. You can
view the blob
instead.
Examples/Programmatic/PresenterCard/PresenterCard/Base.lproj/LaunchScreen.storyboard
0 → 100644
View file @
b701f1b7
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document
type=
"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB"
version=
"3.0"
toolsVersion=
"11134"
systemVersion=
"15F34"
targetRuntime=
"iOS.CocoaTouch"
propertyAccessControl=
"none"
useAutolayout=
"YES"
launchScreen=
"YES"
useTraitCollections=
"YES"
colorMatched=
"YES"
initialViewController=
"01J-lp-oVM"
>
<dependencies>
<plugIn
identifier=
"com.apple.InterfaceBuilder.IBCocoaTouchPlugin"
version=
"11106"
/>
<capability
name=
"documents saved in the Xcode 8 format"
minToolsVersion=
"8.0"
/>
</dependencies>
<scenes>
<!--View Controller-->
<scene
sceneID=
"EHf-IW-A2E"
>
<objects>
<viewController
id=
"01J-lp-oVM"
sceneMemberID=
"viewController"
>
<layoutGuides>
<viewControllerLayoutGuide
type=
"top"
id=
"Llm-lL-Icb"
/>
<viewControllerLayoutGuide
type=
"bottom"
id=
"xb3-aO-Qok"
/>
</layoutGuides>
<view
key=
"view"
contentMode=
"scaleToFill"
id=
"Ze5-6b-2t3"
>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"375"
height=
"667"
/>
<autoresizingMask
key=
"autoresizingMask"
widthSizable=
"YES"
heightSizable=
"YES"
/>
<color
key=
"backgroundColor"
red=
"1"
green=
"1"
blue=
"1"
alpha=
"1"
colorSpace=
"custom"
customColorSpace=
"sRGB"
/>
</view>
</viewController>
<placeholder
placeholderIdentifier=
"IBFirstResponder"
id=
"iYj-Kq-Ea1"
userLabel=
"First Responder"
sceneMemberID=
"firstResponder"
/>
</objects>
<point
key=
"canvasLocation"
x=
"53"
y=
"375"
/>
</scene>
</scenes>
</document>
Examples/Programmatic/PresenterCard/PresenterCard/Info.plist
0 → 100644
View file @
b701f1b7
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
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
>
CFBundleDevelopmentRegion
<
/k
e
y
>
<
string
>
en
<
/string
>
<
k
e
y
>
CFBundleExecutable
<
/k
e
y
>
<
string
>
$
(
EXECUTABLE_NAME
)<
/string
>
<
k
e
y
>
CFBundleIdentifier
<
/k
e
y
>
<
string
>
$
(
PRODUCT_BUNDLE_IDENTIFIER
)<
/string
>
<
k
e
y
>
CFBundleInfoDictionaryVersion
<
/k
e
y
>
<
string
>
6.0
<
/string
>
<
k
e
y
>
CFBundleName
<
/k
e
y
>
<
string
>
$
(
PRODUCT_NAME
)<
/string
>
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
APPL
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
1.0
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
UILaunchStoryboardName
<
/k
e
y
>
<
string
>
LaunchScreen
<
/string
>
<
k
e
y
>
UIRequiredDeviceCapabilities
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
armv7
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
string
>
UIInterfaceOrientationPortraitUpsideDown
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
~
ipad
<
/k
e
y
>
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationPortraitUpsideDown
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
/
d
i
c
t
>
<
/plist
>
Examples/Programmatic/PresenterCard/PresenterCard/ViewController.swift
0 → 100644
View file @
b701f1b7
/*
* 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
ViewController
:
UIViewController
{
private
var
imageView
:
UIImageView
!
private
var
toolbar
:
Toolbar
!
private
var
contentView
:
UILabel
!
private
var
bottomBar
:
Bar
!
private
var
favoriteButton
:
FlatButton
!
private
var
shareButton
:
FlatButton
!
private
var
starButton
:
FlatButton
!
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
Color
.
grey
.
lighten5
prepareImageView
()
prepareToolbar
()
prepareContentView
()
prepareFavoriteButton
()
prepareShareButton
()
prepareStarButton
()
prepareBottomBar
()
prepareImageCard
()
}
private
func
prepareImageView
()
{
imageView
=
UIImageView
()
imageView
.
image
=
UIImage
(
named
:
"frontier.jpg"
)?
.
resize
(
toWidth
:
view
.
width
)
imageView
.
clipsToBounds
=
true
imageView
.
contentMode
=
.
scaleAspectFill
}
private
func
prepareToolbar
()
{
toolbar
=
Toolbar
()
toolbar
.
title
=
"CosmicMind"
toolbar
.
titleLabel
.
textAlignment
=
.
left
toolbar
.
titleLabel
.
textColor
=
Color
.
white
toolbar
.
detail
=
"Build Beautiful Software"
toolbar
.
detailLabel
.
textAlignment
=
.
left
toolbar
.
detailLabel
.
textColor
=
Color
.
white
toolbar
.
contentEdgeInsetsPreset
=
.
square3
toolbar
.
backgroundColor
=
nil
}
private
func
prepareContentView
()
{
contentView
=
UILabel
()
contentView
.
numberOfLines
=
0
contentView
.
text
=
"It’s been a while, have you read any new books lately?"
contentView
.
font
=
RobotoFont
.
regular
(
with
:
14
)
}
private
func
prepareFavoriteButton
()
{
favoriteButton
=
FlatButton
(
image
:
Icon
.
favorite
,
tintColor
:
Color
.
grey
.
base
)
favoriteButton
.
pulse
.
color
=
Color
.
grey
.
base
favoriteButton
.
grid
.
columns
=
4
}
private
func
prepareShareButton
()
{
shareButton
=
FlatButton
(
image
:
Icon
.
cm
.
share
,
tintColor
:
Color
.
grey
.
base
)
shareButton
.
pulse
.
color
=
Color
.
grey
.
base
shareButton
.
grid
.
columns
=
4
}
private
func
prepareStarButton
()
{
starButton
=
FlatButton
(
image
:
Icon
.
cm
.
star
,
tintColor
:
Color
.
grey
.
base
)
starButton
.
pulse
.
color
=
Color
.
grey
.
base
starButton
.
grid
.
columns
=
4
}
private
func
prepareBottomBar
()
{
bottomBar
=
Bar
()
bottomBar
.
backgroundColor
=
nil
bottomBar
.
contentEdgeInsetsPreset
=
.
square1
bottomBar
.
contentView
.
grid
.
views
=
[
favoriteButton
,
shareButton
,
starButton
]
}
private
func
prepareImageCard
()
{
let
card
=
PresenterCard
()
card
.
presenterView
=
imageView
card
.
toolbar
=
toolbar
card
.
contentView
=
contentView
card
.
bottomBar
=
bottomBar
card
.
contentEdgeInsetsPreset
=
.
square3
imageView
?
.
layout
(
toolbar
!
)
.
height
(
toolbar
!.
height
+
32
)
view
.
layout
(
card
)
.
top
(
100
)
.
left
(
20
)
.
right
(
20
)
}
}
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