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
ebaf45a1
Commit
ebaf45a1
authored
May 22, 2017
by
Daniel Dahan
Committed by
GitHub
May 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pr-review' into scrollable-tabbar
parents
b8799024
d12b0cb0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
Sources/iOS/TabBar.swift
+4
-1
Sources/iOS/TabsController.swift
+5
-3
No files found.
Sources/iOS/TabBar.swift
View file @
ebaf45a1
...
...
@@ -282,7 +282,7 @@ open class TabBar: Bar {
for
b
in
buttons
{
let
width
=
b
.
sizeThatFits
(
CGSize
(
width
:
CGFloat
.
greatestFiniteMagnitude
,
height
:
contentView
.
height
))
.
width
+
interimSpace
scrollView
.
addSubview
(
b
)
b
.
height
=
content
View
.
height
b
.
height
=
scroll
View
.
height
b
.
width
=
width
b
.
x
=
w
w
+=
width
...
...
@@ -310,6 +310,8 @@ open class TabBar: Bar {
}
}
scrollView
.
frame
=
contentView
.
bounds
if
nil
==
selected
{
selected
=
buttons
.
first
}
...
...
@@ -340,6 +342,7 @@ extension TabBar {
line
.
zPosition
=
6000
lineColor
=
Color
.
blue
.
base
lineHeight
=
3
scrollView
.
addSubview
(
line
)
}
/// Prepares the divider.
...
...
Sources/iOS/TabsController.swift
View file @
ebaf45a1
...
...
@@ -375,8 +375,7 @@ extension TabsController {
return
}
let
p
=
v
.
height
let
y
=
view
.
height
-
p
let
y
=
view
.
height
-
v
.
height
v
.
width
=
view
.
width
...
...
@@ -469,6 +468,9 @@ extension TabsController {
guard
i
!=
selectedIndex
else
{
return
}
// removeViewControllers()
// prepareViewControllersForTransition(from: selectedIndex, to: i)
selectedIndex
=
i
v
.
select
(
at
:
i
)
...
...
@@ -490,7 +492,7 @@ extension TabsController: UIScrollViewDelegate {
removeViewControllers
()
prepareViewControllers
()
prepareTabBar
()
//
prepareTabBar()
layoutSubviews
()
}
}
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