objective c - ios how to hide one uiview and push another uiview at the same position -
i want set myview hidden , view visible, how can this. code got far makes hidden. cgrect frame = cgrectmake(185, 960, 768, 1004); hiuiview *view = [[uiview alloc] initwithframe:frame]; view.backgroundcolor = [uicolor redcolor]; [self.myview addsubview:view]; [self.myview sethidden:yes]; you adding view inside , hide second. first child of second, hidden too. you can try adding "view" in parent of "myview".