我想要实现的是:
当滚动UISlider时,一个小帮助器视图应该在显示当前滑块值时淡出。当滑块释放时,辅助视图淡出。最简单的方法是什么?
答案 0 :(得分:3)
你好伙伴,看看这个例子的代码,并使用这个类在iphone中显示popupview ..
http://blog.chrismiles.info/2010/12/cmpoptipview-custom-popup-view-for-ios.html
我希望这可以帮到你..
:)
<强>编辑:强>
-(void)addPopUpView{
Yourview.transform = CGAffineTransformMakeScale(1.3, 1.3);
objMakeOfferView.view.alpha = 0;
[UIView animateWithDuration:.35 animations:^{
Yourview.alpha = 0.94;
Yourview.transform = CGAffineTransformMakeScale(1, 1);
}];
objMakeOfferView.view.frame=CGRectMake(0, 0, 120, 80);///set frame which you required
[self.view addSubview:Yourview];
}
-(void)removePopUpView{
[UIView animateWithDuration:.35 animations:^{
Yourview.transform = CGAffineTransformMakeScale(1.3, 1.3);
Yourview.alpha = 0.0;
} completion:^(BOOL finished) {
[Yourview removeFromSuperview];
}];
}
也可以使用你想要的不同类型的TransitionAnimation ..
:)