I have a table in my masterView and in my detailView i have some imageView, based on different row selection in my masterView i have to remove ImageView and add some other views. Im unable to remove the ImageView.... any help ??? thanks in advance
try:
for (UIView *view in masterView.subviews){
if (view == yourImageView) {
[view removeFromSuperview];
}
}
first you provide tag values other than 0 to all your imageview
and then
for (UIView *sub in [self.view subviews]) {
use tag to find proper view and remove it from superView
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.