<code>-(void)scrollSlideView:(UIPanGestureRecognizer *) panGesture{
[self hideTopview:self.slideMultiViewController.view.frame.origin.y];
}
-(void)hideTopview:(CGFloat) alpha{
alpha = (alpha - 64)/100;
float adjustAlpha;
if
(alpha < 0) {
alpha = 0;
}
if
(alpha < 0.5) {
self.navigationItem.rightBarButtonItem = self.rightBarItemSmall;
self.navigationItem.titleView = self.naviShopName;
self.naviShopName.frame = CGRectMake(0, 0, 200, 30);
self.naviShopName.alpha =0;
self.naviRightViewSmall.alpha = 0;
adjustAlpha = (alpha)/0.5;
self.naviShopName.alpha =1 - adjustAlpha;
self.naviRightViewSmall.alpha = 1 - adjustAlpha;
}
if
(alpha > 0.5){
self.navigationItem.rightBarButtonItem = self.rightBarItemFull;
self.navigationItem.titleView = nil;
if
(alpha>1) {
adjustAlpha = 1;
}
else
{
adjustAlpha = (alpha - 0.5)/0.5;
}
self.naviRightViewFull.alpha = adjustAlpha;
}
}
</code>