iphone - Putting a button in table footer view -



iphone - Putting a button in table footer view -

i creating custom button , putting in table's footer view button going way out right corner.

what wrong here!?!

here code , output image:

uibutton *abutton = [uibutton buttonwithtype:uibuttontypecustom]; [abutton settitlecolor:[uicolor whitecolor] forstate:uicontrolstatenormal]; [abutton settitlecolor:[uicolor colorwithwhite:0.0 alpha:0.56] forstate:uicontrolstatedisabled]; [abutton setbackgroundimage:[[uiimage imagenamed:@"test.png"] stretchableimagewithleftcapwidth:kbuttonslicewidth topcapheight:0] forstate:uicontrolstatenormal]; [abutton settitle:@"click me" forstate:uicontrolstatenormal]; [abutton.titlelabel setfont:[uifont boldsystemfontofsize:kfontsize14]]; [abutton setframe:cgrectmake(10.0, 15.0, 300.0, 44.0)]; [self.tableview settablefooterview:abutton];

i added button in uiview , set tablefooterview uiview object , worked. cannot straight set uibutton tablefooterview.

iphone ios cocoa-touch uitableview uibutton

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -