@@ -25,3 +25,79 @@ To install it, simply add the following line to your Podfile:
25
25
pod ' TopTabBarView' , git: ' https://github.com/parthgohel2810/TopTabBarView-Framework.git' , branch: ' main'
26
26
```
27
27
Then run ` pod install ` from the Example directory.
28
+
29
+ ## Usage
30
+
31
+ 1 . Change the class of a view from UIView to CustomRadarView
32
+ ``` swift
33
+ @IBOutlet private weak var topTabBarView: TopTabbarView!
34
+ ```
35
+ 2 . Programmatically:
36
+
37
+ ``` swift
38
+ let topTabBarView = TopTabbarView (frame : myFrame)
39
+
40
+ ```
41
+
42
+ ## Customization
43
+
44
+ ``` swift
45
+ private func configureTabBarItem () {
46
+
47
+ topTabBarView.dataSource = [" M" , " I" , " N" , " D" , " I" , " N" , " V" , " E" , " N" , " T" , " O" , " R" , " Y" ]
48
+ topTabBarView.dotColor = .white
49
+ topTabBarView.waveHeight = 16
50
+ topTabBarView.leftPadding = 10
51
+ topTabBarView.rightPadding = 10
52
+ topTabBarView.tabBarColor = .red
53
+ topTabBarView.onItemSelected = { (index) in
54
+ debugPrint (" tabIndex: \( index ) " )
55
+ }
56
+ topTabBarView.isScaleItem = true
57
+ topTabBarView.tabBarItemStyle = .setStyle (font : UIFont.boldSystemFont (ofSize : 18 ),
58
+ foregroundColor : .white )
59
+ }
60
+ ```
61
+
62
+ #### dataSource
63
+ The dataSource property accepts string array which is used to display title of tab and creates number of tab that you want to create.
64
+
65
+ #### dotColor
66
+ The dotColor property change the color of dot which is place at center of wave.
67
+
68
+ #### waveHeight
69
+ The waveHeight property change height of wave.
70
+
71
+ #### leftPadding, rightPadding
72
+ The left and right padding property will change the tabBar left and right padding to the view.
73
+
74
+ #### tabBarColor
75
+ The tabBarColor property used to change background color of tabbar color.
76
+
77
+ #### isScaleItem
78
+ The isScaleItem property enables you to off/on scaling of tab titles.
79
+
80
+ #### tabBarItemStyle
81
+ The tabBarItemStyle used to tabBarItem font and textColor.
82
+
83
+ #### onItemSelected
84
+ You will receive selected tab index in onItemSelected clouser.
85
+ ``` swift
86
+ topTabBarView.onItemSelected = { (index) in
87
+ debugPrint (" tabIndex: \( index ) " )
88
+ }
89
+ ```
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
0 commit comments