Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @interface ...
- {
- UIView *disableViewOverlay;
- ...
- }
- @property(retain) UIView *disableViewOverlay;
- @synthesize disableViewOverlay;
- ...
- -(void) disableSearchBar
- {
- self.disableViewOverlay = [[UIView alloc]
- initWithFrame:CGRectMake(0.0f,0.0f,320.0f,44.0f)];
- self.disableViewOverlay.backgroundColor=[UIColor blackColor];
- self.disableViewOverlay.alpha = 0;
- self.disableViewOverlay.alpha = 0;
- [self.view addSubview:self.disableViewOverlay];
- [UIView beginAnimations:@"FadeIn" context:nil];
- [UIView setAnimationDuration:0.5];
- self.disableViewOverlay.alpha = 0.4;
- [UIView commitAnimations];
- }
- -(void) enableSearchBar
- {
- [disableViewOverlay removeFromSuperview];
- [searchBar resignFirstResponder];
- }
Add Comment
Please, Sign In to add comment