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
ca7be84e
Unverified
Commit
ca7be84e
authored
Jun 18, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: added layoutDivider to UIView extension and TableView defaults
parent
7c317d50
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
53 additions
and
13 deletions
+53
-13
Sources/iOS/Bar.swift
+1
-1
Sources/iOS/BottomNavigationController.swift
+1
-1
Sources/iOS/BottomTabBar.swift
+1
-1
Sources/iOS/CollectionView.swift
+2
-2
Sources/iOS/Divider.swift
+5
-0
Sources/iOS/NavigationBar.swift
+1
-1
Sources/iOS/TabBar.swift
+1
-1
Sources/iOS/TableView.swift
+40
-1
Sources/iOS/TableViewCell.swift
+1
-0
Sources/iOS/TextField.swift
+0
-5
No files found.
Sources/iOS/Bar.swift
View file @
ca7be84e
...
...
@@ -260,7 +260,7 @@ open class Bar: View {
grid
.
commit
()
contentView
.
grid
.
commit
()
divider
.
reload
()
layoutDivider
()
}
/**
...
...
Sources/iOS/BottomNavigationController.swift
View file @
ca7be84e
...
...
@@ -101,7 +101,7 @@ open class BottomNavigationController: UITabBarController {
}
}
tabBar
.
divider
.
reload
()
tabBar
.
layoutDivider
()
}
/**
...
...
Sources/iOS/BottomTabBar.swift
View file @
ca7be84e
...
...
@@ -101,7 +101,7 @@ open class BottomTabBar: UITabBar {
}
}
divider
.
reload
()
layoutDivider
()
}
open
override
func
didMoveToSuperview
()
{
...
...
Sources/iOS/CollectionView.swift
View file @
ca7be84e
...
...
@@ -121,8 +121,8 @@ open class CollectionView: UICollectionView {
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
()
{
open
func
prepare
()
{
backgroundColor
=
.
white
contentScaleFactor
=
Screen
.
scale
backgroundColor
=
.
white
}
}
Sources/iOS/Divider.swift
View file @
ca7be84e
...
...
@@ -212,4 +212,9 @@ extension UIView {
divider
.
thickness
=
value
}
}
/// Sets the divider frame.
open
func
layoutDivider
()
{
divider
.
reload
()
}
}
Sources/iOS/NavigationBar.swift
View file @
ca7be84e
...
...
@@ -148,7 +148,7 @@ open class NavigationBar: UINavigationBar {
layoutNavigationItem
(
item
:
v
)
}
divider
.
reload
()
layoutDivider
()
}
open
override
func
pushItem
(
_
item
:
UINavigationItem
,
animated
:
Bool
)
{
...
...
Sources/iOS/TabBar.swift
View file @
ca7be84e
...
...
@@ -268,7 +268,7 @@ open class TabBar: Bar {
grid
.
commit
()
contentView
.
grid
.
commit
()
divider
.
reload
()
layoutDivider
()
let
buttonsWidth
=
buttons
.
reduce
(
0
)
{
$0
+
$1
.
sizeThatFits
(
CGSize
(
width
:
.
greatestFiniteMagnitude
,
height
:
contentView
.
height
))
.
width
+
interimSpace
...
...
Sources/iOS/TableView.swift
View file @
ca7be84e
...
...
@@ -30,4 +30,43 @@
import
UIKit
open
class
TableView
:
UITableView
{}
open
class
TableView
:
UITableView
{
/**
An initializer that initializes the object with a NSCoder object.
- Parameter aDecoder: A NSCoder instance.
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
()
}
public
override
init
(
frame
:
CGRect
,
style
:
UITableViewStyle
)
{
super
.
init
(
frame
:
frame
,
style
:
style
)
prepare
()
}
/**
An initializer that initializes the object.
- Parameter frame: A CGRect defining the view's frame.
*/
public
convenience
init
(
frame
:
CGRect
)
{
self
.
init
(
frame
:
frame
,
style
:
.
plain
)
}
/// A convenience initializer that initializes the object.
public
convenience
init
()
{
self
.
init
(
frame
:
.
zero
)
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
()
{
backgroundColor
=
.
white
contentScaleFactor
=
Screen
.
scale
}
}
Sources/iOS/TableViewCell.swift
View file @
ca7be84e
...
...
@@ -112,6 +112,7 @@ open class TableViewCell: UITableViewCell, Pulseable, PulseableLayer {
layoutShape
()
layoutVisualLayer
()
layoutShadowPath
()
layoutDivider
()
}
/**
...
...
Sources/iOS/TextField.swift
View file @
ca7be84e
...
...
@@ -528,11 +528,6 @@ extension TextField {
button
?
.
frame
=
CGRect
(
x
:
width
-
height
,
y
:
0
,
width
:
height
,
height
:
height
)
}
/// Layout the divider.
fileprivate
func
layoutDivider
()
{
divider
.
reload
()
}
/// Layout the leftView.
fileprivate
func
layoutLeftView
()
{
guard
let
v
=
leftView
else
{
...
...
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