We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Picker.hide() 方法提前执行了hidden,导致动画无效, onPickerCancel 提前执行了 hidden ,也会导致动画无效并且闪烁
Picker.hide()
onPickerCancel
react-native-picker/ios/RCTBEEPickerManager/RCTBEEPickerManager.m
Line 123 in 6fa89e9
改动如下:
RCT_EXPORT_METHOD(hide){ if (self.pick) { dispatch_async(dispatch_get_main_queue(), ^{ [UIView animateWithDuration:.3 animations:^{ [self.pick setFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, self.height)]; } completion:^(BOOL finished) { [self.pick removeFromSuperview]; self.pick = nil; }]; }); } // self.pick.hidden=YES; return; }
建议注释掉下面的2块代码,让点击取消,确定,和hide一样的效果
react-native-picker/ios/RCTBEEPickerManager/BzwPicker.m
Line 603 in 6fa89e9
/* dispatch_async(dispatch_get_main_queue(), ^{ [UIView animateWithDuration:.2f animations:^{ [self setFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, 250)]; }]; }); self.pick.hidden=YES; */
Line 643 in 6fa89e9
/* dispatch_async(dispatch_get_main_queue(), ^{ [UIView animateWithDuration:.2f animations:^{ [self setFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, 250)]; }]; }); */
RCT_EXPORT_METHOD(_init:(NSDictionary *)indic){ // ... _pick.bolock=^(NSDictionary *backinfoArry){ dispatch_async(dispatch_get_main_queue(), ^{ if(![[backinfoArry valueForKey:@"type"] isEqualToString:@"select"]){ [weakSelf hide]; //调用hide方法实现一样的动画效果 } [weakSelf sendEventWithName:@"pickerEvent" body:backinfoArry]; }); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Picker.hide()
方法提前执行了hidden,导致动画无效,onPickerCancel
提前执行了 hidden ,也会导致动画无效并且闪烁react-native-picker/ios/RCTBEEPickerManager/RCTBEEPickerManager.m
Line 123 in 6fa89e9
改动如下:
建议注释掉下面的2块代码,让点击取消,确定,和hide一样的效果
react-native-picker/ios/RCTBEEPickerManager/BzwPicker.m
Line 603 in 6fa89e9
react-native-picker/ios/RCTBEEPickerManager/BzwPicker.m
Line 643 in 6fa89e9
The text was updated successfully, but these errors were encountered: