Giter Site home page Giter Site logo

cooperrs / rmpickerviewcontroller Goto Github PK

View Code? Open in Web Editor NEW
381.0 381.0 51.0 1.2 MB

This is an iOS control for selecting something using UIPickerView in an UIAlertController like manner

License: MIT License

Objective-C 79.51% Ruby 4.73% Swift 15.76%

rmpickerviewcontroller's People

Contributors

bryant1410 avatar cooperrs avatar iltercengiz avatar olejnjak avatar rossbeale avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rmpickerviewcontroller's Issues

Doesnt show up when inside a UINavigationController

For some reason, which i dont know, when i present the PickerViewController doesnt show up if im inside a UINavigationController.

@IBAction func showValues(sender: AnyObject) {
    let selectAction = RMAction(title: "Select", style: RMActionStyle.Done) { (controller) -> Void in
        let picker = (controller as! RMPickerViewController).picker
        var row = picker.selectedRowInComponent(0)
        println(row)
    }
    let cancelAction = RMAction(title: "Cancel", style: RMActionStyle.Cancel) { (controller) -> Void in

    }
    let pickerController = RMPickerViewController(style: RMActionControllerStyle.White, selectAction: selectAction, andCancelAction: cancelAction)

    pickerController.picker.delegate = self
    pickerController.picker.dataSource = self
    presentViewController(pickerController, animated: true, completion: nil)

// The previous code doesnt show the picker if im inside a Nav, but the date works
// I'm uneable to reproduce the issue on other project since its probably a bug with the library i'm using for a menu
//This works and show up
// let dateSelectionController = RMDateSelectionViewController(style: RMActionControllerStyle.White, selectAction: selectAction, andCancelAction: cancelAction)
// dateSelectionController.datePicker.datePickerMode = UIDatePickerMode.Date
// self.presentViewController(dateSelectionController, animated: false, completion: nil)
}

https://github.com/dekatotoro/SlideMenuControllerSwift

func changeMainViewController(mainViewController: UIViewController,  close: Bool) {

    self.removeViewController(self.mainViewController)
    self.mainViewController = mainViewController
    self.setUpViewController(self.mainContainerView, targetViewController: self.mainViewController)
    if (close) {
        self.closeLeft()
        self.closeRight()
    }
}

