当前位置:编程学习 > wap >>

UIButton上使用UIEdgeInsetsMaketitle跟图片对齐

默认情况下,不设置的效果,都使居中现实,button为150*150

\
    [self setTitleEdgeInsets:UIEdgeInsetsMake( -80.0,-backGroundImag.size.width, 0.0,0.0)];

    [self setImageEdgeInsets:UIEdgeInsetsMake(0.0, 0.0,0.0, -self.titleLabel.bounds.size.width)];

\

over!



摘自 Annie的专栏
补充:移动开发 , IOS ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,