forked from zelo72/mastodon-ios
19 lines
336 B
Swift
19 lines
336 B
Swift
|
//
|
||
|
// 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()
|
||
|
}
|
||
|
}
|