KieranLafferty/KLSwitch — pull request #16 by manuyavuz (2014-09-04 07:38:05+00:00)
Title: Improvements to solve laggy scroll performance in older devices. 

If we use KLSwitch views in UITableViewCells, scroll performance of table view degrades and becomes laggy.

The reason is that KLSwitch sets "cornerRadius" property, and this results in performance hit when drawing layers.

To solve this, we masksToBounds to yes on related layers, so that drawing system does not try to apply rounded masks to view. Also we set shouldRasterize property to YES to draw view as a bitmap and cache it. (Details can be found in the documentation.)

This setup gives back the tableview it's smooth scroll performance.