If I want to disable the scroll indicator in all tableview and collectionview, what minimum changes do I need to make?
Suppose, I have 50 tableviews in my project, I don't want to set the property below in all of them or make changes to so many storyboards.
self.tableView.showsHorizontalScrollIndicator = false
self.tableView.showsVerticalScrollIndicator = false
Basically, I need to mutate a property of an object in one place only that will be reflected in all its instances or child inheriting it.
More context:
- I tried
protocol with default implementationbut I need to call it somewhere anyway. Is there a hook that gets called every time an object in swift is instantiated for a particular class where I can attach some function or execution block that mutates those properties? - Maybe javascript
object prototype mutationis something similar to what I am looking for, which has an adverse performance impact at the time of mutation, and in subsequent execution. What is the performance penalty for similar things (if exist) in swift?