Skip to content

Instantly share code, notes, and snippets.

@casspangell
Created April 10, 2012 21:11
Show Gist options
  • Save casspangell/2354628 to your computer and use it in GitHub Desktop.
Save casspangell/2354628 to your computer and use it in GitHub Desktop.
//allocate the view that contains the popup
popUpView = [[UIView alloc] initWithFrame:CGRectMake(POPUP_X, POPUP_Y, POPUP_WIDTH, POPUP_HEIGHT)];
popUpView.backgroundColor = [UIColor whiteColor];
[self.view addSubview:popUpView];
UIButton *clickHere = [UIButton buttonWithType:UIButtonTypeCustom];
clickHere.frame = popUpView.frame;
clickHere.backgroundColor = [UIColor redColor];
[popUpView addSubview:clickHere];
[clickHere setTitle:@"Click Here" forState:UIControlStateNormal];
[clickHere addTarget:self action:@selector(clickHereTapped) forControlEvents:UIControlStateNormal];
[popUpView bringSubviewToFront:clickHere];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment