Skip to content

Commit 0d683e0

Browse files
committed
Fixes example code for section init. #47
1 parent 7d292f9 commit 0d683e0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Example/Example4_DifferentSectionAndItemTypes.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,14 @@ extension MultipleSectionModel: SectionModelType {
9696
}
9797

9898
init(original: MultipleSectionModel, items: [Item]) {
99-
self = original
99+
switch original {
100+
case let .ImageProvidableSection(title: title, items: _):
101+
self = .ImageProvidableSection(title: title, items: items)
102+
case let .StepperableSection(title, _):
103+
self = .StepperableSection(title: title, items: items)
104+
case let .ToggleableSection(title, _):
105+
self = .ToggleableSection(title: title, items: items)
106+
}
100107
}
101108
}
102109

0 commit comments

Comments
 (0)