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
fa10e98d
Commit
fa10e98d
authored
Jul 25, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working copy of TabBar scrollable
parent
d89f0976
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
27 deletions
+25
-27
Material.xcodeproj/project.pbxproj
+0
-14
Sources/Info.plist
+1
-1
Sources/iOS/PageTabBarController.swift
+0
-0
Sources/iOS/TabBar.swift
+17
-10
Sources/iOS/TabsController.swift
+7
-2
No files found.
Material.xcodeproj/project.pbxproj
View file @
fa10e98d
...
...
@@ -98,7 +98,6 @@
965E81211DD4D5C800D61E4B
/* TextStorage.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB79D1CB40DC500C806FE
/* TextStorage.swift */
;
};
965E81221DD4D5C800D61E4B
/* TextView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96BCB79E1CB40DC500C806FE
/* TextView.swift */
;
};
965E81261DD4D7C800D61E4B
/* CharacterAttribute.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
961276621DCD8B1800A7D920
/* CharacterAttribute.swift */
;
};
966995491F1433C30064E7E4
/* PageTabBarController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
966995481F1433C30064E7E4
/* PageTabBarController.swift */
;
};
966C17731F0439F600D3E83C
/* Material+MotionAnimation.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
966C17721F0439F600D3E83C
/* Material+MotionAnimation.swift */
;
};
9685D5AF1F0F04CB00AFEB79
/* CardCollectionViewCell.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9656895E1F002F16001C656D
/* CardCollectionViewCell.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
9685D5B01F0F04CB00AFEB79
/* CardCollectionViewController.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
965689601F002F4C001C656D
/* CardCollectionViewController.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
...
...
@@ -205,7 +204,6 @@
96E3C39A1D3A1CC20086A024
/* ErrorTextField.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
961F18E71CD93E3E008927C5
/* ErrorTextField.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96E3C39C1D3A1CC20086A024
/* Offset.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
968C99461D377849000074FF
/* Offset.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96F1A5531F24F17A001D8CAF
/* TabsController.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96E09DC71F2287E50000B121
/* TabsController.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
96FE06C71F15348400E34953
/* PageTabBarController.swift in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
966995481F1433C30064E7E4
/* PageTabBarController.swift */
;
settings
=
{
ATTRIBUTES
=
(
Public
,
);
};
};
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
...
...
@@ -230,7 +228,6 @@
9656895E1F002F16001C656D
/* CardCollectionViewCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CardCollectionViewCell.swift
;
sourceTree
=
"<group>"
;
};
965689601F002F4C001C656D
/* CardCollectionViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CardCollectionViewController.swift
;
sourceTree
=
"<group>"
;
};
9658F2161CD6FA4700B902C1
/* IconButton.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
IconButton.swift
;
sourceTree
=
"<group>"
;
};
966995481F1433C30064E7E4
/* PageTabBarController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
PageTabBarController.swift
;
sourceTree
=
"<group>"
;
};
966C17721F0439F600D3E83C
/* Material+MotionAnimation.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"Material+MotionAnimation.swift"
;
sourceTree
=
"<group>"
;
};
966ECF291CF4C20100BB0BDF
/* CollectionReusableView.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
CollectionReusableView.swift
;
sourceTree
=
"<group>"
;
};
967A48181D0F425A00B8CEB7
/* StatusBarController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
StatusBarController.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -512,14 +509,6 @@
name
=
CardCollectionView
;
sourceTree
=
"<group>"
;
};
966995471F1433640064E7E4
/* PageTabBar */
=
{
isa
=
PBXGroup
;
children
=
(
966995481F1433C30064E7E4
/* PageTabBarController.swift */
,
);
name
=
PageTabBar
;
sourceTree
=
"<group>"
;
};
966ECF2B1CF4C21B00BB0BDF
/* Table */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -570,7 +559,6 @@
96BCB8041CB40F6C00C806FE
/* Layout */
,
96BCB8011CB40F1700C806FE
/* Navigation */
,
961E6BEF1DDA4B04004E6C93
/* NavigationDrawer */
,
966995471F1433640064E7E4
/* PageTabBar */
,
9626CA951DAB5370003E2611
/* Root */
,
961E6BE01DDA2ADD004E6C93
/* Screen */
,
963FBF031D6696EF008F8512
/* SearchBar */
,
...
...
@@ -926,7 +914,6 @@
9685D5AF1F0F04CB00AFEB79
/* CardCollectionViewCell.swift in Headers */
,
9685D5B01F0F04CB00AFEB79
/* CardCollectionViewController.swift in Headers */
,
9685D5B11F0F04CB00AFEB79
/* Material+MotionAnimation.swift in Headers */
,
96FE06C71F15348400E34953
/* PageTabBarController.swift in Headers */
,
96F1A5531F24F17A001D8CAF
/* TabsController.swift in Headers */
,
);
runOnlyForDeploymentPostprocessing
=
0
;
...
...
@@ -1049,7 +1036,6 @@
965E811F1DD4D5C800D61E4B
/* ErrorTextField.swift in Sources */
,
965E81211DD4D5C800D61E4B
/* TextStorage.swift in Sources */
,
965E81221DD4D5C800D61E4B
/* TextView.swift in Sources */
,
966995491F1433C30064E7E4
/* PageTabBarController.swift in Sources */
,
965E80E71DD4C55200D61E4B
/* Material+UIView.swift in Sources */
,
96DE3CD41F269BF00035F7AF
/* MotionViewPropertyViewContext.swift in Sources */
,
965E80E81DD4C55200D61E4B
/* Material+CALayer.swift in Sources */
,
...
...
Sources/Info.plist
View file @
fa10e98d
...
...
@@ -15,7 +15,7 @@
<
k
e
y
>
CFBundlePackageType
<
/k
e
y
>
<
string
>
FMWK
<
/string
>
<
k
e
y
>
CFBundleShortVersionString
<
/k
e
y
>
<
string
>
2.
7
.0
<
/string
>
<
string
>
2.
8
.0
<
/string
>
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
...
...
Sources/iOS/PageTabBarController.swift
deleted
100755 → 0
View file @
d89f0976
This diff is collapsed.
Click to expand it.
Sources/iOS/TabBar.swift
View file @
fa10e98d
...
...
@@ -59,7 +59,7 @@ public protocol TabBarDelegate {
@objc(TabBarStyle)
public
enum
TabBarStyle
:
Int
{
case
normal
case
`
default
`
case
scrollable
}
...
...
@@ -78,7 +78,7 @@ open class TabBar: Bar {
}
/// An enum that determines the tab bar style.
open
var
tabBarStyle
=
TabBarStyle
.
scrollable
{
open
var
tabBarStyle
=
TabBarStyle
.
default
{
didSet
{
layoutSubviews
()
}
...
...
@@ -325,23 +325,25 @@ open class TabBar: Bar {
open
override
func
prepare
()
{
super
.
prepare
()
contentEdgeInsetsPreset
=
.
none
interimSpacePreset
=
.
interimSpace5
interimSpacePreset
=
.
interimSpace6
prepareContentView
()
prepareScrollView
()
prepareDivider
()
prepareLine
()
}
}
extension
TabBar
{
fileprivate
extension
TabBar
{
// Prepares the line.
f
ileprivate
f
unc
prepareLine
()
{
line
.
zPosition
=
6
000
func
prepareLine
()
{
line
.
zPosition
=
10
000
lineColor
=
Color
.
blue
.
base
lineHeight
=
3
}
/// Prepares the divider.
fileprivate
func
prepareDivider
()
{
func
prepareDivider
()
{
dividerColor
=
Color
.
grey
.
lighten3
dividerAlignment
=
.
top
}
...
...
@@ -349,13 +351,18 @@ extension TabBar {
Prepares the line animation handlers.
- Parameter button: A UIButton.
*/
f
ileprivate
f
unc
prepareLineAnimationHandler
(
button
:
UIButton
)
{
func
prepareLineAnimationHandler
(
button
:
UIButton
)
{
removeLineAnimationHandler
(
button
:
button
)
button
.
addTarget
(
self
,
action
:
#selector(
handleLineAnimation(button:)
)
,
for
:
.
touchUpInside
)
}
/// Prepares the contentView.
func
prepareContentView
()
{
contentView
.
zPosition
=
6000
}
/// Prepares the scroll view.
f
ileprivate
f
unc
prepareScrollView
()
{
func
prepareScrollView
()
{
scrollView
.
isPagingEnabled
=
false
scrollView
.
showsVerticalScrollIndicator
=
false
scrollView
.
showsHorizontalScrollIndicator
=
false
...
...
@@ -420,7 +427,7 @@ extension TabBar {
line
.
animate
(
.
duration
(
0.25
),
.
size
(
CGSize
(
width
:
button
.
width
,
height
:
lineHeight
)),
.
position
(
CGPoint
(
x
:
button
.
center
.
x
,
y
:
.
bottom
==
lineAlignment
?
height
-
lineHeight
:
0
)),
.
position
(
CGPoint
(
x
:
button
.
center
.
x
,
y
:
.
bottom
==
lineAlignment
?
height
-
lineHeight
/
2
:
lineHeight
/
2
)),
.
completion
{
[
weak
self
,
isTriggeredByUserInteraction
=
isTriggeredByUserInteraction
,
button
=
button
,
completion
=
completion
]
_
in
guard
let
s
=
self
else
{
return
...
...
Sources/iOS/TabsController.swift
View file @
fa10e98d
...
...
@@ -32,7 +32,12 @@ import UIKit
fileprivate
var
TabItemKey
:
UInt8
=
0
open
class
TabItem
:
FlatButton
{}
open
class
TabItem
:
FlatButton
{
open
override
func
prepare
()
{
super
.
prepare
()
pulseAnimation
=
.
none
}
}
@objc(TabBarAlignment)
public
enum
TabBarAlignment
:
Int
{
...
...
@@ -307,7 +312,7 @@ fileprivate extension TabsController {
fileprivate
extension
TabsController
{
/**
Handles the
pageTabBarButton
.
Handles the
tabItem
.
- Parameter button: A UIButton.
*/
@objc
...
...
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