alibaba / alibaba/HandyJSON

在rxDataSource库下怎么用?

Open
#257 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
4.3k
Forks
677
PR merge metrics
No merged PRs in 30d

Description

struct NormalSecModel{

var title: String
var isMore: Bool = true
var iconUrl: String
var items: [Item]

}
extension NormalSecModel: SectionModelType {
typealias Item = NormalCellModel

init(original: NormalSecModel, items: [Item]) {
self = original
self.items = items
}
}

extension NormalSecModel: HandyJSON {
init() {

}
}

此时就会报错Return from initializer without initializing all stored properties
有案例吗

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the NormalSecModel declaration and its HandyJSON initializer shown in the issue, then review how the model is intended to work with rxDataSource. Confirm what initialization example should be documented and that the example no longer produces the reported stored-property initialization error.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.