Guest User

Untitled

a guest
Jul 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. @interface ...
  2. {
  3. UIView *disableViewOverlay;
  4. ...
  5. }
  6.  
  7. @property(retain) UIView *disableViewOverlay;
  8.  
  9. @synthesize disableViewOverlay;
  10.  
  11. ...
  12.  
  13. -(void) disableSearchBar
  14. {
  15. self.disableViewOverlay = [[UIView alloc]
  16. initWithFrame:CGRectMake(0.0f,0.0f,320.0f,44.0f)];
  17. self.disableViewOverlay.backgroundColor=[UIColor blackColor];
  18. self.disableViewOverlay.alpha = 0;
  19.  
  20. self.disableViewOverlay.alpha = 0;
  21. [self.view addSubview:self.disableViewOverlay];
  22.  
  23. [UIView beginAnimations:@"FadeIn" context:nil];
  24. [UIView setAnimationDuration:0.5];
  25. self.disableViewOverlay.alpha = 0.4;
  26. [UIView commitAnimations];
  27. }
  28.  
  29. -(void) enableSearchBar
  30. {
  31. [disableViewOverlay removeFromSuperview];
  32. [searchBar resignFirstResponder];
  33. }
Add Comment
Please, Sign In to add comment