2012-09-27 191 views
0

我试图实现的是:
当UISlider滚动时,小帮手视图应该在显示当前滑块值时淡出。当滑块释放时,辅助视图淡出。什么是最简单的方法来做到这一点?在iOS中显示弹出窗口

回答

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

:)