I need table view with custom header view. When i touch this header view i'll make her resize. I have class topBarViewController
with next code (for example):
topBarViewController class:
- (void)viewDidLoad
{
[super viewDidLoad];
self.view.frame = CGRectMake(0, 0, 320, 48);
[self.view setBackgroundColor:[UIColor greenColor]];
UITapGestureRecognizer *singleFingerTap =
[[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(handleSingleTap:)];
[self.view addGestureRecognizer:singleFingerTap];
}
- (void)handleSingleTap:(UITapGestureRecognizer *)recognizer
{
[UIView animateWithDuration:0.5 animations:^{
CGRect frame = self.view.frame;
frame.size.height+=50;
self.view.frame = frame;
} completion:^(BOOL finished) {
}];
}
Then i set this view as header view for my table view. On touch event i've got crash with next text:
2014-10-05 01:00:07.580 UGTUMap[4715:1988098] -[UITransitionView handleSingleTap:]:
unrecognized selector sent to instance 0x7ff6d542a5f0
2014-10-05 01:00:07.586 UGTUMap[4715:1988098] *** Terminating app due to uncaught
exception 'NSInvalidArgumentException', reason: '-[UITransitionView handleSingleTap:]:
unrecognized selector sent to instance 0x7ff6d542a5f0'
Can't find solution. Any suggestions?