码迷,mamicode.com
首页 >  
搜索关键字:uilabel    ( 1031个结果
根据字体多少使UILabel自动调节尺寸
转自于:http://blog.csdn.net/enuola/article/details/8559588分两种情况考虑:1、UILabel宽度不变,根据字体多少,自动调整UILabel的高度,并折行显示。代码如下: 1 UILabel *label = [[UILabel alloc]...
分类:其他好文   时间:2014-05-24 05:02:13    阅读次数:225
控制UIlabel 垂直方向对齐方式的 方法
利用objective-c的category特性,修改UILabel的绘制代码
分类:其他好文   时间:2014-05-22 16:27:52    阅读次数:185
iOS 绘画学习
本文翻译自:《iOS 7编程》 Matt Neuburg 著,OREILLY出版。 很多UIView的子类,例如UIButton或者UIlabel,都知道如何绘制自己;不过迟早,你都会想绘制一些自己想要的效果。你可以通过一些已有的类在代码中绘制一幅图片,然后在自己的界面上展示出来,例如UIIm...
分类:移动开发   时间:2014-05-19 07:27:46    阅读次数:1132
iOS 设置UILabel 的内边距
iOS 设置UILabel 的内边距- (void)drawTextInRect:(CGRect)rect { UIEdgeInsets insets = {0, 5, 0, 5}; [super drawTextInRect:UIEdgeInsetsInsetRect(rect, in...
分类:移动开发   时间:2014-05-14 10:12:21    阅读次数:4319
UserDefaultes 数据存储使用
#import "RootViewController.h"@interface RootViewController ()@end@implementation RootViewController{ UILabel *txtInteger; UILabel *txtFloat; ...
分类:其他好文   时间:2014-05-07 19:59:59    阅读次数:461
shadowColor 详解
x向右为正,y向下为正 1.y  UILabel *label=[[UILabel alloc] initWithFrame:CGRectMake(40, 40, 250, 50)];     label.backgroundColor=[UIColor clearColor];     label.textColor=[UIColor redColor];     label...
分类:其他好文   时间:2014-05-06 21:10:50    阅读次数:341
IOS UITextView加上placeholder
UITextView上如何加上类似于UITextField的placeholder呢,其实在UITextView上加上一个UILabel,然后再实现- (BOOL)textView:(UITextView*)textView shouldChangeTextInRange:(NSRange)rang...
分类:移动开发   时间:2014-05-05 11:19:55    阅读次数:427
iOS开发之UILabel
UILabel是iOS开发中常用的一个组件,主要用来显示内容。UILabel的主要使用如下:```objc /*尺寸*/ CGRect labelRect = CGRectMake(100, 100, 80, 40); /*初始化*/ UILabel *titleLabel = [[UILabel ...
分类:移动开发   时间:2014-05-05 10:23:04    阅读次数:467
iOS7中计算UILabel中字符串的高度
iOS7中计算UILabel中字符串的高度iOS7中出现了新的方法计算UILabel中根据给定的Font以及str计算UILabel的frameSize的方法.本人提供category如下:UILabel+StringFrame.h//// UILabel+StringFrame.h// Lab.....
分类:移动开发   时间:2014-05-04 20:42:32    阅读次数:460
IOS UITextView加上placeholder
UITextView上如何加上类似于UITextField的placeholder呢,其实在UITextView上加上一个UILabel,然后再实现 - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text这个代理方法就可以了。 ...
分类:移动开发   时间:2014-04-29 13:42:21    阅读次数:337
1031条   上一页 1 ... 101 102 103 104 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!