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
ae1deec3
Unverified
Commit
ae1deec3
authored
Sep 10, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: added TitleCard
parent
d3ed140b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
132 additions
and
0 deletions
+132
-0
Material.xcodeproj/project.pbxproj
+16
-0
Sources/iOS/Checkbox.swift
+9
-0
Sources/iOS/TitleCard.swift
+107
-0
No files found.
Material.xcodeproj/project.pbxproj
View file @
ae1deec3
...
...
@@ -12,6 +12,8 @@
96230AB81D6A520C00AF47DC
/* Divider.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96230AB71D6A520C00AF47DC
/* Divider.swift */
;
};
96264BE71D833D2800576F37
/* Reminders.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96264BE61D833D2800576F37
/* Reminders.swift */
;
};
96264BE91D833D3400576F37
/* RemindersController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96264BE81D833D3400576F37
/* RemindersController.swift */
;
};
96264C0E1D84051900576F37
/* Checkbox.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96264C0D1D84051900576F37
/* Checkbox.swift */
;
};
96264C121D840B5F00576F37
/* TitleCard.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96264C111D840B5F00576F37
/* TitleCard.swift */
;
};
9628645A1D53FE3E00690B69
/* Material+UIWindow.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
962864591D53FE3E00690B69
/* Material+UIWindow.swift */
;
};
9628645F1D540AF300690B69
/* DynamicFontType.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9628645E1D540AF300690B69
/* DynamicFontType.swift */
;
};
962864621D54111D00690B69
/* JSON.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
962864611D54111D00690B69
/* JSON.swift */
;
};
...
...
@@ -205,6 +207,8 @@
96230AB71D6A520C00AF47DC
/* Divider.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Divider.swift
;
sourceTree
=
"<group>"
;
};
96264BE61D833D2800576F37
/* Reminders.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Reminders.swift
;
sourceTree
=
"<group>"
;
};
96264BE81D833D3400576F37
/* RemindersController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RemindersController.swift
;
sourceTree
=
"<group>"
;
};
96264C0D1D84051900576F37
/* Checkbox.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Checkbox.swift
;
sourceTree
=
"<group>"
;
};
96264C111D840B5F00576F37
/* TitleCard.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
TitleCard.swift
;
sourceTree
=
"<group>"
;
};
962864591D53FE3E00690B69
/* Material+UIWindow.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"Material+UIWindow.swift"
;
sourceTree
=
"<group>"
;
};
9628645E1D540AF300690B69
/* DynamicFontType.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DynamicFontType.swift
;
sourceTree
=
"<group>"
;
};
962864611D54111D00690B69
/* JSON.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
JSON.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -361,6 +365,14 @@
name
=
Reminders
;
sourceTree
=
"<group>"
;
};
96264C0C1D84050200576F37
/* Checkbox */
=
{
isa
=
PBXGroup
;
children
=
(
96264C0D1D84051900576F37
/* Checkbox.swift */
,
);
name
=
Checkbox
;
sourceTree
=
"<group>"
;
};
962864601D5410FD00690B69
/* JSON */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -532,6 +544,7 @@
96BCB8031CB40F4B00C806FE
/* Button */
,
96BCB8021CB40F3B00C806FE
/* Card */
,
96BCB7FF1CB40EF000C806FE
/* Capture */
,
96264C0C1D84050200576F37
/* Checkbox */
,
96BCB8051CB40F9C00C806FE
/* Collection */
,
963FBF061D669795008F8512
/* ContentView */
,
96BCB8001CB40F0300C806FE
/* Color */
,
...
...
@@ -617,6 +630,7 @@
96BCB8021CB40F3B00C806FE
/* Card */
=
{
isa
=
PBXGroup
;
children
=
(
96264C111D840B5F00576F37
/* TitleCard.swift */
,
96BCB75D1CB40DC500C806FE
/* Card.swift */
,
96BCB7621CB40DC500C806FE
/* ImageCard.swift */
,
);
...
...
@@ -1127,11 +1141,13 @@
96BCB7CD1CB40DC500C806FE
/* PulseView.swift in Sources */
,
96BCB7DA1CB40DC500C806FE
/* NavigationController.swift in Sources */
,
96BCB7A81CB40DC500C806FE
/* FabButton.swift in Sources */
,
96264C121D840B5F00576F37
/* TitleCard.swift in Sources */
,
96BCB7E41CB40DC500C806FE
/* Text.swift in Sources */
,
96BCB7AB1CB40DC500C806FE
/* ImageCard.swift in Sources */
,
96BCB7CB1CB40DC500C806FE
/* PulseAnimation.swift in Sources */
,
96BCB7AE1CB40DC500C806FE
/* Material+UIFont.swift in Sources */
,
96BCB7D91CB40DC500C806FE
/* NavigationBar.swift in Sources */
,
96264C0E1D84051900576F37
/* Checkbox.swift in Sources */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
};
...
...
Sources/iOS/Checkbox.swift
0 → 100644
View file @
ae1deec3
//
// Checkbox.swift
// Material
//
// Created by Daniel Dahan on 2016-09-10.
// Copyright © 2016 CosmicMind, Inc. All rights reserved.
//
import
Foundation
Sources/iOS/TitleCard.swift
0 → 100644
View file @
ae1deec3
/*
* 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
open
class
TitleCard
:
PulseView
{
/// An internal reference to the titleBar.
internal
var
internalTitleBar
:
Toolbar
?
/// A reference to the titleBar.
open
var
titleBar
:
Toolbar
{
prepareTitleBar
()
return
internalTitleBar
!
}
/// An internal reference to the contentView.
internal
var
internalContentView
:
UIView
?
/// A reference to the contentView.
open
var
contentView
:
UIView
{
prepareContentView
()
return
internalContentView
!
}
/// An internal reference to the detailBar.
internal
var
internalDetailBar
:
Toolbar
?
/// A reference to the detailBar.
open
var
detailBar
:
Toolbar
{
prepareDetailBar
()
return
internalDetailBar
!
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
when subclassing.
*/
open
override
func
prepareView
()
{
super
.
prepareView
()
pulseAnimation
=
.
none
}
/// Reloads the
open
func
reload
()
{
// clear constraints so new ones do not conflict
removeConstraints
(
constraints
)
for
v
in
subviews
{
v
.
removeFromSuperview
()
}
}
/// Prepares the titleBar.
private
func
prepareTitleBar
()
{
guard
nil
==
internalTitleBar
else
{
return
}
internalTitleBar
=
Toolbar
()
}
/// Prepares the contentView.
private
func
prepareContentView
()
{
guard
nil
==
internalContentView
else
{
return
}
internalContentView
=
UIView
()
}
/// Prepares the detailBar.
private
func
prepareDetailBar
()
{
guard
nil
==
internalDetailBar
else
{
return
}
internalDetailBar
=
Toolbar
()
}
}
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