当前位置:编程学习 > wap >>

如何实现向下拉打开内容页面

想实现纸抽向下拉的效果 怎么实现 ios --------------------编程问答--------------------
- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    
    [yourImageView setImage:[[UIImage imageNamed:@"xxx.png"]stretchableImageWithLeftCapWidth:0 topCapHeight:10]];
}





-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    CGPoint position=[[touches anyObject]locationInView:self.view];
    
    CGFloat imageHeight=position.y-20;
    
    
    [yourImageView setFrame:CGRectMake(yourImageView.frame.origin.x, yourImageView.frame.origin.y, yourImageView.frame.size.width, imageHeight)];
}
补充:移动开发 ,  iPhone
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,