首页 > 其他 > 详细

uibutton 使用settitle后如何修改其中文字对齐方式

时间:2014-08-08 11:55:15      阅读:452      评论:0      收藏:0      [点我收藏+]

 UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
            btn.frame = CGRectMake(5, self.alertView.lableView.frame.size.height + self.checkBox.frame.size.height + 80.0f, self.localView.frame.size.width - self.localView.frame.size.width/8*2-30, 30);
            self.leftBtn = btn;
            //[self.leftBtn setBackgroundImage: [UIImage imageNamed:@"popup_btn@2x.png"]forState:(UIControlStateNormal)];
            //[self.leftBtn setBackgroundImage: [UIImage imageNamed:@"popup_btn_onfocus@2x.png"]forState:(UIControlStateHighlighted)];
            [self.leftBtn setTitle:NSLocalizedStringFromTable(@"alert_view_new_album_delete", @"StringInfo", nil) forState:UIControlStateNormal];
            [self.leftBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
            [self.leftBtn addTarget:self action:@selector(startNewAlbum:) forControlEvents:UIControlEventTouchUpInside];
            self.leftBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
            [self.alertView setLeftBtn:self.leftBtn];
            [btn release];

uibutton 使用settitle后如何修改其中文字对齐方式,布布扣,bubuko.com

uibutton 使用settitle后如何修改其中文字对齐方式

原文:http://www.cnblogs.com/lisa090818/p/3898682.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!