ios - How can I make a UIButton that has both an image and a title? -


i want set image , title auibutton. here both visible when using background image button. when using setimage method title no longer visible.

[self setbackgroundcolor:[uicolor clearcolor]];     [self settitleedgeinsets:uiedgeinsetsmake(0.0, 80.0, 0.0, 0.0)];     [self settitle:@"kansal ji" forstate:uicontrolstatenormal];     [self settitlecolor:[uicolor redcolor] forstate:uicontrolstatenormal];     [self.titlelabel setbackgroundcolor:[uicolor bluecolor]];      [self setimage:[uiimage imagenamed:@"categories.png"] forstate:uicontrolstatenormal];     [self.imageview setbackgroundcolor:[uicolor greencolor]];     [self setimageedgeinsets:uiedgeinsetsmake(0.0, 0.0, 0.0,kwidthofview(self)-kheightofview(self))];     self.clipstobounds = yes; 

please regarding this.here following code done in subclass of uibutton.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -