0

I m new to iphone programmming and could not understand where I'm going wrong.

How to show only the current view and remove all other views? Because when I click on one of tab bar item to load a newview, it is showing prevoiusview in background and present view on the top of it .Because of this the screen is looking blurred. How to fix this?

4

2 に答える 2

0

新しいビューを追加する前にこれを使用してください:

for (UIView *subview in [self.view subviews]) {
    [subview removeFromSuperview];
}
于 2012-10-26T12:36:25.443 に答える
0

アクションが実行されるUIViewたびに作成されている場合。UITabBar

[view removeFromSuperview];

self.view に追加されたすべてのアイテムを削除する場合

for (id view in self.view) {
    [view removeFromSuperview];
}

それ以外の場合は使用

view.hidden=TRUE;
于 2012-10-26T12:39:57.560 に答える