Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Don't use synchronous network calls to disable user input. Whoever suggested that gave you very bad advice.</p> <p>If you just want to disable input for your current view and its subviews, you can do <code>self.view.userInteractionEnabled = NO;</code> in your view controller.</p> <p>If you want to disable input for the entire window, you can do <code>self.view.window.userInteractionEnabled = NO;</code></p> <p>You won't need to disable user interaction at all if you overlay a full-screen view on top of your user interface. Based on your mock-up image, I think this is what you're trying to do. To do this, you can do something like this:</p> <pre><code>self.overlayView = [[[UIView alloc] initWithFrame:self.view.window.bounds] autorelease]; self.overlayView.backgroundColor = [UIColor blackColor]; self.overlayView.alpha = 0.5f; [self.view.window addSubview:self.overlayView]; self.activityIndicator = [[[UIActivityIndicator alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite] autorelease]; self.activityIndicator.center = self.view.window.center; [self.view.window addSubview:self.activityIndicator]; [self.activityIndicator startAnimating]; self.activityLabel = [[[UILabel alloc] initWithFrame:CGRectZero] autorelease]; self.activityLabel.text = @"Loading..."; [self.activityLabel sizeToFit]; self.activityLabel.center = CGPointMake(self.activityIndicator.center.x, self.activityIndicator.center.y - self.activityIndicator.frame.size.height); [self.view.window addSubview:self.activityLabel]; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload