UICollectionView crash on unhighlightAllItems

前端 未结 4 1060
别那么骄傲
别那么骄傲 2021-02-09 01:26

I\'ve gotten several crash reports related to a UICollectionView in iOS 7. I\'m not able to consistently recreate this crash.

Exception Type:  SIGSEGV
Exception         


        
4条回答
  •  青春惊慌失措
    2021-02-09 01:56

    Not sure after identifying only this piece of code. But as crash signal (SIGSEGV) seems due to memory leak. You just go to your Xcode setting and inside Edit Scheme jsut enable Zombie option and then try to reproduce your crash. It will show you the controller class name of method or any crash related information inside console of Xcode. And also just try to modify you condition below:-

    - (void)setHighlighted:(BOOL)highlighted {
    
         //just comment this line or write this line to the below and check
         //[super setHighlighted:highlighted];
        if (highlighted) {
            self.alpha = 0.8;
        } else {
            self.alpha = 1.0;
        }
        [super setHighlighted:highlighted];
    }
    

提交回复
热议问题