Suggestion; don't do that!!!
You really don't want to override behavior of all instances of any given UIKit class across all instances within your application for a couple of reasons.
First, you'll be changing the behavior of the class in ways that the class was likely not designed to deal with. As well, instances that are in UI hierarchies that are beyond your control (embedded complex framework components, typically) will behave differently, too.
Secondly, there is no way your implementation can know the internal implementation details of the original implementation to the point of not risking failing to make the same assumptions. While you could do something swizzle-like, down that path is extremely fragile and will be a maintenance nightmare.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…