devinross / tapkulibrary

tap + haiku = tapku, a well crafted open source iOS framework
http://devinross.com/tapku/documentation
MIT License
3.9k stars 653 forks source link

Fix crash in coverflow view caused by scrolling and rotating device. #186

Closed pceccato closed 11 years ago

pceccato commented 12 years ago

I found a crash inside adjustViewHeirarchy due to it not checking for NSNull and have made a fix. Please consider incorporating it into your main branch.

It appears the coverViews array has all its elements initially set to NSNull, and they are and lazily assigned to TKCoverflowCoverView as required. The code in adjustViewHeirarchy was not checking for NSNull when calling sendSubviewToBack causing a crash. This bug was discovered by scrolling through the covers and rotating the device. Fix is to check for NSNull before calling sendSubviewToBack.

I noticed there are various places in the code where a NSNull check is made on the elements of the coverview array. I'm not sure what is the root cause of this issue... possibly some kind of timing issue.

devinross commented 11 years ago

See 6e6a37e319e57982722098ba7ef4ca95300ab701