iphone - Using buttons to switch views -


I have a main view with four buttons, each time a button is added to a subview. But when I click on the button, and the subview comes up, I can not press any of the other buttons Do anyone have any suggestions? Here is a code when a button is clicked:

  newView = [[UIView alloc] initWithFrame: CGRectMake (25,25,50,20)]; [Add new view Add: Preview: testArena.view]; [New view set frame: CGRactam (0.0 F, 480.0F, 320.0F, 480.0F)]; [UIView Start Permissions: @ "Animate Arena View" Reference: Zero]; [UIView Set Animation Duration: 0.4]; [New view setframe: CGRactack (0.0 F, 20.0F, 320.0F, 460.0F)]; [UIView commitAnimations]; [New view set user interaction enabled: Yes]; [Self.view addSubview: newView];   

Where the new view is a UIView, and testArena.view is the square that I want to show.

Looks like the new view is hiding the buttons being pressed? Try sending it back, so this can not cover the button:

  [self.view sendSubviewToBack: newView];    

Comments