Iphone remove sub view

The clue is here

for (UIView *subView in self.view.subviews)

each subView is of class UIView and your test

isKindOfClass:[TableViewController class]

is testing for class TableViewController

I would suggest a way of doing this would be by tagging the views that you add dynamically, with say 99 – and then in your loop you can identify those views by their tag.

eg.

for (UIView *subView in self.view.subviews)
{
    if (subView.tag == 99) 
    {
        [subView removeFromSuperview];
    }
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)