Open lifehappensoutdoors opened 8 years ago
Try this #25 move WWcalendarTimeSelector.storyboard file from Resources group to main folder
it fixed my problem.
whatis the fix for this? i moved the file but no luck :(
this is my error:
Unknown class _TtC38WWCalendarTimeSelectorStoryboardBundle22WWCalendarTimeSelector in Interface Builder file.
Could not cast value of type 'UIViewController' (0x1af5bdf60) to 'WWCalendarTimeSelector.WWCalendarTimeSelector' (0x1016a1908).
Could not cast value of type 'UIViewController' (0x1af5bdf60) to 'WWCalendarTimeSelector.WWCalendarTimeSelector' (0x1016a1908).
i have the same issue! any help?
if I remember correctly you need yo set the module name in the storyboard on that viewcontroller
@antonioreyna thanks for the help, but now I'm getting EXC_BAD_ACCESS in this line clockView.delegate = self in the method viewdidload class WWCalendarTimeSelector, any ideas on why this happened?
@cesarmtz93 I found a solution... as @antonioreyna said... you also have to specify the "module" on the "Clock View"
@Abel7x Hi what i need to specify in module i am giving WWCalendarTimeSelector
but it is showing same error.
Hey All, first of all thanks to this awesome calendar, I was also facing this issue UIViewController' to 'WWCalendarTimeSelector.WWCalendarTimeSelector
to remove this I simply drag and drop all files to my main project rather than getting it from Cocoapods
--No import coz you are using it directly
class YourViewController: UIViewController{
fileprivate var singleDate: Date = Date()
fileprivate var multipleDates: [Date] = []
override func viewDidAppear(_ animated: Bool) {
showCalendar()
}
func showCalendar() {
let selector = WWCalendarTimeSelector.instantiate()
selector.delegate = self
/*
Any other options are to be set before presenting selector!
*/
presentViewController(selector, animated: true, completion: nil)
}
}
extension YourViewController: WWCalendarTimeSelectorProtocol{
func WWCalendarTimeSelectorDone(_ selector: WWCalendarTimeSelector, date: Date) {
print("Selected Date- \(date)")
singleDate = date
//dateLabel.text = date.stringFromFormat("d' 'MMMM' 'yyyy', 'h':'mma")
}
func WWCalendarTimeSelectorDone(_ selector: WWCalendarTimeSelector, dates: [Date]) {
print("Selected Multiple Dates \n\(dates)\n---")
if let date = dates.first {
singleDate = date
//dateLabel.text = date.stringFromFormat("d' 'MMMM' 'yyyy', 'h':'mma")
}
else {
//dateLabel.text = "No Date Selected"
}
multipleDates = dates
}
}
And you will get it ...
I am also facing the exact problem. None of the above mentioned solution worked for me. :(
I only want to install it through Pods.
Did You tried to drag and drop Coz it works for me and I am using it in my project, Swift 3.0
I had to go into the storyboard and set the module to WWCalendarTimeSelector on 2 things:
After that, I was able to load the clock view just fine, and I installed it from cocoapods.
this problem comes when you use pod to install to WWCalendarTimeSelector you can fix this following simple 3 steps:
step 1: open your project project navigator>Pods>WWCalendarTimeSelector>Resources>WWCalendarTimeSelector.storyboard
step 2: in WWCalendarTimeSelector.storyboard open calendar Time Selector Scence select calendar Time Selector view controller and goto show the identity inspector and set Module as WWCalendarTimeSelector
step 3 : open calendar Time Selector view controller expand the view expand the Bottom Container view again expand Background Content View select Clock View and in the show the identity inspector and set Module as WWCalendarTimeSelector
🥇 💯
check the Inherit From Target solved my issue.. in Swift 3.1
To resolve this problem, i use
pod 'WWCalendarTimeSelector', :git => 'git@github.com:weilsonwonder/WWCalendarTimeSelector.git', :branch => 'master'
in my Podfile
Can I add this lib to my swift 4 project via pod ???
I have added this lib to my Swift 4 project but it showing too many issues in "WWCalendarTimeSelectorStyle" class. Can anybody help me????
I have added this lib to my Swift 4 project but it showing too many issues in "WWCalendarTimeSelectorStyle" class. Can anybody help me????
fixed it myself
But the main issue is still here
Hello, the issue described above seems to be unresolved (as per #15 ). Any special branch we need to pull from?
If we remove the custom class from the storyboard file it crashes with the unknown class error. If we add the classes, it works fine but the protocol methods won't work, date selection for example. Any input from your side is highly appreciated...
Nice component by the way. Thank you for sharing.