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

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

ms access - C# - Using OleDbParameter on table name -