Question

The following IBAction will run when I don't have bookCoverUp.alpha = 0; in the code, but as soon as I add that code, and try running the program, the IBAction stops working completely.

-(IBAction)done:(id)sender
{
    bookCoverUp.alpha = 0;
    //this sends you to the desired viewcontroller
    SimpleTableView *newWindow = [self.storyboard
    instantiateViewControllerWithIdentifier:@"SimpleTableView"];
    [self.navigationController pushViewController:newWindow animated:YES];
}
Was it helpful?

Solution

This is the expected behavior for invisible views.

From the Apple doc:

To hide a view visually, you can either set its hidden property to YES or change its alpha property to 0.0. A hidden view does not receive touch events from the system.

OTHER TIPS

If you're looking to create a transparent button, change your button type to "Custom" (or in code, UIButtonTypeCustom) and don't give it a background colour or background image - it is transparent by default.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top