Swift lang을 가져 오려고하는데 다음 Objective-C를 Swift로 변환하는 방법이 궁금합니다.
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesBegan:touches withEvent:event];
UITouch *touch = [touches anyObject];
if ([touch.view isKindOfClass: UIPickerView.class]) {
//your touch was in a uipickerview ... do whatever you have to do
}
}
보다 구체적으로, 나는 isKindOfClass
새로운 구문에서 사용하는 방법을 알아야 합니다.
override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
???
if ??? {
// your touch was in a uipickerview ...
}
}