eggswift / ESTabBarController

:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie!
MIT License
5.18k stars 581 forks source link

edge insets #32

Closed Ahmedshubber closed 7 years ago

Ahmedshubber commented 7 years ago

@eggswift I tried adding edge insets to the image in the tab bar item like this self.image?.capInsets == UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10). But the image insets are still 0 and the images are still too big. Please advise on how I can fix this. I am stating this code in ExampleIrregularityContentView.

eggswift commented 7 years ago

CapInsets property is designed to resizable images which small. I think import a fix-size image is better.

Ahmedshubber commented 7 years ago

@eggswift One more thing. with the uitabbar one of the images in the tabbar will change if the center tabbarbutton is pressed. I want to slow down that process so I call UITabBar.animate(withDuration: 30.7, animations: {},completion: { (finished: Bool) in return true }). In example provider. But nothing happens. How can I slow down animations by animating the uiview or uitabbar if I want to slow down what happens inside the custom tabbaritems

Ahmedshubber commented 7 years ago

@eggswift If you need extra clarification, please message me back.

eggswift commented 7 years ago

See ExampleBouncesContentView's func bounceAnimation()

You can custom duration in this function.