The VFCustomUIDelegate allows you to customize the UI components, by giving you direct references to them.
guard let preCommentsViewController = VFPreviewCommentsViewController.new(
containerId: containerId,
articleMetadata: articleMetadata,
loginDelegate: self, settings: settings) else {
return
}
preCommentsViewController.setCustomUIDelegate(customUIDelegate: self)
guard let newCommentViewController = VFNewCommentViewController.new(newCommentActionType: actionType, containerId: containerId, articleMetadata: articleMetadata, loginDelegate: self, settings: settings) else {
return
}
newCommentViewController.setCustomUIDelegate(customUIDelegate: self)
guard let profileViewController = VFProfileViewController.new(userUUID: userUUID, presentationType: presentationType, loginDelegate: self, settings: settings) else {
return
}
profileViewController.setCustomUIDelegate(customUIDelegate: self)
Implement the VFCustomUIDelegate.
extension ArticleViewController: VFCustomUIDelegate {
func customizeView(view: VFCustomizableView) {
switch view {
case .postButton(let button):
break
default:
break
}
}
}
Component | View name |
---|
Post button | postButton(let button) |
Post text view | postTextView(let textField) |
Post close image | postCloseImage(let image) |
Post title | postTitle(let label) |
Post placeholder label | postPlaceholderLabel(let label) |
Post loading indicator (only shown on replies) | postLoadingView(let loadingView) |
| |
---|
Profile name label | profileNameLabel(let label) |
Profile logout label | profileLogoutLabel(let label) |
Profile close image | profileCloseImage(let image) |
Profile likes label | profileLikesLabel(let label) |
Profile followers label | profileFollowersLabel(let label) |
Profile segmented control | profileSegmentedControl(let segmentedControl) |
| |
---|
Comment cell date label | commentCellDateLabel(let label) |
Comment cell name label | commentCellNameLabel(let label) |
Comment cell content label | commentCellContentLabel(let label) |
Comment cell like image | commentCellLikeImage(let image) |
Comment cell like label | commentCellLikeLabel(let label) |
Comment cell dislike image | commentCellDislikeImage(let image) |
Comment cell dislike label | commentCellDislikeLabel(let label) |
Comment cell reply label | commentCellReplyLabel(let label) |
Comment cell replies label | commentCellRepliesLabel(let label) |
| |
---|
Preview comments empty view | previewEmptyCommentsView(let emptyCommentsView) |
Preview comments see more comments button | previewSeeMoreCommentsButton(let button) |
Preview comments title label | previewTitleLabel(let label) |
Preview comments counter label | previewCounterLabel(let label) |
Preview comments loading view | previewLoadingView(let loadingView) |
Preview comments privacy label | previewPrivacyLabel(let label) |
Preview comments viafoura logo | previewPoweredByView(let poweredByView) |
| |
---|
Trending vertical full image | trendingVerticalFullImage(let image) |
Trending vertical full title label | trendingVerticalFullTitle(let label) |
Trending vertical full count label | trendingVerticalFullCount(let label) |
| |
---|
Trending vertical condensed title label | trendingVerticalCondensedTitle(let label) |
Trending vertical condensed count label | trendingVerticalCondensedCount(let label) |
| |
---|
Trending carousel title | trendingCarouselTitle(let label) |
Trending carousel image | trendingCarouselImage(let image) |
Trending carousel comment count | trendingCarouselCount(let label) |
| |
---|
Chat cell content label | chatCellContentLabel(let label) |
Chat cell date label | chatCellDateLabel(let label) |
Chat cell user name label | chatCellUserNameLabel(let label) |