This is the function where it changes the vc, if here i send a Nav i cant show up the datepicker (its not shown and when i retry it says:
<RMPickerViewController: 0x7fe1c05ae690> on <ApperStreet.AddressVC: 0x7fe1c059a130> which is already presenting (null)
Any hints?

IOS 8GM Depreciation Warning

In or around line 292 of RMPickerViewController you get this...

 UIInterfaceOrientation interfaceOrientation NS_DEPRECATED_IOS(2_0,8_0);

I'm assuming that it can be fixed using UIInterfaceOrientationLandscapeLeft or UIInterfaceOrientationLandscapeRight

Any hints as to how to apply a fix? You've probably got the same issue with your date control don't you?

Set default value.

I don't see a way to have the picker open at a default value.
Is this possible?

Thanks

Subclass constructors need to have the same nullability annotations as RMActionController 1.0.5

In RMActionController 1.0.5 convenience factory methods have extra nullability annotations:

+ (nullable instancetype)actionControllerWithStyle:(RMActionControllerStyle)style title:(nullable NSString *)aTitle message:(nullable NSString *)aMessage selectAction:(nullable RMAction *)selectAction andCancelAction:(nullable RMAction *)cancelAction {

while in RMPickerViewController 2.0.2 annotations are missing:

+ (instancetype)actionControllerWithStyle:(RMActionControllerStyle)style title:(NSString *)aTitle message:(NSString *)aMessage selectAction:(RMAction *)selectAction andCancelAction:(RMAction *)cancelAction {

When the picker is created from the Swift code like the following, only RMActionController constructor is called, leaving the RMPickerViewController in partially initialised state:

let picker: RMPickerViewController? = RMPickerViewController(style: .White,
    title: "Title",
    message: "",
    selectAction: RMAction(title: "Select", style: .Done) { _ in  },
    andCancelAction: RMAction(title: "Cancel", style: .Cancel) { _ in })

With RMActionController 1.0.4 and RMPickerViewController 2.0.2 it works properly.

Show from custom toolbar

I have a custom View at top of page. Custom toolbar. How would i show from a label from that view in iPad mode?

Constraints problem when showing / dismissing

The Picker gives a constraints warning when showing and dismissing the view, and it also shows a dirty line when it closes

captura de pantalla 2015-03-23 a las 10 20 58

2015-03-23 10:21:42.915 RMPickerViewController-Demo[4943:195982] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7fa449556c50 V:|-(10)-[UILabel:0x7fa449549cc0'This is an example title....'] (Names: '|':_UIVisualEffectContentView:0x7fa449552040 )>",
"<NSLayoutConstraint:0x7fa449556ca0 V:[UILabel:0x7fa449549cc0'This is an example title....']-(10)-| (Names: '|':_UIVisualEffectContentView:0x7fa449552040 )>",
"<NSLayoutConstraint:0x7fa449556120 V:[UIVisualEffectView:0x7fa449553d70]-(10)-[UIVisualEffectView:0x7fa449552480]>",
"<NSLayoutConstraint:0x7fa449556170 V:[UIVisualEffectView:0x7fa449552480(44)]>",
"<NSLayoutConstraint:0x7fa4495561c0 V:[UIVisualEffectView:0x7fa449552480]-(0)-| (Names: '|':UIView:0x7fa44954ecb0 )>",
"<NSLayoutConstraint:0x7fa449556210 V:[UIVisualEffectView:0x7fa449553d70(216)]>",
"<NSLayoutConstraint:0x7fa449556a50 V:|-(0)-[UIVisualEffectView:0x7fa449552940] (Names: '|':UIView:0x7fa44954ecb0 )>",
"<NSLayoutConstraint:0x7fa449556aa0 V:[UIVisualEffectView:0x7fa449552940]-(10)-[UIVisualEffectView:0x7fa449553d70]>",
"<NSAutoresizingMaskLayoutConstraint:0x7fa44980b570 h=-&- v=-&- _UIVisualEffectContentView:0x7fa449552040.height == UIVisualEffectView:0x7fa449551030.height>",
"<NSAutoresizingMaskLayoutConstraint:0x7fa4498045c0 h=-&- v=-&- UIVisualEffectView:0x7fa449551030.height == _UIVisualEffectContentView:0x7fa4495413d0.height>",
"<NSAutoresizingMaskLayoutConstraint:0x7fa44985a980 h=-&- v=-&- _UIVisualEffectContentView:0x7fa4495413d0.height == UIVisualEffectView:0x7fa449552940.height>",
"<NSLayoutConstraint:0x7fa4497cf810 UIView:0x7fa44954ecb0.bottom == UIView:0x7fa449440060.bottom - 10>",
"<NSLayoutConstraint:0x7fa4497d4420 V:[UIView:0x7fa449440060]-(0)-[UIView:0x7fa44954ecb0]>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fa449556ca0 V:[UILabel:0x7fa449549cc0'This is an example title....']-(10)-| (Names: '|':_UIVisualEffectContentView:0x7fa449552040 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-03-23 10:21:42.916 RMPickerViewController-Demo[4943:195982] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7fa449556120 V:[UIVisualEffectView:0x7fa449553d70]-(10)-[UIVisualEffectView:0x7fa449552480]>",
"<NSLayoutConstraint:0x7fa449556170 V:[UIVisualEffectView:0x7fa449552480(44)]>",
"<NSLayoutConstraint:0x7fa4495561c0 V:[UIVisualEffectView:0x7fa449552480]-(0)-| (Names: '|':UIView:0x7fa44954ecb0 )>",
"<NSLayoutConstraint:0x7fa449556210 V:[UIVisualEffectView:0x7fa449553d70(216)]>",
"<NSLayoutConstraint:0x7fa449556a50 V:|-(0)-[UIVisualEffectView:0x7fa449552940] (Names: '|':UIView:0x7fa44954ecb0 )>",
"<NSLayoutConstraint:0x7fa449556aa0 V:[UIVisualEffectView:0x7fa449552940]-(10)-[UIVisualEffectView:0x7fa449553d70]>",
"<NSAutoresizingMaskLayoutConstraint:0x7fa4498045c0 h=-&- v=-&- UIVisualEffectView:0x7fa449551030.height == _UIVisualEffectContentView:0x7fa4495413d0.height>",
"<NSAutoresizingMaskLayoutConstraint:0x7fa44985a980 h=-&- v=-&- _UIVisualEffectContentView:0x7fa4495413d0.height == UIVisualEffectView:0x7fa449552940.height>",
"<NSLayoutConstraint:0x7fa4497cf810 UIView:0x7fa44954ecb0.bottom == UIView:0x7fa449440060.bottom - 10>",
"<NSLayoutConstraint:0x7fa4497d4420 V:[UIView:0x7fa449440060]-(0)-[UIView:0x7fa44954ecb0]>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fa449556120 V:[UIVisualEffectView:0x7fa449553d70]-(10)-[UIVisualEffectView:0x7fa449552480]>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2015-03-23 10:21:42.921 RMPickerViewController-Demo[4943:195982] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSLayoutConstraint:0x7fa4497cf810 UIView:0x7fa44954ecb0.bottom == UIView:0x7fa449440060.bottom - 10>",
"<NSLayoutConstraint:0x7fa4497d4420 V:[UIView:0x7fa449440060]-(0)-[UIView:0x7fa44954ecb0]>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fa4497d4420 V:[UIView:0x7fa449440060]-(0)-[UIView:0x7fa44954ecb0]>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

Webservice - Multiple as well Single Record Added in backend - Added as Array

set parameter in Array (for Request parameter in webservice)
——————————————————————
NSMutableArray *arrParameter=[NSMutableArray alloc]init];
arrParameter=…

set Array by assign value like Textfield/ String/ Dictionary etc., in array assign multiple record also.


Array set in dictionary for giving key name for value

——————————————————————————————————————
NSMutableDictionary *dic_Parameter=[[NSMutableDictionary alloc] init];
[dic_Parameter setObject:arrParameter forKey:@“Param1”];
[dic_Parameter setObject:string/array forKey:@"Param2”];
here second line is for pass second array or other key value like EmailID,other Array value etc..

Convert parameter value (your requested parameter) to Json

——————————————————————————————————————————————————————
NSError *error = nil;
NSData *data = [NSJSONSerialization dataWithJSONObject: dic_Parameter options:0 error:&error];

        NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        if (error)
            NSLog(@"%s: JSON encode error: %@", __FUNCTION__, error);

Convert parameter value to Json

—————————————————————————————————————————

        NSString *strURL=[[NSString alloc] init];
        strURL=[NSString stringWithFormat:@“%@“,@“Your URL“];  // webservice URL 

        NSURL *url = [NSURL URLWithString:strURL];
        NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];

        [request setHTTPMethod:@"POST"];
        NSString *params = [NSString stringWithFormat:@"json=%@",
                            [string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
        NSData *paramsData = [params dataUsingEncoding:NSUTF8StringEncoding];
        [request addValue:@"8bit" forHTTPHeaderField:@"Content-Transfer-Encoding"];
        [request addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
        [request setHTTPBody:paramsData];

Response from Webservices as string

—————————————————————————————————————————

NSURLResponse *response = nil;
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];

        if (error)
            NSLog(@"%s: NSURLConnection error: %@", __FUNCTION__, error);

        // examine the response
             NSString *responseString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];
        NSLog(@"responseString: %@",responseString);


Convert parameter value to Json

—————————————————————————————————————————

        if(![responseString isEqualToString:@""])
        {
            NSDictionary *dicResponse = [NSJSONSerialization JSONObjectWithData:returnData
                                                                                options:kNilOptions error:&error];

            NSLog(@"dicResponse: %@",dicResponse);
        }


Final - Complete

—————————————————————————————————————————
Final : perform operation on response like give any popup for adding success Records, pop to super view , move to any next view -pushview

It's ok with iOS7 when disableMotionEffects and disableBouncingWhenShowing are YES?

Hi, I love this library. Thank you for making it.

But, with iOS9.3, it doesn't work with the ver1.3.9 anymore. it shows blank screen.
If I use the latest RMPickerViewController, it works fine with iOS9.3.

If disableMotionEffects and disableBouncingWhenShowing are YES on the latest RMPickerViewController, I can use it with iOS7 and landscape mode?

I wish I could test iOS7 myself, but I can't use iOS7 sims on Xcode anymore, and I don't have iOS7 devices.

Display issue in landscape orientation on iPhone 6 / 6+

When showing the picker in landscape orientation on iPhone 6/6+ the picker view is not displayed in it's entirety. The issue is not present when first displaying the picker in portrait orientation and then rotating. It is also not present on iPhone 5s/4s or iPad.

Tapping the "OK" button too fast while `UIPickerView` is still "animating/rotating" results in the wrong/previous selection. Should delay action/unload?

I've run into this while working a bit too quickly between views before.

If you flick the UIPickerView to a selection, and then it nearly finishes rotating but hasn't 100% finished when you hit "OK", the previous value will still be considered active because the new delegate method hasn't fired before the other callbacks and stuff go through for "OK".

This is a problem with UIPickerView (not this module) in general to be honest... but requires a workaround. It's clear that a selection has been made by the user because it's already settled on a given choice and isn't accelerating fast enough to move past it, but it doesn't account for the fact that there's no reason the user would want the previous selection at that point instead without pressing "Cancel".

Is it possible to get a fix or workaround for this?

ios 7 bug

First we need to edit this line

if(UIAccessibilityIsReduceMotionEnabled()) { ... }

to

if(UIAccessibilityIsReduceMotionEnabled != NULL) { ... }

for avoiding crash on iOS 7.x but after show the picker on iOS 7 the whole view be white background see image please .. http://oi58.tinypic.com/20ruvex.jpg

Could you please tell me what is going wrong ?

Name the Rows

How would you custom name the rows? i.e. If i wanted 4 constant strings that will never change?
Instead of (Row 0, Row 1, etc) to (House, Apartment, etc).
THanks!

Solution - Pickerview show in simulator, but not on a device - RMPickerViewController

i was facing same issue, i have resolved it with help of @NipulDaki - by change 1 line coding, i given solution to below

At Creation of RMPickerViewController object.

RMPickerViewController *pickerVC = [RMPickerViewController pickerController];
[RMPickerViewController setLocalizedTitleForSelectButton:@"Done"];

** pickerVC.disableBlurEffects=YES; ** <-- add this like in your code and RMPickerViewController work without affecting any thing.

Multiple selection

Hi! Thank you for an excellent component.
Can make multiple selection by using your component?

Issues with constraints in iOS 8.3

App crashing before appearing. Perhaps reason in "multiplier" when you add constraints, if we change that value from 0 to 1, everything works fine.

Webservice - Multiple as well Single Record Added in backend - Added as Array

    set parameter in Array (for Request parameter in webservice)

——————————————————————
NSMutableArray *arrParameter=[NSMutableArray alloc]init];
arrParameter=…

set Array by assign value like Textfield/ String/ Dictionary etc., in array assign multiple record also.


Array set in dictionary for giving key name for value

——————————————————————————————————————
NSMutableDictionary *dic_Parameter=[[NSMutableDictionary alloc] init];
[dic_Parameter setObject:arrParameter forKey:@“Param1”];
[dic_Parameter setObject:string/array forKey:@"Param2”];
here second line is for pass second array or other key value like EmailID,other Array value etc..

Convert parameter value (your requested parameter) to Json

——————————————————————————————————————————————————————
NSError *error = nil;
NSData *data = [NSJSONSerialization dataWithJSONObject: dic_Parameter options:0 error:&error];

        NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
        if (error)
            NSLog(@"%s: JSON encode error: %@", __FUNCTION__, error);

Convert parameter value to Json

—————————————————————————————————————————

        NSString *strURL=[[NSString alloc] init];
        strURL=[NSString stringWithFormat:@“%@“,@“Your URL“];  // webservice URL 

        NSURL *url = [NSURL URLWithString:strURL];
        NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];

        [request setHTTPMethod:@"POST"];
        NSString *params = [NSString stringWithFormat:@"json=%@",
                            [string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
        NSData *paramsData = [params dataUsingEncoding:NSUTF8StringEncoding];
        [request addValue:@"8bit" forHTTPHeaderField:@"Content-Transfer-Encoding"];
        [request addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
        [request setHTTPBody:paramsData];

Response from Webservices as string

—————————————————————————————————————————

NSURLResponse *response = nil;
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];

        if (error)
            NSLog(@"%s: NSURLConnection error: %@", __FUNCTION__, error);

        // examine the response
             NSString *responseString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];
        NSLog(@"responseString: %@",responseString);


Convert parameter value to Json

—————————————————————————————————————————

        if(![responseString isEqualToString:@""])
        {
            NSDictionary *dicFinalGetFacility = [NSJSONSerialization JSONObjectWithData:returnData
                                                                                options:kNilOptions error:&error];

            NSLog(@"dicFinalGetFacility: %@",dicFinalGetFacility);

        }


Final - Complete

—————————————————————————————————————————
Final : perform operation on response like give any popup for adding success Records, pop to super view , move to any next view -pushview

Get the text of selected rows

Hi,

How chould I get the text/NSString of selected rows ?

  • (void)pickerViewController:(RMPickerViewController *)vc didSelectRows:(NSArray *)selectedRows

Thanks

Call didSelectRows/didCancel after picker dismissed

I have a trivial situation when I need to push new controller in navigation stack when user taps "Select" in Picker VC. I am surprised, but it seems that UIKit tries to push new controller in context of picker, in that case the next controller does not have a navigation bar and seems like being pushed outside of navigation stack:

- (void)pickerViewController:(RMPickerViewController *)vc didSelectRows:(NSArray *)selectedRows {
    [self performSegueWithIdentifier:kGoalsControllerSegueID sender:self];
}

A workaround to this problem right now is 0.5s delay before performing segue. I will see if I can help with PR here, but probably tomorrow.

Idea: add completion handler to dismiss method and use it to call delegate methods when dismissed. It would be easy to do without breaking current logic.

Picker options show in simulator, but not on a device

I'm making an app in Swift, and when invoking my instance of RMPickerViewController in the simulator, all goes well, but when I run it on my iPhone 5s on iOS 8.1.1 (built with the iOS 8.2 SDK), none of the options in the picker show, and I'm left with a blank square

Button color issue on iOS8 under ver 1.3.3

Hi, thank you for this nice library.

I use the version 1.3.3 since my app need to support iOS7, but with 1.3.3 on iOS8, the button color becomes gray color while the button color is fine with iOS7.

I know the latest version fixes this issue, but I still like to use this nice library on iOS7 and iOS8.
Is there any way to fix this issue?

Error while trying to use the demo..

Hi,
I follow your steps to play with the demo (pod install).
but I get this message :
[!] Unable to satisfy the following requirements:

  • RMPickerViewController (~> 2.0.3) required by Podfile

How can I fix it?

display text

how to display text when my array is nill. for eg. i have data for country name then i show all the list of country.but while i don't have then how to put text "Don't have any country..."

Option to blur UIViewController background

Hey,

What would be the best way to implement blur? Not the blur effect on the Action Sheet, but instead a blur effect for the View Controller that's still visible behind it all. I want to lightly blur the content behind my View Controller when I show the action picker.

Compatible with iOS 7

If compatible with iOS 7, need to modify podspec file. Same as RMDateSelectionViewController.

Several errors (XCode 6.1 - Swift)

Hello and thank you for RMPickerViewController and for RMDateSelectionViewController!

I am using RMDateSelectionViewController without any issues on my test project.

Although, when I add RMPickerViewController, I import the .h file on my bridging header I am getting the following errors:

http://i.imgur.com/69d2LIY.png

Any idea on how to resolve?

iOS8 GM bug

Hi! It seems that on ios8 GM in the horizontal mode the layout is broken. Looks like that constraint's properties needs to be changed. The behavior is OK on iOS7. This problem appear on iPhone Simulator and on the devices (I have tested on iPhone5), but with little bit different look. If you change the orientation when Picker is visible then all is OK. Problem appears when you change orientation first and then open Picker. Problem in the Picker's width. In the horizontal view it looks the same width as it would be in the portrait mode.

Unable to change the titleColor of actionButton And selected Row title color of picker

Even I change [RMAction loadView] to show ios 10 default style button( blue color ), but the button color is gray only. Please give advice. Also please let me know how to change picker view's selected row title color.

`
UIButton *actionButton = [UIButton buttonWithType:UIButtonTypeSystem];

[actionButton setTitleColor:[UIColor colorWithRed:0/255 green:122/255 blue:255/255 alpha:1] forState:UIControlStateNormal];
[actionButton addTarget:self action:@selector(actionTapped:) forControlEvents:UIControlEventTouchUpInside];

if(self.title) {
[actionButton setTitle:self.title forState:UIControlStateNormal];
}

[actionButton addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[actionButton(height)]" options:0 metrics:@{@"height": @([NSProcessInfo runningAtLeastiOS9] ? 55 : 44)} views:NSDictionaryOfVariableBindings(actionButton)]];

return actionButton;
`

On iPad with a SplitViewController

Thanks for this Picker!
I found this issue: on iPad, I have a Split ViewController with a Toolbar in the bottom on the right panel (Detail), where there is a button that open the RMPickerViewController. Tapping that button, the Picker opens with half of itself (maybe less then half) hided under the left panel (Master) of the Split ViewController.
Seems it is trying to open itself at full screen, but maybe not in the right way. Or... I did something wrong!
Someone knows how can I fix this unwanted behavior?

Probably it is releted with this: RMPickerViewController/Issues/14 but that solution does not works for me (on iOS 9.2).

UPDATE

Well, I was looking for a simple solution and I found this:

[self.splitViewController presentViewController:pickerController animated:YES completion:nil];

instead of just presenting on self!

Customisation of buttons

Hello,

it would be nice to have customisation options on the Cancel and Select buttons. Currently the buttons seems to be fairly hardcoded in setupUIElements (colors, font etc).

I will probably modify the code to support this and can open a PR if it's of interest to wider audience?

Third button?

Would it be possible to add a third button below the picker? If so, could you point me in the right direction for implementing this?

Thanks!

Initialize submodules to run the demo project

Hi,

Noob question:
"If you want to run the demo project do not forget to initialize submodules."
Can you please let us know how to initialize submodules, and what are "submodules" here?

I am not able to run the demo project because it doesn't have the RMActionController code.

Selected Index

if i'm select third index after then i'm open pickerview how to get selected index?

Problem Landscape iPad 8.

Hello,

I use the version 1.3.3 because my application begin in iOS7.
When the iPad is in landscape orientation, the pickerView doesn't rotate. it seems to be in portrait orientation. (cf image)
When the ipad is in portrait with the top home button, the picker is poorly positioned, it is at the top whereas it should be down. (cf image)
The issue is not present when first displaying the picker in portrait orientation and then rotating.

Thank you.

img_0029
img_0030

Use severals pickers into the viewController

Hello,

I use one picker but I want to change the data when I clicked on specific buttons.
Then, I only have an instance of the RMPickerViewController created.

Before to call "[_pickerVC show];" I do "_isMoreAction = YES; [_pickerVC show];"
and in the delegate methods I check "_isMoreAction" to display the picker with the right data.

On iOS8 it's working but on iOS7 the picker always keeps the data on its first display.
Is there something specific to add for iOS 7? Did you already have this kind of issue?

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.