UIStackView: Refactor extension method vc_removeAllSubviews to vc_removeAllArrangedSubviews.

This commit is contained in:
SBiOSoftWhare
2019-12-20 10:32:09 +01:00
parent c3a9935c99
commit 1694031a34
3 changed files with 4 additions and 4 deletions
@@ -103,13 +103,13 @@ final class ReactionsMenuView: UIView, Themable, NibLoadable {
private func fill(reactionsMenuViewDatas: [ReactionMenuItemViewData]) {
self.reactionViewDatas = reactionsMenuViewDatas
self.reactionsStackView.vc_removeAllSubviews()
self.reactionsStackView.vc_removeAllArrangedSubviews()
let reactionsStackViewCount = self.reactionsStackView.arrangedSubviews.count
// Remove all menu buttons if reactions count has changed
if reactionsStackViewCount != self.reactionViewDatas.count {
self.reactionsStackView.vc_removeAllSubviews()
self.reactionsStackView.vc_removeAllArrangedSubviews()
}
var index = 0