Code Monkey home page Code Monkey logo

rmdateselectionviewcontroller's People

Contributors

bryant1410 avatar cooperrs avatar desoulter avatar iltercengiz avatar olejnjak avatar pventura1976 avatar scottphc avatar vincentsit avatar vinhnx 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  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

rmdateselectionviewcontroller's Issues

Looking help

Thanks for your control. This is really helpful.
Now I am trying to implement this with Swift. I am not sure how do I use following property.

@Property (nonatomic, copy) void (^selectButtonAction)(RMDateSelectionViewController *controller, NSDate *date);

Thanks in advance.

Install instructions fail

platform :ios, '8.0'
pod "RMDateSelectionViewController", "~> 2.0.0"

Result:

[!] Unable to satisfy the following requirements:

  • RMDateSelectionViewController (~> 2.0.0) required by Podfile

iPad & iOS8 - Not showing

This component works perfectly on iPhones (iOS 7 and 8) and on iPad with iOS7.
But on iPad iOS8, the View with the DatePicker is not shown. Only the screen gets a little darker on the view below.
Here is the code I wrote :

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

[dateSelectionVC show];

Note : As I don't have an iPad under iOS 8 yet, I tested it within the simulator.

Year column

How can I add year column in this picker ?

NSInvalidArgumentException using XCode6-Beta5

Here's the stack trace, which occurs when I call

let dateSelectionController = RMDateSelectionViewController.dateSelectionController()
dateSelectionController.delegate = self
dateSelectionController.show()

Stack trace:

2014-08-05 09:39:42.372 BeMore[28158:162270] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010275e3e5 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000104271967 objc_exception_throw + 45
    2   CoreFoundation                      0x000000010275e31d +[NSException raise:format:] + 205
    3   Foundation                          0x0000000102d064b6 VerifyConstraintArguments + 222
    4   Foundation                          0x0000000102b7129e +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:] + 427
    5   BeMore                              0x00000001015c3dc0 +[RMDateSelectionViewController showDateSelectionViewController:fromViewController:] + 464
    6   BeMore                              0x00000001015ca977 -[RMDateSelectionViewController showFromViewController:] + 311
    7   BeMore                              0x00000001015ca7e1 -[RMDateSelectionViewController showWithSelectionHandler:andCancelHandler:] + 385
    8   BeMore                              0x00000001015ca645 -[RMDateSelectionViewController showWithSelectionHandler:] + 101
    9   BeMore                              0x00000001015ca5d5 -[RMDateSelectionViewController show] + 53
    10  BeMore                              0x00000001014ee511 _TFC6BeMore14NewSessionView22openStartDateSelectionfS0_FPSs9AnyObject_T_ + 2785
    11  BeMore                              0x00000001014ee592 _TToFC6BeMore14NewSessionView22openStartDateSelectionfS0_FPSs9AnyObject_T_ + 66
    12  UIKit                               0x0000000103394c26 _UIGestureRecognizerSendActions + 262
    13  UIKit                               0x00000001033938c9 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 532
    14  UIKit                               0x00000001033984e6 ___UIGestureRecognizerUpdate_block_invoke662 + 51
    15  UIKit                               0x00000001033983e2 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 254
    16  UIKit                               0x000000010338e45d _UIGestureRecognizerUpdate + 2796
    17  UIKit                               0x000000010302e596 -[UIWindow _sendGesturesForEvent:] + 1041
    18  UIKit                               0x000000010302f1c3 -[UIWindow sendEvent:] + 667
    19  UIKit                               0x0000000102ffc001 -[UIApplication sendEvent:] + 246
    20  UIKit                               0x000000010300909e _UIApplicationHandleEventFromQueueEvent + 17707
    21  UIKit                               0x0000000102fe4679 _UIApplicationHandleEventQueue + 1967
    22  CoreFoundation                      0x0000000102693ac1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    23  CoreFoundation                      0x000000010268998d __CFRunLoopDoSources0 + 269
    24  CoreFoundation                      0x0000000102688fc4 __CFRunLoopRun + 868
    25  CoreFoundation                      0x00000001026889f6 CFRunLoopRunSpecific + 470
    26  GraphicsServices                    0x000000010668f9f0 GSEventRunModal + 161
    27  UIKit                               0x0000000102fe7990 UIApplicationMain + 1282
    28  BeMore                              0x000000010150c1de top_level_code + 78
    29  BeMore                              0x000000010150c21a main + 42
    30  libdyld.dylib                       0x00000001047ca145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

