RMDateSelectionViewController with UITextField

0

I want to put the RMDateSelectionViewController component in my project. I want it to appear when the user touches UITextField . But I'm not getting it, I followed the example code and it did not work.

Follow my code:

- (IBAction)openDateSelectionController:(id)sender {

    RMDateSelectionViewController *dateSelectionVC = [RMDateSelectionViewController dateSelectionController];
    dateSelectionVC.delegate = self;

    [dateSelectionVC show];

    dateSelectionVC.datePicker.datePickerMode = UIDatePickerModeDateAndTime;
    dateSelectionVC.datePicker.minuteInterval = 5;
    dateSelectionVC.datePicker.date = [NSDate dateWithTimeIntervalSinceReferenceDate:0];
}

And the error message:

  

Error: - [RMDateSelectionViewController showFromViewController:] has been called with an instance of UITableViewController as argument. Showing the date selection view from an instance of UITableViewController is not possible due to some internals of UIKit. To prevent your app from crashing, showing the date selection view controller will be canceled.

Does anyone know how to solve this ??

    
asked by anonymous 05.03.2014 / 01:27

1 answer

0

As explained by the control author in github, it is not possible to display the RMDateSelectionViewController from a UITableViewController, but only from UIViewController due to complications with the apple framework 'UIKit'. Here is a photo of the explanation.

Onthissiteyouhavesomeotheralternativestosolveyourproblem. link

    
06.03.2014 / 03:53