In swift I can give a view a tag
  let MY_CUSTOM_TAG = 123
  tableView.tag = MY_CUSTOM_TAG
My question is, how do I remove a view from the superview with a tag using swift?
Objective C example:
#define MY_CUSTOM_TAG 1234
mySubview.tag = MY_CUSTOM_TAG;
[self.tableView addSubview:mySubview] ;
//remove view with tag
[[self.tableView viewWithTag:MY_CUSTOM_TAG]removeFromSuperview] ;
                It's the same way with Objective-C, just has a different syntax;
view.viewWithTag(tag).removeFromSuperview()
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With