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
667e7ed7
Commit
667e7ed7
authored
May 31, 2016
by
danieldahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated MaterialView example project to show how to center a view
parent
3d198dfc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
Examples/Programmatic/MaterialView/MaterialView/ViewController.swift
+4
-4
Examples/Programmatic/TextField/TextField.xcodeproj/project.pbxproj
+4
-0
No files found.
Examples/Programmatic/MaterialView/MaterialView/ViewController.swift
View file @
667e7ed7
...
@@ -52,15 +52,15 @@ class ViewController: UIViewController {
...
@@ -52,15 +52,15 @@ class ViewController: UIViewController {
/// Prepares the MaterialView.
/// Prepares the MaterialView.
private
func
prepareMaterialView
()
{
private
func
prepareMaterialView
()
{
let
diameter
:
CGFloat
=
15
0
let
width
:
CGFloat
=
20
0
let
point
:
CGFloat
=
(
MaterialDevice
.
width
-
diameter
)
/
2
let
height
:
CGFloat
=
200
let
materialView
:
MaterialView
=
MaterialView
(
frame
:
CGRectMake
(
point
,
point
,
diameter
,
diameter
))
let
materialView
:
MaterialView
=
MaterialView
(
frame
:
CGRectMake
(
0
,
0
,
width
,
height
))
materialView
.
image
=
UIImage
(
named
:
"CosmicMind"
)
materialView
.
image
=
UIImage
(
named
:
"CosmicMind"
)
materialView
.
shape
=
.
Circle
materialView
.
shape
=
.
Circle
materialView
.
depth
=
.
Depth2
materialView
.
depth
=
.
Depth2
materialView
.
center
=
view
.
center
// Add materialView to UIViewController.
view
.
addSubview
(
materialView
)
view
.
addSubview
(
materialView
)
}
}
}
}
...
...
Examples/Programmatic/TextField/TextField.xcodeproj/project.pbxproj
View file @
667e7ed7
...
@@ -252,10 +252,12 @@
...
@@ -252,10 +252,12 @@
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
INFOPLIST_FILE
=
TextField/Info.plist
;
INFOPLIST_FILE
=
TextField/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.TextField
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.TextField
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
""
;
};
};
name
=
Debug
;
name
=
Debug
;
};
};
...
@@ -264,10 +266,12 @@
...
@@ -264,10 +266,12 @@
buildSettings
=
{
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
CODE_SIGN_IDENTITY
=
"iPhone Developer"
;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]"
=
"iPhone Developer"
;
INFOPLIST_FILE
=
TextField/Info.plist
;
INFOPLIST_FILE
=
TextField/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.TextField
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.TextField
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PROVISIONING_PROFILE
=
""
;
};
};
name
=
Release
;
name
=
Release
;
};
};
...
...
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