Don't allow user interaction when activity indicator view is visible

后端 未结 10 2173
你的背包
你的背包 2020-12-24 02:30

I have a view which contains two views. One of those views contains two buttons and some text labels. The other one, with alpha set to 0.25, has an UIActivityIndicator

10条回答
  •  情深已故
    2020-12-24 03:07

    [_button setUserInteractionEnabled:NO];
    

    That should disable it, just set YES for when you want to user to tap it.

    BOOL i_am_ready_to_submit = NO;
    
    -(void)action_finished{
    
    [self.activityIndicator stopAnimating];
    
    i_am_ready_to_submit = YES;
    
    }
    
    -(IBAction)submit_button{
    
    if(i_am_ready_to_submit){
    
    [self submit];
    
    }
    
    }
    

提交回复
热议问题