I have the following code repeated in many of my view controllers. I would like to refactor it into a global class/view controller. However, I still want it to be s
view controllers
I like extensions for this.
If you extend uiviewcontroller you should be able to put this function inside and then you'd be able to call it from any view controller.