"Clear" date/time field option

Really nice control. I've embedded it into my custom UITableViewCell and have had several requests now for people asking how they can "clear" the date/time value in the cell.

Unlike a regular UITextField that provides that tiny 'x' icon to clear its field, my thought for your control was to put in a simple "Clear" button that would return an empty string, and thus erasing any value within the cell.

Thoughts?

clearfeature

Cocoapods support

Great project looking to implement with a project am working on!!

Would it be possible to support podfile for easy integration and update?

Tap "Select" before spinning ends, return pre-edited value

This might be Apple UIDatePicker issue as well.

While the picker is animating, if user tap on "Select", UI seems wait for a while to let datePicker settle down to the final value, but the return value will still show the original value.

Tried capturing value through UIControlEventValueChanged, seems it able to return the final value even if DateSelectionViewController is dismissed.

I'm not sure how it could be patched in the component itself since UIDatePicker doesn't expose much info about the UI. Maybe you have some better idea.

Rotation bug

iPad only it seems. (device, not simulator)

rotationbug

Tapping outside to have it dismiss and then tapping back on the cell brings it back fine.
On the simulator it's delayed in it's reappearance, but at least it still works.

This is on my iPad mini Retina. iOS 8.1

Wrong date selection

If i set datePickerMode to UIDatePickerModeDate it gives me wrong outputs for April, May, June, July, August, September and October.

Here are the samples

March 1 2001 -> Successfully selected date: 2001-03-01 00:00:00 +0000 True
April 1 2001 -> Successfully selected date: 2001-03-31 23:00:00 +0000 False
May 1 2001 -> Successfully selected date: 2001-04-30 23:00:00 +0000 False
June 1 2001 -> Successfully selected date: 2001-05-31 23:00:00 +0000 False
July 1 2001 -> Successfully selected date: 2001-06-30 23:00:00 +0000 False
August 1 2001 -> Successfully selected date: 2001-07-31 23:00:00 +0000 False
September 1 2001 -> Successfully selected date: 2001-08-31 23:00:00 +0000 False
October 1 2001 -> Successfully selected date: 2001-09-30 23:00:00 +0000 False
November 1 2001 -> Successfully selected date: 2001-11-01 00:00:00 +0000 True

How can we solve? I tried some adding timezone or changing time interval property but it does not work.

Cant parse your library anymore

Parser stops says: Unknown type name 'UIBlurEffectStyle'

UIBlurEffectStyle is only available on iOS 8 and later, but I am still on 7

Strange UI issue

untitled

I copied the updated code and I got this. I have a guess that it might be something to do with datePickerContainer and datePicker.

Showing Date Selector from iPhone landscape mode - window shaped incorrectly

When I put my phone in landscape orientation and then show the date selector, it shows up in the middle of the view and it's cut-off, only showing a portion of the selector.

It works fine if I show the selector in portrait and then turn the device to landscape, but not if I show the selector from in landscape mode.

Make "dateSelectionViewControllerDidCancel" delegate method optional

I think that the dateSelectionViewControllerDidCancel: delegate method should be an optional method.

For many use cases, the cancel button should do nothing but dismiss the date selector, which is done by default, so I'm being required to implement a method with no functionality.

I'd be happy to make the changes and submit a pull request if you would like?

Otherwise, this is a great library. Thanks so much!

Cannot find protocol declaration following Pod update

Following a Pod update I get the error "Cannot find protocol declaration for RMDateSelectionViewControllerDelegate" on the following interface:

@interface HHCreateTaskViewController () <UITextViewDelegate, RMDateSelectionViewControllerDelegate>

