The problem is that your tableview is outside your controller's view frame. What you should keep in mind is that self.view
should not move. (i've never seen a case where it was useful).
What i would recommend is having a parent view controller. You will add the tableview to your parent and it will be the delegate. You will then add a child view controller which is your current controller (the one displaying Taxi Match).
In your parent view controller :
-(void)viewDidLoad{
yourController = [[UIViewController alloc] init];
[self addChilViewController:yourController];
[self.view addSubview:yourController.view];
profileTable=[[UITableView alloc]initWithFrame:CGRectMake(-220, 0, 220, height) style:UITableViewStylePlain];
profileTable.delegate=self;
profileTable.dataSource=self;
profileTable.backgroundColor=[HexColorCode colorWithHexastring:@"252020"];
profileTable.userInteractionEnabled=YES;
[self.view addSubView: profileTable];
....
}
Then when you touch your button in your child view controller you should call the parent and do :
-(void)moveController{
CGPoint newLeftCenter = CGPointMake( 220.0f + self.view.frame.size.width / 2.0f, self.view.center.y);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
yourController.view.center = newLeftCenter;
[UIView commitAnimations];
CGPoint newLeftCenterForTable = CGPointMake( 1- profileTable.frame.size.width / 2.0f, profileTable.center.y);
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1];
profileTable.center = newLeftCenterForTable;
[UIView commitAnimations];
profileTable.userInteractionEnabled=YES;
[self.view addSubview:profileTable];
profileButton.tag=2;
}