Skip to content

Commit

Permalink
Merge pull request #35 from SimformSolutionsPvtLtd/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mobile-simformsolutions authored Nov 29, 2022
2 parents 832abe6 + 683973e commit 35ebe49
Show file tree
Hide file tree
Showing 13 changed files with 250 additions and 135 deletions.
8 changes: 8 additions & 0 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions Example/SSCustomTabbar/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Ywu-vc-HiU">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Ywu-vc-HiU">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -16,20 +16,20 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DoU-IX-JHd">
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DoU-IX-JHd">
<rect key="frame" x="164.5" y="318.5" width="46" height="30"/>
<state key="normal" title="Button"/>
<connections>
<action selector="onTappedPush:" destination="BYZ-38-t0r" eventType="touchUpInside" id="n6B-DO-Y4T"/>
</connections>
</button>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="DoU-IX-JHd" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="1zy-1n-oNj"/>
<constraint firstItem="DoU-IX-JHd" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="7ab-Ax-wqk"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<navigationItem key="navigationItem" id="RkE-wQ-nee"/>
</viewController>
Expand All @@ -44,8 +44,8 @@
<view key="view" contentMode="scaleToFill" id="fES-8V-R0J">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="Ke7-ya-puI"/>
<color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<tabBarItem key="tabBarItem" title="Chat" image="iconChat" selectedImage="iconChatSelected" id="1bB-bl-zhP"/>
</viewController>
Expand All @@ -72,8 +72,9 @@
<color key="value" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="waveHeight">
<real key="value" value="17"/>
<real key="value" value="45"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="reverseCurve" value="YES"/>
</userDefinedRuntimeAttributes>
</tabBar>
<userDefinedRuntimeAttributes>
Expand All @@ -100,8 +101,8 @@
<view key="view" contentMode="scaleToFill" id="4uK-7X-W3Q">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<viewLayoutGuide key="safeArea" id="VmW-GB-kRu"/>
<color key="backgroundColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<tabBarItem key="tabBarItem" title="Favorite" image="iconFavorite" selectedImage="iconFavoriteSelected" id="oi7-PG-NY8"/>
</viewController>
Expand All @@ -116,8 +117,8 @@
<view key="view" contentMode="scaleToFill" id="7B4-6u-xMz">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.0" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<viewLayoutGuide key="safeArea" id="Hmn-K6-0vq"/>
<color key="backgroundColor" red="0.0" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</view>
<tabBarItem key="tabBarItem" title="Video" image="iconVideo" selectedImage="iconVideoSelected" id="4SB-gB-Tt3"/>
</viewController>
Expand All @@ -132,8 +133,8 @@
<view key="view" contentMode="scaleToFill" id="c7H-Nt-Af8">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.58105844259999995" green="0.12855249639999999" blue="0.57453137639999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="5ai-67-j3l"/>
<color key="backgroundColor" red="0.58105844259999995" green="0.12855249639999999" blue="0.57453137639999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<tabBarItem key="tabBarItem" title="Profile" image="iconProfile" selectedImage="iconProfileSelected" id="DMt-Wd-slE"/>
</viewController>
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

![Example](https://raw.githubusercontent.com/simformsolutions/SSCustomTabbar/master/SSCustomTabBar/Screenshots/customTabbar.gif)

![Example](https://raw.githubusercontent.com/simformsolutions/SSCustomTabbar/master/SSCustomTabBar/Screenshots/reverseTabbar.gif)

## Requirements

- iOS 11.0+
Expand All @@ -33,6 +35,10 @@ pod 'SSCustomTabbar'
### Set UITabBar to SSCustomTabBar
![alt text](https://raw.githubusercontent.com/simformsolutions/SSCustomTabbar/master/SSCustomTabBar/Screenshots/SSCustomTabBar.png)

### Set UITabBar to SSCustomTabBar reverse curve
![alt text](https://raw.githubusercontent.com/simformsolutions/SSCustomTabbar/master/SSCustomTabBar/Screenshots/SSCustomTabBarReverseCurve.png)


## SwiftUI Usage example

struct TabItem: View {
Expand Down Expand Up @@ -104,6 +110,28 @@ You can change:

![alt text](https://raw.githubusercontent.com/simformsolutions/SSCustomTabbar/master/SSCustomTabBar/Screenshots/Description.png)


## Adding Badge value
![alt text](https://raw.githubusercontent.com/simformsolutions/SSCustomTabbar/master/SSCustomTabBar/Screenshots/SSCustomTabBarBadgeValue.png)

Add/Update badge value:
```
let tabBarController = self.tabBarController as? SSCustomTabBarViewController
tabBarController?.addOrUpdateBadgeValueAtIndex(index: 0, value: "Your Value Here")
```

Remove badge value:
```
let tabBarController = self.tabBarController as? SSCustomTabBarViewController
tabBarController?.removeBadgeValueAtIndex(index: 1)
```

Remove all badge values:
```
let tabBarController = self.tabBarController as? SSCustomTabBarViewController
tabBarController?.removeAllBadges()
```

## Contribute

We would love you for the contribution to SSCustomTabMenu, check the LICENSE file for more info.
Expand Down
Loading

0 comments on commit 35ebe49

Please sign in to comment.