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
ef355c28
Commit
ef355c28
authored
Sep 26, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing conflicted files
parent
6b0bd134
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
7 deletions
+37
-7
Sources/iOS/ChipBarController.swift
+1
-1
Sources/iOS/CollectionView.swift
+6
-2
Sources/iOS/Layer.swift
+4
-2
Sources/iOS/TextField.swift
+2
-2
Sources/iOS/Toolbar.swift
+24
-0
No files found.
Sources/iOS/ChipBarController.swift
View file @
ef355c28
...
@@ -45,7 +45,7 @@ extension UIViewController {
...
@@ -45,7 +45,7 @@ extension UIViewController {
This is the recommended method of accessing the ChipBarController
This is the recommended method of accessing the ChipBarController
through child UIViewControllers.
through child UIViewControllers.
*/
*/
public
var
chip
s
Controller
:
ChipBarController
?
{
public
var
chip
Bar
Controller
:
ChipBarController
?
{
return
traverseViewControllerHierarchyForClassType
()
return
traverseViewControllerHierarchyForClassType
()
}
}
}
}
...
...
Sources/iOS/CollectionView.swift
View file @
ef355c28
...
@@ -114,13 +114,17 @@ open class CollectionView: UICollectionView {
...
@@ -114,13 +114,17 @@ open class CollectionView: UICollectionView {
- Parameter frame: A CGRect defining the view's frame.
- Parameter frame: A CGRect defining the view's frame.
*/
*/
public
init
(
frame
:
CGRect
)
{
public
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
,
collectionViewLayout
:
CollectionViewLayout
())
let
layout
=
UICollectionViewFlowLayout
()
layout
.
itemSize
=
CGSize
(
width
:
100
,
height
:
100
)
super
.
init
(
frame
:
frame
,
collectionViewLayout
:
layout
)
prepare
()
prepare
()
}
}
/// A convenience initializer that initializes the object.
/// A convenience initializer that initializes the object.
public
init
()
{
public
init
()
{
super
.
init
(
frame
:
.
zero
,
collectionViewLayout
:
CollectionViewLayout
())
let
layout
=
UICollectionViewFlowLayout
()
layout
.
itemSize
=
CGSize
(
width
:
100
,
height
:
100
)
super
.
init
(
frame
:
.
zero
,
collectionViewLayout
:
layout
)
prepare
()
prepare
()
}
}
...
...
Sources/iOS/Layer.swift
View file @
ef355c28
...
@@ -160,16 +160,18 @@ open class Layer: CAShapeLayer {
...
@@ -160,16 +160,18 @@ open class Layer: CAShapeLayer {
layoutVisualLayer
()
layoutVisualLayer
()
layoutShadowPath
()
layoutShadowPath
()
}
}
}
fileprivate
extension
Layer
{
/// Prepares the visualLayer property.
/// Prepares the visualLayer property.
open
func
prepareVisualLayer
()
{
func
prepareVisualLayer
()
{
visualLayer
.
zPosition
=
0
visualLayer
.
zPosition
=
0
visualLayer
.
masksToBounds
=
true
visualLayer
.
masksToBounds
=
true
addSublayer
(
visualLayer
)
addSublayer
(
visualLayer
)
}
}
/// Manages the layout for the visualLayer property.
/// Manages the layout for the visualLayer property.
internal
func
layoutVisualLayer
()
{
func
layoutVisualLayer
()
{
visualLayer
.
frame
=
bounds
visualLayer
.
frame
=
bounds
visualLayer
.
cornerRadius
=
cornerRadius
visualLayer
.
cornerRadius
=
cornerRadius
}
}
...
...
Sources/iOS/TextField.swift
View file @
ef355c28
...
@@ -566,7 +566,7 @@ fileprivate extension TextField {
...
@@ -566,7 +566,7 @@ fileprivate extension TextField {
case
.
left
,
.
natural
:
case
.
left
,
.
natural
:
placeholderLabel
.
frame
.
origin
.
x
=
w
+
placeholderHorizontalOffset
placeholderLabel
.
frame
.
origin
.
x
=
w
+
placeholderHorizontalOffset
case
.
right
:
case
.
right
:
placeholderLabel
.
frame
.
origin
.
x
=
bounds
.
width
-
placeholderLabel
.
bounds
.
width
-
textInset
+
placeholderHorizontalOffset
placeholderLabel
.
frame
.
origin
.
x
=
(
bounds
.
width
*
(
1.0
-
placeholderActiveScale
))
-
textInset
+
placeholderHorizontalOffset
default
:
break
default
:
break
}
}
...
@@ -707,7 +707,7 @@ extension TextField {
...
@@ -707,7 +707,7 @@ extension TextField {
case
.
left
,
.
natural
:
case
.
left
,
.
natural
:
s
.
placeholderLabel
.
frame
.
origin
.
x
=
s
.
leftViewWidth
+
s
.
textInset
+
s
.
placeholderHorizontalOffset
s
.
placeholderLabel
.
frame
.
origin
.
x
=
s
.
leftViewWidth
+
s
.
textInset
+
s
.
placeholderHorizontalOffset
case
.
right
:
case
.
right
:
s
.
placeholderLabel
.
frame
.
origin
.
x
=
s
.
bounds
.
width
-
s
.
placeholderLabel
.
bounds
.
width
-
s
.
textInset
+
s
.
placeholderHorizontalOffset
s
.
placeholderLabel
.
frame
.
origin
.
x
=
(
s
.
bounds
.
width
*
(
1.0
-
s
.
placeholderActiveScale
))
-
s
.
textInset
+
s
.
placeholderHorizontalOffset
default
:
break
default
:
break
}
}
...
...
Sources/iOS/Toolbar.swift
View file @
ef355c28
...
@@ -33,10 +33,34 @@ import UIKit
...
@@ -33,10 +33,34 @@ import UIKit
fileprivate
var
ToolbarContext
:
UInt8
=
0
fileprivate
var
ToolbarContext
:
UInt8
=
0
open
class
Toolbar
:
Bar
{
open
class
Toolbar
:
Bar
{
/// A convenience property to set the titleLabel.text.
@IBInspectable
open
var
title
:
String
?
{
get
{
return
titleLabel
.
text
}
set
(
value
)
{
titleLabel
.
text
=
value
layoutSubviews
()
}
}
/// Title label.
/// Title label.
@IBInspectable
@IBInspectable
open
let
titleLabel
=
UILabel
()
open
let
titleLabel
=
UILabel
()
/// A convenience property to set the detailLabel.text.
@IBInspectable
open
var
detail
:
String
?
{
get
{
return
detailLabel
.
text
}
set
(
value
)
{
detailLabel
.
text
=
value
layoutSubviews
()
}
}
/// Detail label.
/// Detail label.
@IBInspectable
@IBInspectable
open
let
detailLabel
=
UILabel
()
open
let
detailLabel
=
UILabel
()
...
...
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