Ramotion / animated-tab-bar

:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion
https://www.ramotion.com/animated-tab-bar-ios-app-development-ui-library/
MIT License
11.12k stars 1.33k forks source link

Custom item size #256

Closed dianakhazieva closed 4 years ago

dianakhazieva commented 5 years ago

Custom item size

dianakhazieva commented 5 years ago
    let purchaseHistoryItemImage = UIImage(named: "PurchaseHistoryIcon")?.af_imageScaled(to: CGSize(width: 25, height: 25))
    let purchaseHistoryItem = RAMAnimatedTabBarItem(title: "History", image: purchaseHistoryItemImage, tag: 0)
    purchaseHistoryItem.animation = RAMBounceAnimation()

Cropping the image does not give the result, how can i set the image size of the tab bar icon programmatically? I will be glad to any advice, thanks:)

0ber commented 5 years ago

@RishatYakushev hi, You can't change the image size now. But you can look to the code and implement it. look to the code https://github.com/Ramotion/animated-tab-bar/blob/master/RAMAnimatedTabBarController/RAMAnimatedTabBarController.swift#L360