Skip to content

Commit 60b76db

Browse files
committed
Add Floating TabBarController
1 parent ec41a81 commit 60b76db

10 files changed

Lines changed: 498 additions & 37 deletions

File tree

.gitignore

Lines changed: 143 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,144 @@
1-
.DS_Store
2-
/.build
3-
/Packages
4-
/*.xcodeproj
5-
xcuserdata/
1+
2+
# Created by https://www.gitignore.io/api/swift,xcode,Cobjective-c,osx
3+
4+
#!! ERROR: cobjective-c is undefined. Use list command to see defined gitignore types !!#
5+
6+
### OSX ###
7+
*.DS_Store
8+
.AppleDouble
9+
.LSOverride
10+
11+
# Icon must end with two \r
12+
Icon
13+
14+
# Thumbnails
15+
._*
16+
17+
# Files that might appear in the root of a volume
18+
.DocumentRevisions-V100
19+
.fseventsd
20+
.Spotlight-V100
21+
.TemporaryItems
22+
.Trashes
23+
.VolumeIcon.icns
24+
.com.apple.timemachine.donotpresent
25+
26+
# Directories potentially created on remote AFP share
27+
.AppleDB
28+
.AppleDesktop
29+
Network Trash Folder
30+
Temporary Items
31+
.apdisk
32+
33+
### Swift ###
34+
# Xcode
35+
#
36+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
37+
38+
## Build generated
39+
build/
640
DerivedData/
7-
.swiftpm/config/registries.json
8-
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
9-
.netrc
41+
42+
## Various settings
43+
*.pbxuser
44+
!default.pbxuser
45+
*.mode1v3
46+
!default.mode1v3
47+
*.mode2v3
48+
!default.mode2v3
49+
*.perspectivev3
50+
!default.perspectivev3
51+
# xcuserdata/
52+
53+
## Other
54+
*.moved-aside
55+
*.xccheckout
56+
*.xcscmblueprint
57+
58+
## Obj-C/Swift specific
59+
*.hmap
60+
*.ipa
61+
*.dSYM.zip
62+
*.dSYM
63+
64+
## Playgrounds
65+
timeline.xctimeline
66+
playground.xcworkspace
67+
# *.xcworkspace
68+
Podfile.lock
69+
70+
# Swift Package Manager
71+
#
72+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
73+
# Packages/
74+
# Package.pins
75+
.build/
76+
77+
# CocoaPods - Refactored to standalone file
78+
79+
# Carthage - Refactored to standalone file
80+
81+
# fastlane
82+
#
83+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
84+
# screenshots whenever they are needed.
85+
# For more information about the recommended setup visit:
86+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
87+
88+
fastlane/report.xml
89+
fastlane/Preview.html
90+
#fastlane/screenshots
91+
fastlane/test_output
92+
93+
### Swift.CocoaPods Stack ###
94+
## CocoaPods GitIgnore Template
95+
96+
# CocoaPods - Only use to conserve bandwidth / Save time on Pushing
97+
# - Also handy if you have a lage number of dependant pods
98+
# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGONRE THE LOCK FILE
99+
Pods/
100+
101+
### Swift.Carthage Stack ###
102+
# Carthage
103+
#
104+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
105+
# Carthage/Checkouts
106+
107+
Carthage/Build
108+
109+
### Xcode ###
110+
# Xcode
111+
#
112+
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
113+
114+
## Build generated
115+
116+
## Various settings
117+
118+
## Other
119+
120+
### Xcode Patch ###
121+
# *.xcodeproj/*
122+
# !*.xcodeproj/project.pbxproj
123+
# !*.xcodeproj/xcshareddata/
124+
# !*.xcworkspace/contents.xcworkspacedata
125+
# /*.gcno
126+
*.xcodeproj/xcuserdata/*
127+
*xcuserdata/*
128+
*.generated.swift
129+
130+
# End of https://www.gitignore.io/api/swift,xcode,Cobjective-c,osx
131+
.idea/
132+
# BuildTools/Package.resolved
133+
fastlane/.env
134+
vendor/
135+
Templates/
136+
fastlane/README.md
137+
fastlane/output/
138+
Index/
139+
Logs/
140+
ModuleCache.noindex/
141+
SourcePackages/
142+
TestResults/
143+
fastlane/apple-app-site-association
144+
*.xcodeproj/project.xcworkspace/xcuserdata/

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>EKTabBarController.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
<key>SnapKitPlayground (Playground) 1.xcscheme</key>
13+
<dict>
14+
<key>isShown</key>
15+
<false/>
16+
<key>orderHint</key>
17+
<integer>2</integer>
18+
</dict>
19+
<key>SnapKitPlayground (Playground) 2.xcscheme</key>
20+
<dict>
21+
<key>isShown</key>
22+
<false/>
23+
<key>orderHint</key>
24+
<integer>3</integer>
25+
</dict>
26+
<key>SnapKitPlayground (Playground).xcscheme</key>
27+
<dict>
28+
<key>isShown</key>
29+
<false/>
30+
<key>orderHint</key>
31+
<integer>1</integer>
32+
</dict>
33+
</dict>
34+
<key>SuppressBuildableAutocreation</key>
35+
<dict>
36+
<key>EKTabBarController</key>
37+
<dict>
38+
<key>primary</key>
39+
<true/>
40+
</dict>
41+
<key>EKTabBarControllerTests</key>
42+
<dict>
43+
<key>primary</key>
44+
<true/>
45+
</dict>
46+
</dict>
47+
</dict>
48+
</plist>

Package.resolved

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
1-
// swift-tools-version: 5.7
1+
// swift-tools-version: 5.6
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33

44
import PackageDescription
55

66
let package = Package(
77
name: "EKTabBarController",
8-
products: [
9-
// Products define the executables and libraries a package produces, and make them visible to other packages.
10-
.library(
11-
name: "EKTabBarController",
12-
targets: ["EKTabBarController"]),
13-
],
14-
dependencies: [
15-
// Dependencies declare other packages that this package depends on.
16-
// .package(url: /* package url */, from: "1.0.0"),
17-
],
18-
targets: [
19-
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
20-
// Targets can depend on other targets in this package, and on products in packages this package depends on.
21-
.target(
22-
name: "EKTabBarController",
23-
dependencies: []),
24-
.testTarget(
25-
name: "EKTabBarControllerTests",
26-
dependencies: ["EKTabBarController"]),
27-
]
8+
platforms: [.iOS(.v13)],
9+
products: [.library(name: "EKTabBarController", targets: ["EKTabBarController"])],
10+
dependencies: [.package(url: "https://github.com/SnapKit/SnapKit.git", from: "5.0.1")],
11+
targets:
12+
[
13+
.target(name: "EKTabBarController", dependencies: ["SnapKit"]),
14+
.testTarget(name: "EKTabBarControllerTests", dependencies: ["EKTabBarController"]),
15+
]
2816
)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# EKTabBarController
22

3-
A description of this package.
3+
Floating TabBar
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//
2+
// EKControllerItem.swift
3+
// EKTabBarController
4+
//
5+
// Created by Emil Karimov on 14.07.2022.
6+
// Copyright © 2022 Emil Karimov. All rights reserved.
7+
//
8+
9+
import UIKit
10+
11+
public struct EKControllerItem {
12+
13+
let tabBarButtonItem: UITabBarItem
14+
let viewController: UIViewController
15+
16+
public init(tabBarButtonItem: UITabBarItem, viewController: UIViewController) {
17+
self.tabBarButtonItem = tabBarButtonItem
18+
self.viewController = viewController
19+
}
20+
21+
}

0 commit comments

Comments
 (0)