Comments (13)
I'll look into it...
from rmdateselectionviewcontroller.
OK, the problem is in this line:
let dateSelectionController = RMActionController(style: RMActionControllerStyle.White, selectAction: selectAction, andCancelAction: cancelAction)
You are instantiating an RMActionController while you should instantiate an RMDateSelectionViewController or RMPickerViewController. Depends on what you need.
So the following line should work (and does in my tests):
let dateSelectionController = RMDateSelectionViewController(style: RMActionControllerStyle.White, selectAction: selectAction, andCancelAction: cancelAction)
Hope I could help! :)
If you have any further questions just ask.
Ah and: If it indeed does work, please close the ticket ;)
from rmdateselectionviewcontroller.
When i try to import in my bridign header i get "Could not build mode 'RMDateSelectionViewController'
http://s23.postimg.org/5079h5iq2/Screen_Shot_2015_06_11_at_08_34_38.jpg
http://s7.postimg.org/oh26exbyi/Screen_Shot_2015_06_11_at_08_36_51.jpg
from rmdateselectionviewcontroller.
I solved this issue changing the import to #import <RMActionController/RMActionController.h>
inside the RMDateSelectionViewController.h but i still can't show the datepicker.
Warning: Attempt to present <RMDateSelectionViewController: 0x7fd7397a0480> on <xxx.ProfileVC: 0x7fd7394e8210> which is already presenting (null)
http://s15.postimg.org/z6cgnmuzv/Screen_Shot_2015_06_11_at_08_49_32.png
from rmdateselectionviewcontroller.
I also tried your other library from Cocoapods RMPickerViewController, and its hasnt got the method 'actionControllerWithStyle..' veeery strange?
from rmdateselectionviewcontroller.
Which version of RMPickerController has been installed?
from rmdateselectionviewcontroller.
Using RMDateSelectionViewController (2.0.0)
Using RMPickerViewController (1.4.1)
from rmdateselectionviewcontroller.
iMac-Apps:Project alex$ cat Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'AsyncImageView', '> 1.5.1'> 1.0.0'
pod 'Alamofire', :git => "[email protected]:Alamofire/Alamofire.git", :branch => 'xcode-6.3'
pod 'ObjectMapper', :git => "[email protected]:Hearst-DD/ObjectMapper.git", :branch => 'swift-1.2'
pod 'CSStickyHeaderFlowLayout'
pod 'Shimmer'
pod 'RMDateSelectionViewController'
pod 'RMPickerViewController'
pod 'RMActionController', '
from rmdateselectionviewcontroller.
Hmm, version 1.4.1 of RMPickerViewController is not up to date. You may try to run pod update
from rmdateselectionviewcontroller.
After updating:
I had to change inside RMPickerViewController.h the import statement to:
import RMPickerViewController/RMActionController.h>
instead of import RMActionController.h>
And then the pickerview doesnt show up, and the second time i get:
<RMPickerViewController: 0x7fda12f89240> on <ApperStreet.AddressVC: 0x7fda15237cd0> which is already presenting (null)
extension AddressVC: AddressViewDelegate {
func didClickInPostalCode(view: AddressView) {
let selectAction = RMAction(title: "Select", style: RMActionStyle.Done) { (controller) -> Void in
}
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)
}
}
extension AddressVC: UIPickerViewDataSource {
func pickerView(pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int {
return 1
}
func pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String! {
return "test"
}
func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int {
return 1
}
}
extension AddressVC: UIPickerViewDelegate {
}
from rmdateselectionviewcontroller.
any updates?
from rmdateselectionviewcontroller.
Hi, sorry for the long delay :/
Can you provide me with a demo project where the issue occurs? I'm not able to reproduce the issue. When I create a new test project and want to show a RMDateSelectionViewController/RMPickerViewController it works just fine (after changing the imports. I'll fix that in 2.0.1 which should be released soon)
from rmdateselectionviewcontroller.
2.0.1 seems working properly
from rmdateselectionviewcontroller.
Related Issues (20)
- Sometimes disappears offscreen HOT 5
- Date picker wheel not showing in iOS 8 iPhone HOT 7
- while scrolling HOT 5
- fatal error: unexpectedly found nil while unwrapping an Optional value HOT 2
- Getting wrong time HOT 2
- Dismiss parent view controller after picking the time HOT 2
- Readme is old & init doesn't work HOT 2
- White button text HOT 2
- RMAction problem on swift3 HOT 17
- Swift 3 multiple errors HOT 3
- set max date HOT 1
- Chartage Support? HOT 3
- In datetimepickermode, view goes outside the alert with style set as RMActionControllerStyleWhite HOT 2
- Change the font/size of the Title attribute? HOT 1
- Change font color HOT 1
- Date Selector Doesn't handle iOS 13 dark mode HOT 3
- I want only month and year column in date picker
- Xcode 12 display wrong HOT 3
- iOS 14/ Xcode 12 HOT 1
- iOS 14/ Xcode 12 HOT 1
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 rmdateselectionviewcontroller.