When I cmd-click RMDateSelectionViewControllerDelegate I get "Symbol not found". The library is imported in the controller with the following line:

import "RMDateSelectionViewController.h"

And the Podfile:
platform :ios, '8.0'
pod 'RMDateSelectionViewController'

I tried cleaning the project folder, restarting Xcode etc.

Landscape issue

For iOS 7 support, I'm using 1.4.3 as advised in docs.
Its working well when i switch to landscape from portrait but unable to adjust frame when i open it in landscape.

Not showing when calling .show() in App Extension

let dateSelectionViewController = RMDateSelectionViewController.dateSelectionController()
dateSelectionViewController.show()

will work perfectly inside an app, but will not show the controller inside an app extension.

why it can not display the datapicker

the view has a button whose target is linked to 'openDateSelectionController',view contronller has realized Delegates of RMDAteSelectionViewController .Then i touch the button,the method of 'openDateSelectionController' is being carried out,but datapicker does not display on the view!

import fail on Swift project

screen shot 2015-06-10 at 10 12 55 pm

The error cause by this line
screen shot 2015-06-10 at 10 17 06 pm

Change to #import <RMActionController/RMActionController.h> solve the issue

P.S.Same issue at RMPickerViewController

`sharedApplication` is unavailable in App Extensions

The common way to make this works is to check for a macro APP_EXTENSION=1 defined in extension targets and encapsulate sharedApplication calls in this condition.

I notice that all the call are for either status bar or orientation, which are pretty useless in app extensions (Apple messed up on this).

Potentially helpful:
http://stackoverflow.com/questions/25462091/get-device-current-orientation-app-extension
http://stackoverflow.com/questions/25179411/how-to-know-current-interfaceorientation-in-extension-of-ios-8

Hide status bar

Hi,

Is there any way to hide status bar? My app doesn't show status bar, but when I will show date selector, this appears and breaks design.

Thanks!

Make compatible with App Extensions

RMDateSelectionViewController relies on UIWindow for presentation. But an App Extension cannot present new UIWindows. Thus, RMDateSelectionViewController is incompatible with App Extensions. This should be fixed...

Reduce transparency

Settings > General > Accessibility > Increase Contrast > Reduce Transparency > Enable

ios simulator screen shot mar 9 2015 4 24 38 pm

I try to fix but no idea. Any solutions? The same problem happens in RMPickerViewController.
Thanks!

NSInvalidArgumentException in Swift

I got this exception when using swift :
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* +[NSLayoutConstraint constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:]: A multiplier of 0 or a nil second item together with a location for the first attribute creates an illegal constraint of a location equal to a constant. Location attributes must be specified in pairs'

More / Different Buttons

I would like to a button which has "Don't select an End Date", I have this as a full width button in an action sheet at the moment, but I need to upgrade, is there anyway I can add a full width button.

I thought I could re-use the now button and move it underneath the picker, but I can't :(

Any thoughts ?

Could not load NIB in bundle

Hi,

I'm experiencing a crash with the following exception:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </../appname.app> (loaded)' with name 'RMDateSelectionViewController''

I'm using a pod file with the line:
pod "RMDateSelectionViewController", "~> 1.0.0"

Not sure what's going on yet, but I can see RMDateSelectionViewController.xib exists.

Swift: NSAssert

Hi. im trying to use this library in swift, however i get this error:
NSAssert(self.contentView != nil, @"Error: The view of an RMActionController has been loaded before a contentView has been set. You have to set the contentView before presenting a RMActionController.");

Any ideas?

    let selectAction = RMAction(title: AppearanceService.textById(Texts.Ok), style: RMActionStyle.Done, andHandler: { (actionController) -> Void in

    })
    let cancelAction = RMAction(title: AppearanceService.textById(Texts.Cancel), style: RMActionStyle.Done, andHandler: { (actionController) -> Void in

    })
    let dateSelectionController = RMActionController(style: RMActionControllerStyle.White, selectAction: selectAction, andCancelAction: cancelAction)
    presentViewController(dateSelectionController, animated: true, completion: nil)

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.