Closed xhzengAIB closed 9 years ago
Hey !
Your item can implement - (void)updateViewWithRatio:(CGFloat)ratio
from <THTinderNavigationBarItem>
. I use it in the demo to change the color, but you can use it to change the size too.
Tell me if this is what you wanted ;)
Tanguy
Hi! @Tgy31
When rolling around ScrollView, I want the current item has a zoom effect.
Jack
Go in NavigationBarItem.m
and change updateViewWithRatio:(CGFloat)ratio
by:
- (void)updateViewWithRatio:(CGFloat)ratio
{
ratio = ratio/2.0 + 0.5;
CGFloat height = self.frame.size.height * ratio;
CGFloat width = self.frame.size.width * ratio;
CGFloat x = (self.frame.size.width - width) / 2.0;
CGFloat y = (self.frame.size.height - height) / 2.0;
self.coloredView.frame = CGRectMake(x, y, width, height);
self.coloredView.layer.cornerRadius = height/2.0;
}
It will change the size of the orange view with a zoom effect.
@Tgy31 Ok! Thanks
Hi! @Tgy31
How to add when switching navbarItemViews zoom effect of the Item?
Jack