This article is connected to the terminal (that is, it is blocked by the main UI thread ). Google found a solution: Put the timer in a non-main thread and execute the UI update operation in the main thread, so that the UI main thread and timer can work with each other without mutual interference, the main code is as follows:
UILabel * NSTimer * @property (nonatomic, copy) NSString * @property (nonatomic, copy) NSString * @property (nonatomic, copy) NSString * hour = minute = second = totalSeconds = - ( - ( self = _lblShow = _lblShow.backgroundColor = _lblShow.font = [UIFont systemFontOfSize: _lblShow.textColor = _lblShow.textAlignment = _lblShow.numberOfLines = - ( (self = self.totalSeconds = minute * - ( _timer = [NSTimer scheduledTimerWithTimeInterval: - ( self.hour = _totalSeconds/ self.minute = _totalSeconds%/ self.second = _totalSeconds%% (_hour <= _lblShow.text = [NSString stringWithFormat: } _lblShow.text = [NSString stringWithFormat: - ( _hour = (_hour < self.strHour = [NSString stringWithFormat: } self.strHour = [NSString stringWithFormat: - ( _minute = (_minute < self.strMinute = [NSString stringWithFormat: } self.strMinute = [NSString stringWithFormat: - ( _second = (_second < self.strSecond = [NSString stringWithFormat: } self.strSecond = [NSString stringWithFormat: - ( _totalSeconds = - ( (_totalSeconds == self.totalSeconds -=