Gavin.han

致力于移动开发 技术改变生活

导航

2012年10月22日

摘要: 常用属性:frame,bounds和center重要方法 :addSubview 把一个子控件添加到一个父控件中;Superview 返回子控件的父控件常用函数:- (void)removeFromSuperview; - (void)insertSubview:(UIView *)view atIndex: (NSInteger)index; - (void)exchangeSubviewAtIndex: (NSInteger)index1 withSubviewAtIndex:(NSIn... 阅读全文

posted @ 2012-10-22 11:59 gavin.han 阅读(378) 评论(0) 推荐(0) 编辑

摘要: 上面的通过代码实现:NSString *str = @"字符串大小字符串大小字符串大小字符串大小"; UIFont *font = [UIFont fontWithName:@"Arial" size:50.0f]; CGSize size = CGSizeMake(320, 2000); UILabel *label = [[UILabel alloc] initWithFrame:CGRectZero]; [label setNumberOfLines:0]; CGSize labelSize = [str sizeWi... 阅读全文

posted @ 2012-10-22 11:46 gavin.han 阅读(251) 评论(0) 推荐(0) 编辑