@property(nonatomic, readonly, retain) UILabel *titleLabelDescription - 描述A view that displays the value of the currentTitle property for a button. (r...
分类:
其他好文 时间:
2014-06-28 21:42:04
阅读次数:
277
一、RootViewController:
#import "RootViewController.h"
#import "SecondViewController.h"
@interface RootViewController ()
{
UILabel *_myLabel;
}
@end
@implementation RootViewController
- (id)in...
分类:
其他好文 时间:
2014-06-19 10:24:12
阅读次数:
283
UIButton的titleLabel@property(nonatomic, readonly, retain) UILabel *titleLabelDescription - 描述A view that displays the value of the currentTitle proper...
分类:
其他好文 时间:
2014-06-18 09:08:25
阅读次数:
160
NSString *str = @"我是一asdf我是一我是一我是一我是一我是一我是一我是一我是一我是一我是一我是一asdf我是一asdf我是一asdf我是一asdf我是一asdf我是一asdf"; CGSize labelSize = [str sizeWithFont:[UIFont boldS...
分类:
其他好文 时间:
2014-06-18 00:14:11
阅读次数:
189
做法如下:1. 取消xib的Use Autolayout属性的勾选:2. 将xib中每一个子控件(没错,每一个控件,包括UIButton、UILabel等等),将它们的Y Frame的值全部增加20。然后将它们的ΔY值全部设为-20。就是这样。
分类:
移动开发 时间:
2014-06-17 21:26:44
阅读次数:
440
UILabel*label = [[UILabelalloc]initWithFrame:CGRectMake(0, 0,75,40)]; //声明UIlbel并指定其位置和长宽label.backgroundColor= [UIColorclearColor]; //设置label的背景色,这里设...
分类:
移动开发 时间:
2014-06-17 20:54:11
阅读次数:
250
使用UILabel实现滚动字幕移动效果这个链接中的代码也实现了这种效果https://github.com/cbpowell/MarqueeLabel最终效果如下:原理如下:1. 获取文本2. 计算文本宽度3. 将这个Label放入ScrollView中4. 将ScrollView的contentS...
分类:
移动开发 时间:
2014-06-14 16:55:50
阅读次数:
362
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(320/2.0 - 140/2.0, 80, 140, 40)];label.text = @"Hello World";label.backgroundColor = [UICol...
分类:
移动开发 时间:
2014-06-14 08:32:55
阅读次数:
266
解决div嵌套时IE8和FF无法自适应高度
还是做类似新浪评论回复的时候,将回复的DIV嵌套在一个DIV中,然后点击回复的时候显示子DIV,这是父DIV的高度是会变化的,于是我将父DIV的高度设置为height:auto;可是问题就出现了,在IE6和IE7下父DIV的高度可以自适应而在IE8和FF下...
分类:
其他好文 时间:
2014-06-12 16:11:42
阅读次数:
196