Estou tentando pegar um pouco da linguagem Swift e estou pensando em como converter o seguinte Objective-C em 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
}
}
Mais especificamente, preciso saber como usar isKindOfClass
a nova sintaxe.
override func touchesBegan(touches: NSSet, withEvent event: UIEvent) {
???
if ??? {
// your touch was in a uipickerview ...
}
}