I am using swift. I need to show float value in a UIlable. The scenario is like below:
if the value is like 1.50 it should show 1.5 only
and if the value is like 1.559 it should show 1.56
and if the value is like 2.0000 it should show only 2
and if the value is like 2.65 it should show only 2.65