Is there any way to tell if UIPickerView is spinning?
问题 Is there any way to tell if UIPickerView is spinning? I need to disable some UI elements when it is in transition. 回答1: There are no delegate method for this however you can check the animationKeys count since a UIPickerView is a subclass of UIView : BOOL isSpinning = myPickerView.layer.animationKeys.count > 0; if(isSpinning){ NSLog(@"disable"); }else{ NSLog(@"enable"); } Maybe pickerView:titleForRow:forComponent: is maybe a good place to put this code ? 回答2: I solved it by saving the row