-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SetViewModel is not updated to SetContent when installed this library via Cocoapods #240
Comments
I was facing the same issue along with other multiple issues with protocols and delegates. I installed the swift package manager version and problem solved. Unfortunately that's the only solution. |
The examples also are not updated, so I just spent a good half hour trying to figure out why the example didn't compile at all. It still looks like this: struct DayLabel: CalendarItemViewRepresentable {
/// Properties that are set once when we initialize the view.
struct InvariantViewProperties: Hashable {
let font: UIFont
let textColor: UIColor
let backgroundColor: UIColor
}
/// Properties that will vary depending on the particular date being displayed.
struct Content: Equatable {
let day: Day
}
static func makeView(
withInvariantViewProperties invariantViewProperties: InvariantViewProperties)
-> UILabel
{
let label = UILabel()
label.backgroundColor = invariantViewProperties.backgroundColor
label.font = invariantViewProperties.font
label.textColor = invariantViewProperties.textColor
label.textAlignment = .center
label.clipsToBounds = true
label.layer.cornerRadius = 12
return label
}
static func setContent(_ content: Content, on view: UILabel) {
view.text = "\(content.day.day)"
}
} Just FYI. I don't have time to PR changes at the moment. Edit: Okay I just re-read the problem. It seems my version of the library is outdated, not the documentation. I just installed it via SPM and it claims to be version 1.16, so I'm not really sure what's going on. I've never installed it via cocoapods and I've never had another version. Edit: I just downloaded 1.16 directly from the tags, and it also has |
I am working with CalendarItemViewRepresentable file at the moment and I see that it has changed the
view model
tocontent
in its latest implementation. But when I update my HorizonCalendar library via cocoapods, it is not updating myCalendarItemViewRepresentable.swift
file.For example, the new method in this file should look like this
However, the fetched library via cocoapods still contain the following old method that was replaced with the above method a few months ago in the library
Here is the commit diff:
https://github.com/airbnb/HorizonCalendar/pull/208/files#diff-5beecc162f31533c7d3e0dfcf9a58f5ba2694ab91cf1254a62a38789b9d95e6e
Moreover, this is not restricted to just this file, but throughout the code, I don't see setViewModel being converted to setContent. Please let me know if I missed anything or it indeed is an issue.
The text was updated successfully, but these errors were encountered: