Custom UI

Customize the UI components in your app

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
        }
    }
}

Customizable views

ComponentView name
Post buttonpostButton(let button)
Post text viewpostTextView(let textField)
Post close imagepostCloseImage(let image)
Post titlepostTitle(let label)
Post placeholder labelpostPlaceholderLabel(let label)
Post loading indicator (only shown on replies)postLoadingView(let loadingView)
Profile name labelprofileNameLabel(let label)
Profile logout labelprofileLogoutLabel(let label)
Profile close imageprofileCloseImage(let image)
Profile likes labelprofileLikesLabel(let label)
Profile followers labelprofileFollowersLabel(let label)
Profile segmented controlprofileSegmentedControl(let segmentedControl)
Comment cell date labelcommentCellDateLabel(let label)
Comment cell name labelcommentCellNameLabel(let label)
Comment cell content labelcommentCellContentLabel(let label)
Comment cell like imagecommentCellLikeImage(let image)
Comment cell like labelcommentCellLikeLabel(let label)
Comment cell dislike imagecommentCellDislikeImage(let image)
Comment cell dislike labelcommentCellDislikeLabel(let label)
Comment cell reply labelcommentCellReplyLabel(let label)
Comment cell replies labelcommentCellRepliesLabel(let label)
Preview comments empty viewpreviewEmptyCommentsView(let emptyCommentsView)
Preview comments see more comments buttonpreviewSeeMoreCommentsButton(let button)
Preview comments title labelpreviewTitleLabel(let label)
Preview comments counter labelpreviewCounterLabel(let label)
Preview comments loading viewpreviewLoadingView(let loadingView)
Preview comments privacy labelpreviewPrivacyLabel(let label)
Preview comments viafoura logopreviewPoweredByView(let poweredByView)
Trending vertical full imagetrendingVerticalFullImage(let image)
Trending vertical full title labeltrendingVerticalFullTitle(let label)
Trending vertical full count labeltrendingVerticalFullCount(let label)
Trending vertical condensed title labeltrendingVerticalCondensedTitle(let label)
Trending vertical condensed count labeltrendingVerticalCondensedCount(let label)
Trending carousel titletrendingCarouselTitle(let label)
Trending carousel imagetrendingCarouselImage(let image)
Trending carousel comment counttrendingCarouselCount(let label)
Chat cell content labelchatCellContentLabel(let label)
Chat cell date labelchatCellDateLabel(let label)
Chat cell user name labelchatCellUserNameLabel(let label)

What’s Next