I am using a UIButton in my application. This button title is displayed dynamically as per the user choice. Now i have to resize the button width as per the title content. I am calculating the string length and assigning it to button s width.
the button is resized as per title but the problem is as follows, 1. If at first the title with large content is shown and after that if a title with a small content is shown means the button is overwritten it doesn t remove the previously constructed value. 2. it looks as if one button is overlapped on the another.