码迷,mamicode.com
首页 > 其他好文 > 详细

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

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

标签:style   color   使用   io   for   art   ar   cti   

 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后如何修改其中文字对齐方式

标签:style   color   使用   io   for   art   ar   cti   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!