- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[self performSegueWithIdentifier:@"LoginSegue" sender:nil];
}
You can use
UIView subclass and handle touch event there. Methods to look at (defined inUIResponder):- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
If you want to use "invisible"
UIButton you should set its type to UIButtonTypeCustom - by default it will appear with no image and title and with transparent background. So technically it will be invisible to user but still be able to respond to all events.