I am wondering how do we create a bigger center UITabBar like the shot below? Its really beautiful!!!!
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
2017 Answer - With Just Xcode
Click the tab bar button within the view controller of the particular tab bar item you want to make prominent,
Remove the text, just set the image inset top to -25 of the tab bar button.
Like Below image
After that
goto assets,
select the image you set in tab bar button,
set the property Rendering As to Original Image (in case if you have a colourful button or else it would render as one colour)
Like below,
Now, You will get it like you wanted,
I followed @Michael Dautermann answer but the button never registers the tap so I modified it to make it work:
For Swift
Swift 3, 4:
I use this code in the
viewDidLoad
of my subclass ofUITabBarController
:Sometimes I also set
button.adjustsImageWhenHighlighted = false
to mimic the behavior of the other items, or change the constraintconstant
property to move the button up or down.I've taken Manuel's example (the accepted answer) and added an adjustment for the bottom safe area insets due to issues with iPhone X.
I recommend you taking a look at the following article. It explains how to customise a tab bar raising the main button.
Code:
Guide: https://github.com/boctor/idev-recipes/tree/master/RaisedCenterTabBar