user2705768
user2705768

Reputation: 32

UITableView and Navigation Controller

I am trying to do a simple Navigation controller controlled by a UITableView. Whenever I select one of the rows it is supposed to go to the next slide and animate there. Whenever I implement this code, the animation only goes halfway, then freezes, and then disappears.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
          description* desc=[[description alloc] init];
          [tableView deselectRowAtIndexPath:indexPath animated:YES];
          [self.navigationController pushViewController:desc animated:YES];    
} 

Can anyone help? Thanks in advance.

Upvotes: 0

Views: 74

Answers (1)

Emilie
Emilie

Reputation: 2413

I don't know if this is the same problem, but something similar happened to me. The problem was that the backgroundColor of the UIView of my pushed UIViewController was clear, which cause the animation to look weird because we can see the pushing UIViewController underneath.

Setting backgroundColor on the UIView of the pushed UIViewController (in my case, in white) solved the problem

Upvotes: 1

Related Questions