Comments (2)
I changed the initializer method of ActionSheetPicker to give back the created ActionPickerSheet to the UIViewController from where I create the ActionPickerSheet):
+ (ActionSheetPicker *)displayActionPickerWithView:(UIView *)aView data:(NSArray *)data selectedIndex:(NSInteger)selectedIndex target:(id)target action:(SEL)action title:(NSString *)title {
ActionSheetPicker *actionSheetPicker = [[ActionSheetPicker alloc] initForDataWithContainingView:aView data:data selectedIndex:selectedIndex target:target action:action title:title];
[actionSheetPicker showActionPicker];
return [actionSheetPicker autorelease];
}
With this I can assign the created ActionPickerSheet to an ivar in my UIViewController and dismiss it in the willRotate method
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
if (self.actionSheetPicker) {
[self.actionSheetPicker actionPickerCancel];
}
}
Works perfect.
Regards
Gerd
from actionsheetpicker.
gerdg's solution works.
In addition, changes to ActionSheetPicker are no longer required. The convenience function now returns a reference to the ActionSheetPicker.
from actionsheetpicker.
Related Issues (20)
- Crash when use on iPhone 5S 7.1 HOT 13
- Crash error in iOS7 HOT 4
- Maintance HOT 3
- Layout issue in ActionSheetDistancePicker HOT 1
- Intergrate with multi picker HOT 4
- Issue with iOS 8 beta HOT 18
- Rendering strange problem HOT 4
- It can not work well on IOS8 HOT 1
- Issues with Swift project HOT 2
- Don't show Date Picker on iOS 8 HOT 1
- ActionSheetPicker is not dismissed HOT 1
- size popover HOT 1
- ActionSheetPickerCustomPickerDelegate HOT 2
- iPhone 6 Width is bigger than 320px HOT 1
- Can the datepicker can only show the year and the month? HOT 1
- Toolbar Buttons Tint Color iOS 9 HOT 1
- Toolbar background color HOT 1
- Cannot set picker text color
- Disable iOS UIDatePicker Keyboard
- Distance Picker SIGABRT iOS 7.1 iPad HOT 2
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.