0

我想要实现的是:
当 UISlider 滚动时,一个小的帮助视图应该在显示当前滑块值时淡出。当滑块被释放时,帮助视图淡出。最简单的方法是什么?

4

1 回答 1

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..

:)

于 2012-09-27T08:05:46.247 回答