We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
// course view source let courseViewSource = ClosureViewSource { (view: StudyCar2CouseView, data: StudyCarCourseListModel, index: Int) in view.model = data view.tapBtn = { model in self.tapApplyCourse <= model } } // coach view source let coachViewSource = ClosureViewSource { (view: StudyCar2CoachView, data: ClassCoachModel, index: Int) in view.model = data view.tapBtn = { model in self.tapApplyCoach <= model } } // empty space view source let emptyViewSource = ClosureViewSource { (view: UIView, model: StudyCar2ApplyViewTypeProtocol, index: Int) in } // size provider let sizeSource = { (index: Int, viewType: StudyCar2ApplyViewTypeProtocol, collectionSize: CGSize) -> CGSize in if viewType is StudyCarCourseListModel || viewType is ClassCoachModel { return CGSize(width: kScreenWid-30.fitR, height: 70.fitR) } return CGSize(width: 50, height: 50) } listView.provider = BasicProvider(dataSource: dataSource, viewSource: ComposedViewSource(viewSourceSelector: { (viewType) in if viewType is StudyCarCourseListModel { return courseViewSource } if viewType is ClassCoachModel { return coachViewSource } return emptyViewSource }), sizeSource: sizeSource )
when change data source
occur cast view type error: Could not cast value of type 'StudyCar2CouseView' to 'StudyCar2CoachView'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
when change data source
occur cast view type error:
Could not cast value of type 'StudyCar2CouseView' to 'StudyCar2CoachView'
The text was updated successfully, but these errors were encountered: