MMCardView icon indicating copy to clipboard operation
MMCardView copied to clipboard

Memoryleaks

Open zhongwuzw opened this issue 9 years ago • 3 comments

revert code

zhongwuzw avatar Dec 18 '16 15:12 zhongwuzw

you can't remove (index >= shitIdx-2) if you have lots of cell will very slow because of cell in the rect of screen

MillmanY avatar Dec 18 '16 15:12 MillmanY

Yep, you can just add frame set when index < shitIdx-2,like add frame calculate

zhongwuzw avatar Dec 18 '16 16:12 zhongwuzw

By Instruments,I found the reason of frame drop is not attribute generate(ps. we can cache the attribute object,other than create new attribute object every layout loop),but offscreen-Rendered:

        self.layer.shadowOffset = offset
        self.layer.shadowOpacity = opacity
        self.layer.shadowColor = UIColor.black.withAlphaComponent(0.5).cgColor

zhongwuzw avatar Dec 21 '16 07:12 zhongwuzw