File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Sources/DataDrivenRxDatasources Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public enum CollectionCellType {
14
14
// directly form class
15
15
case classType( UICollectionViewCell . Type )
16
16
// from xib file
17
- case nibType( name: String )
17
+ case nibType( name: String , bundle : Bundle ? = nil )
18
18
// from storyboard
19
19
case prototype( reuseId: String )
20
20
}
@@ -37,8 +37,8 @@ extension CollectionCellType {
37
37
switch self {
38
38
case . classType( let type) :
39
39
collection. register ( type, forCellWithReuseIdentifier: identifier)
40
- case . nibType( let nibName) :
41
- collection. register ( UINib ( nibName: nibName, bundle: nil ) , forCellWithReuseIdentifier: identifier)
40
+ case . nibType( let nibName, let bundle ) :
41
+ collection. register ( UINib ( nibName: nibName, bundle: bundle ) , forCellWithReuseIdentifier: identifier)
42
42
case . prototype:
43
43
break // Must be registered in Storyboard
44
44
}
@@ -48,7 +48,7 @@ extension CollectionCellType {
48
48
switch self {
49
49
case . classType( let type) :
50
50
return " \( type) "
51
- case . nibType( let nibName) :
51
+ case . nibType( let nibName, _ ) :
52
52
return nibName
53
53
case . prototype( let id) :
54
54
return id
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public enum CellType {
14
14
// directly form class
15
15
case classType( UITableViewCell . Type )
16
16
// from xib file
17
- case nibType( name: String )
17
+ case nibType( name: String , bundle : Bundle ? = nil )
18
18
// from storyboard
19
19
case prototype( reuseId: String )
20
20
}
@@ -37,8 +37,8 @@ extension CellType {
37
37
switch self {
38
38
case . classType( let type) :
39
39
table. register ( type, forCellReuseIdentifier: identifier)
40
- case . nibType( let nibName) :
41
- table. register ( UINib ( nibName: nibName, bundle: nil ) , forCellReuseIdentifier: identifier)
40
+ case . nibType( let nibName, let bundle ) :
41
+ table. register ( UINib ( nibName: nibName, bundle: bundle ) , forCellReuseIdentifier: identifier)
42
42
case . prototype:
43
43
break // Must be registered in Storyboard
44
44
}
@@ -48,7 +48,7 @@ extension CellType {
48
48
switch self {
49
49
case . classType( let type) :
50
50
return " \( type) "
51
- case . nibType( let nibName) :
51
+ case . nibType( let nibName, _ ) :
52
52
return nibName
53
53
case . prototype( let id) :
54
54
return id
You can’t perform that action at this time.
0 commit comments