简体   繁体   中英

Setting header label text indentation

I am working on a Customized tableview with header text label. In tableview delegate method viewForHeaderInSection I am setting

CGFloat indentWidth = 0.7f;
CGRect frame = headerLabel.frame;
frame.origin.x = indentWidth;
headerLabel.frame = frame;

This is not working and header label is still stuck to the tableview border. I tried to change the indentWidth but it is not working that way.

尝试这个:

headerLabel.frame = CGRectMake( put new rect here );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM