You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been pointed to this lib after having created almost the same thing for one of our projects. I have done a couple of things differently, so I thought sharing them here might lead to a productive discussion:
public protocol Loadable {
static var nib: UINib { get }
}
public protocol Reusable {
static var reuseIdentifier: String { get }
}
public protocol LoadableCell: Reusable, Loadable {}
Having no direct relation between Loadable and Reusable allows for usage with UIViews designed in xib:
I have been pointed to this lib after having created almost the same thing for one of our projects. I have done a couple of things differently, so I thought sharing them here might lead to a productive discussion:
Having no direct relation between
Loadable
andReusable
allows for usage withUIViews
designed in xib:This is of course possible with
NibReusable
as well, but for simple loading ofUIView
fromUINib
nameLoadable
is a better fit.Thoughts?
The text was updated successfully, but these errors were encountered: