Code Monkey home page Code Monkey logo

Comments (13)

CooperRS avatar CooperRS commented on July 21, 2024

I'll look into it...

from rmdateselectionviewcontroller.

CooperRS avatar CooperRS commented on July 21, 2024

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.

ivangodfather avatar ivangodfather commented on July 21, 2024

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.

ivangodfather avatar ivangodfather commented on July 21, 2024

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.

ivangodfather avatar ivangodfather commented on July 21, 2024

I also tried your other library from Cocoapods RMPickerViewController, and its hasnt got the method 'actionControllerWithStyle..' veeery strange?

from rmdateselectionviewcontroller.

CooperRS avatar CooperRS commented on July 21, 2024

Which version of RMPickerController has been installed?

from rmdateselectionviewcontroller.

ivangodfather avatar ivangodfather commented on July 21, 2024

Using RMDateSelectionViewController (2.0.0)
Using RMPickerViewController (1.4.1)

from rmdateselectionviewcontroller.

ivangodfather avatar ivangodfather commented on July 21, 2024

iMac-Apps:Project alex$ cat Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'AsyncImageView', '> 1.5.1'
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', '
> 1.0.0'

from rmdateselectionviewcontroller.

CooperRS avatar CooperRS commented on July 21, 2024

Hmm, version 1.4.1 of RMPickerViewController is not up to date. You may try to run pod update

from rmdateselectionviewcontroller.

ivangodfather avatar ivangodfather commented on July 21, 2024

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.

ivangodfather avatar ivangodfather commented on July 21, 2024

any updates?

from rmdateselectionviewcontroller.

CooperRS avatar CooperRS commented on July 21, 2024

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.

ivangodfather avatar ivangodfather commented on July 21, 2024

2.0.1 seems working properly

from rmdateselectionviewcontroller.

Related Issues (20)

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.