@alex you got very close to answer but I found later that real culprit behind this was my call to that slider method. Here it was:
textOpacitySlider.addTarget(self, action: #selector(Opacity), for: .allEvents)
I am new to swift and I asked my manager that if calling for all events would be the issue, but he told me that it shouldn't create any mess but when I changed this to this:
textOpacitySlider.addTarget(self, action: #selector(Opacity), for: .touchDragInside)
It started working finely i.e. calling objc function only once! I think .allEvents was tracking
-When user touches slider
-When he changes it
-And when he left his finger up
That's why my method was being called thrice!