Showing
2 changed files
with
10 additions
and
10 deletions
No preview for this file type
... | @@ -10,7 +10,7 @@ import Foundation | ... | @@ -10,7 +10,7 @@ import Foundation |
10 | 10 | ||
11 | // MARK: - Section Types | 11 | // MARK: - Section Types |
12 | 12 | ||
13 | -enum SectionType { | 13 | +public enum SectionType { |
14 | case myRewardsProfileInfo // MyRewardsProfileInfoTableViewCell | 14 | case myRewardsProfileInfo // MyRewardsProfileInfoTableViewCell |
15 | case myRewardsBannerOffers // MyRewardsBannerOffersScrollTableViewCell | 15 | case myRewardsBannerOffers // MyRewardsBannerOffersScrollTableViewCell |
16 | case myRewardsHorizontalCouponsets // MyRewardsOffersScrollTableViewCell | 16 | case myRewardsHorizontalCouponsets // MyRewardsOffersScrollTableViewCell |
... | @@ -21,7 +21,7 @@ enum SectionType { | ... | @@ -21,7 +21,7 @@ enum SectionType { |
21 | case staticContent // Any cell that displays static content | 21 | case staticContent // Any cell that displays static content |
22 | } | 22 | } |
23 | 23 | ||
24 | -enum ItemType { | 24 | +public enum ItemType { |
25 | case profile // ProfileModel | 25 | case profile // ProfileModel |
26 | case campaigns // [CampaignItemModel] | 26 | case campaigns // [CampaignItemModel] |
27 | case couponSets // [CouponSetItemModel] | 27 | case couponSets // [CouponSetItemModel] |
... | @@ -33,18 +33,18 @@ enum ItemType { | ... | @@ -33,18 +33,18 @@ enum ItemType { |
33 | 33 | ||
34 | // MARK: - SectionModel | 34 | // MARK: - SectionModel |
35 | 35 | ||
36 | -struct SectionModel { | 36 | +public struct SectionModel { |
37 | - let sectionType: SectionType // MANDATORY - defines which cell to use | 37 | + public let sectionType: SectionType // MANDATORY - defines which cell to use |
38 | - let title: String? // OPTIONAL - section title | 38 | + public let title: String? // OPTIONAL - section title |
39 | - let items: [Any]? // OPTIONAL - array of items (nil for sections with no items) | 39 | + public let items: [Any]? // OPTIONAL - array of items (nil for sections with no items) |
40 | - let itemType: ItemType? // OPTIONAL - type of items in the array | 40 | + public let itemType: ItemType? // OPTIONAL - type of items in the array |
41 | - let count: Int? // OPTIONAL - explicit count (computed from items.count if nil) | 41 | + public let count: Int? // OPTIONAL - explicit count (computed from items.count if nil) |
42 | - let metadata: [String: Any]? // OPTIONAL - additional section-specific data | 42 | + public let metadata: [String: Any]? // OPTIONAL - additional section-specific data |
43 | } | 43 | } |
44 | 44 | ||
45 | // MARK: - SectionModel Extensions | 45 | // MARK: - SectionModel Extensions |
46 | 46 | ||
47 | -extension SectionModel { | 47 | +public extension SectionModel { |
48 | // Convenience initializer for sections with items | 48 | // Convenience initializer for sections with items |
49 | init(sectionType: SectionType, title: String? = nil, items: [Any], itemType: ItemType, metadata: [String: Any]? = nil) { | 49 | init(sectionType: SectionType, title: String? = nil, items: [Any], itemType: ItemType, metadata: [String: Any]? = nil) { |
50 | self.sectionType = sectionType | 50 | self.sectionType = sectionType | ... | ... |
-
Please register or login to post a comment