码迷,mamicode.com
首页 >  
搜索关键字:uilabel 调整行间距 计算frame    ( 1043个结果
ios7以上自定义导航栏标题的字体大小及颜色的方法
自定义导航栏的字体和颜色,只需要自定义一个lable,然后将lable添加到导航栏的titleview中就可以了 代码如下 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0,0,0,0)];//这个frame是初设的,没关系,后
分类:移动开发   时间:2016-02-15 12:17:19    阅读次数:223
IOS 手势事件的冲突
关于手操作需要强调几点: UIImageView默认是不支持交互的,也就是userInteractionEnabled=NO ,因此要接收触摸事件(手势识别),必须设置userInteractionEnabled=YES(在iOS中UILabel、UIImageView的userInteractio
分类:移动开发   时间:2016-02-03 16:38:04    阅读次数:668
UILabel 设置字体间的距离 和 行与行间的距离
//设置字间距 [self.label setColumnSpace:5]; //设置行间距 [self.label setRowSpace:5];
分类:其他好文   时间:2016-02-02 16:38:53    阅读次数:152
iOS之富文本(二)
之前做项目时遇到一个问题: 使用UITextView显示一段电影的简介,由于字数比较多,所以字体设置的很小,行间距和段间距也很小,一大段文字挤在一起看起来很别扭,想要把行间距调大,结果在XCode中查遍其所有属性才发现,UITextView居然没有调整行间距的接口,于是忍住不心里抱怨了一下下。 但是
分类:移动开发   时间:2016-01-31 13:21:13    阅读次数:249
手表例题
@interface MyTableViewCell : UITableViewCell @property (nonatomic, retain) UIImageView *headerImageView; @property (nonatomic, retain) UILabel *titleL
分类:其他好文   时间:2016-01-30 17:56:31    阅读次数:239
UILabel 调整行间距
/* 调整行间距 */ + (void)adjustLineSpacingOfLabel:(UILabel *)label to:(CGFloat)lineSpacing { NSString *textStr = label.text; if (textStr.length <= 0) { return; } NSMutableAtt...
分类:其他好文   时间:2016-01-30 02:55:18    阅读次数:151
重写UILabler的sizeThatFits方法,需要触发两次才会有效果
#import "ViewController.h" @interface SpecialLabel:UILabel @end @implementation SpecialLabel - (CGSize)sizeThatFits:(CGSize)size { CGSize s = [super s
分类:其他好文   时间:2016-01-30 01:55:14    阅读次数:275
触摸事件,响应者链和手势
1.触摸事件 1 #import "ViewController.h" 2 @interface ViewController () 3 @property (strong,nonatomic) UILabel *simple; 4 @end 5 6 @implementation ViewCont
分类:其他好文   时间:2016-01-27 21:13:46    阅读次数:119
IOS 自定义导航栏标题和返回按钮标题
IOS中自定义导航栏标题: UILabel *titleText = [[UILabel alloc] initWithFrame: CGRectMake(160, 0, 120, 50)]; titleText.backgroundColor = [UIColor clearColor]; tit...
分类:移动开发   时间:2016-01-27 14:38:41    阅读次数:303
ios学习day3
UIlabelUILabel * label = [[UILabel alloc] initWithFrame:CGRectMake(10,30, CGRectGetWidth(self.view.frame) -20, 200)]; //设置文字 label.text = @"欢迎收看灌篮高手.....
分类:移动开发   时间:2016-01-26 10:23:41    阅读次数:221
1043条   上一页 1 ... 31 32 33 34 35 ... 105 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!