Kurdtvs-Live-Kurdish-TV-Kur.../Mastodon/Extension/UIView+Remove.swift

19 lines
336 B
Swift
Raw Normal View History

2021-04-16 15:55:09 +02:00
//
// UIView+Remove.swift
// Mastodon
//
// Created by xiaojian sun on 2021/4/16.
//
import Foundation
import UIKit
extension UIView {
func removeFromStackView() {
if let stackView = self.superview as? UIStackView {
stackView.removeArrangedSubview(self)
}
self.removeFromSuperview()
}
}