Dragging UITableView

前端 未结 3 1650
没有蜡笔的小新
没有蜡笔的小新 2021-01-03 16:38

I\'m working on an iPhone application where I want to drag the table view (not the cells) upto a certain point in the screen. I have the tableview sitting in the bottom half

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-03 16:48

    Can you try this code for moving tableview

       [UIView animateWithDuration:1.5 animations:^
         {
             //ADD CODES HERE FOR STARTING STATE (FRAME FOR UITABLEVIEW )
            // eg: table.frame=CGRectMake(0,320,320,200);   tableview lying on bottom of viewcontroller with 200px height 
    
    
         } completion:^(BOOL finished)
         {
    
    
            // ADD CODES HERE  TO MAKE YOUR FINAL FRAME OF UITABLEVIEW
             // eg: table.frame=CGRectMake(0,0,320,200);   tableview moving to top of viewcontroller with 200px height
    
    
    
         }];
    

    try this let me know the results

    PLEASE BEFORE MARKING DOWN VOTE LET ME KNOW THE REASON ,BECAUSE THIS CODES IS WORKING FOR ME

提交回复
热议问题