Comments (12)
@masterjox I got a message "This video is private." by your links.
from actionsheetpicker-3.0.
sorry.
try now.
from actionsheetpicker-3.0.
@masterjox I don't see any ActionSheetStringPicker's problems here.
Can you clarify, what the expected result and what the actual result?
Only difference that I see in these 2 video - is in the first one it performs next picker after first is is done.
It seems that something goes wrong outside of actionSheetPicker logic and that's why next one in not called.
from actionsheetpicker-3.0.
The expect result is when you open the first actionsheet and select one, get new data and show other action sheet with dates
in iphone 6 ios 8 the action sheet begin to show but automatically dismiss ( if you pause the video, in second 3, you can see the action sheet above the screen.
from actionsheetpicker-3.0.
Ok. I get it.
Try to set breakpoint in dismissPicker
method and detect, what cause dismissing of the Picker the second time.
from actionsheetpicker-3.0.
in the code of github on class: ActionSheetPickerViewController.m
y put this code:
- (IBAction)selectABlock:(UIControl *)sender {
ActionStringDoneBlock done = ^(ActionSheetStringPicker *picker, NSInteger selectedIndex, id selectedValue) {
if ([sender respondsToSelector:@selector(setText:)]) {
[sender performSelector:@selector(setText:) withObject:selectedValue];
}
[self second:sender];
};
ActionStringCancelBlock cancel = ^(ActionSheetStringPicker *picker) {
NSLog(@"Block Picker Canceled");
};
NSArray *colors = @[@"Red", @"Green", @"Blue", @"Orange"];
[ActionSheetStringPicker showPickerWithTitle:@"Select a Block" rows:colors initialSelection:0 doneBlock:done cancelBlock:cancel origin:sender];
}
- (void)second:(id)sender{
ActionStringDoneBlock done = ^(ActionSheetStringPicker *picker, NSInteger selectedIndex, id selectedValue) {
NSLog(@"a vers si sale");
};
ActionStringCancelBlock cancel = ^(ActionSheetStringPicker *picker) {
NSLog(@"Block Picker Canceled");
};
NSArray *colors = @[@"Red", @"Green", @"Blue", @"Orange"];
[ActionSheetStringPicker showPickerWithTitle:@"Select a Block" rows:colors initialSelection:0 doneBlock:done cancelBlock:cancel origin:sender];
}
instead of:
- (IBAction)selectABlock:(UIControl *)sender {
ActionStringDoneBlock done = ^(ActionSheetStringPicker *picker, NSInteger selectedIndex, id selectedValue) {
if ([sender respondsToSelector:@selector(setText:)]) {
[sender performSelector:@selector(setText:) withObject:selectedValue];
}
};
ActionStringCancelBlock cancel = ^(ActionSheetStringPicker *picker) {
NSLog(@"Block Picker Canceled");
};
NSArray *colors = @[@"Red", @"Green", @"Blue", @"Orange"];
[ActionSheetStringPicker showPickerWithTitle:@"Select a Block" rows:colors initialSelection:0 doneBlock:done cancelBlock:cancel origin:sender];
}
and you can see the error ( the second actionsheet not show)
from actionsheetpicker-3.0.
The problem that you try to show next picker before first is completely dismissed. And it cancelling presenting one more picker.
Just try to wait a 0.3
sec (duration of animation) seconds before activate next picker.
from actionsheetpicker-3.0.
I encounter the same problem.
Even though when I have only one picker, after some displayed-dimissed, the picker does not display again!
Why do we need to wait for a moment before activate next picker on iphone 6 but not in iphone 5?
Thanks
from actionsheetpicker-3.0.
@lat233 in my case it reproduced on iphone 5,6 and iOS 7 and 8.
I think it related with performance of the devices. (in the video iphone 5 preform fetch a quite long time, but iphone 6 do it instantly).
from actionsheetpicker-3.0.
I don't see the easy way to resolve this case.
ActionPicker not adopted to show another one immediately.
As workaround I can recommend you just wait until first one is completely finish animation for 0.4 seconds. It looks smooth and clear.
just replace your string in example
[self second:sender];
to
[self performSelector:@selector(second:) withObject:sender afterDelay:0.4];
You can look at the example for this workaround in branch of this project 63-dismiss-picker
from actionsheetpicker-3.0.
Superb! It works like a charm after putting a delay of 0.4. You saved my life.
Thanks very much!
from actionsheetpicker-3.0.
@masterjox @lat233 Good news everyone! Since version 1.3.1
you don't have to wait 0.3 seconds! Just call next picker from done block!
from actionsheetpicker-3.0.
Related Issues (20)
- ios 14 issue display picker only one date ? HOT 13
- Cannot use the library if is installed using Swift Package Manager
- tapDismissAction broken after 2.5.1 HOT 3
- Data Linkage with ActionSheetMultipleStringPicker HOT 2
- cancel block not called if user taps outside action sheet HOT 22
- SWActionSheetVC.dismissTap prevents calendar from working in inline style
- OK Button Locale not change HOT 3
- Current date is not available on compact Date picker style iOS 14.4 & above HOT 1
- Exclude days or dates
- "exported: true has no effect in '_specialize' attribute" Issue at Xcode 12.5 HOT 3
- Not working with Swift Package Manager [bug] HOT 5
- Remove the pieces of the code for less than the Deployment Target HOT 3
- Picker not showing on iPad but only on iPhone HOT 1
- Picker not appearing if try to show back to back
- ActionSheet opens in wrong display when iphone is connected to an external display.
- Mac Catalyst Warnings HOT 1
- SPM Issues HOT 1
- Adjust Picker Width HOT 2
- Unable to build archieve on Xcode 14.3 HOT 11
- date selection error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actionsheetpicker-3.0.