Make Subclassing BaseMessageCollectionViewCell Possible Outside of ChattoAdditions Module

-This commit exposes messageViewModel, createBubbleView() and init
functions of BaseMessageCollectionViewCell class to other modules by
changing their access modifiers to ‘public’.
-This also requires to change the access level of createBubbleView()
function of  TextMessageCollectionViewCell and
PhotoMessageCollectionViewCell to be made ‘public’
This commit is contained in:
Barış Çamur 2016-02-26 16:57:07 +02:00
parent 9bc3cfaabb
commit c7d4fcfbd5
3 changed files with 5 additions and 5 deletions

View File

@ -77,7 +77,7 @@ public class BaseMessageCollectionViewCell<BubbleViewType where BubbleViewType:U
}
}
var messageViewModel: MessageViewModelProtocol! {
public var messageViewModel: MessageViewModelProtocol! {
didSet {
updateViews()
}
@ -112,12 +112,12 @@ public class BaseMessageCollectionViewCell<BubbleViewType where BubbleViewType:U
}
public private(set) var bubbleView: BubbleViewType!
func createBubbleView() -> BubbleViewType! {
public func createBubbleView() -> BubbleViewType! {
assert(false, "Override in subclass")
return nil
}
override init(frame: CGRect) {
public override init(frame: CGRect) {
super.init(frame: frame)
self.commonInit()
}

View File

@ -38,7 +38,7 @@ public final class PhotoMessageCollectionViewCell: BaseMessageCollectionViewCell
super.init(frame: frame)
}
override func createBubbleView() -> PhotoBubbleView {
public override func createBubbleView() -> PhotoBubbleView {
return PhotoBubbleView()
}

View File

@ -40,7 +40,7 @@ public final class TextMessageCollectionViewCell: BaseMessageCollectionViewCell<
// MARK: Subclassing (view creation)
override func createBubbleView() -> TextBubbleView {
public override func createBubbleView() -> TextBubbleView {
return TextBubbleView()
}