5
Sử dụng isKindOfClass với Swift
Tôi đang cố gắng chọn một chút Swift lang và tôi đang tự hỏi làm thế nào để chuyển đổi Objective-C sau đây thành 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 …