In objective c you can use CGRectContainsPoint(yourview.frame, touchpoint)
-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
UITouch* touch = [touches anyObject];
CGPoint touchpoint = [touch locationInView:self.view];
if( CGRectContainsPoint(yourview.frame, touchpoint) ) {
}else{
}}
In swift 3 yourview.frame.contains(touchpoint)
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
let touch:UITouch = touches.first!
let touchpoint:CGPoint = touch.location(in: self.view)
if wheel.frame.contains(touchpoint) {
}else{
}
}