zoukankan      html  css  js  c++  java
  • UITextView ios7

    UITextView *textView2 = [[UITextView alloc]initWithFrame:CGRectMake(0, textView1.frame.size.height + 60, 495,20)];
            textView2.backgroundColor = [UIColor clearColor];
            textView2.textColor = [UIColor blackColor];
            textView2.font= [UIFont systemFontOfSize:19];
            [scrollView addSubview:textView2];
            [textView2 release];
            textView2.text = [NSString stringWithFormat:@"%@
    %@",[dataDic objectForKey:@"retweeted_status_user_name"],[dataDic objectForKey:@"retweeted_status_text"]];
            
            CGRect txtFrame1;
            if(IOS7BC){
                txtFrame1 = textView2.frame;
                txtFrame1.size.height =[[NSString stringWithFormat:@"%@
     ",textView2.text]
                                       boundingRectWithSize:CGSizeMake(txtFrame1.size.width, CGFLOAT_MAX)
                                       options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading
                                       attributes:[NSDictionary dictionaryWithObjectsAndKeys:textView2.font,NSFontAttributeName, nil] context:nil].size.height;
                textView2.frame = txtFrame1;
            }else
            {
                textView2.editable = NO;
                textView2.scrollEnabled= NO;
                [scrollView addSubview:textView2];
                CGSize size02 = textView2.contentSize;
                CGRect frame02 = textView2.frame;
                frame02.size = size02;
                textView2.frame=frame02;
            }
  • 相关阅读:
    java线程
    面向切面编程
    控制反转IOC与依赖注入DI
    phpexecel 导入导出,格式
    PHPExcel设置数据格式的几种方法
    九度oj 题目1416:猴子吃坚果
    九度oj 题目1397:查找数段
    poj 1065 Wooden Sticks
    poj 3181 Dollar Dayz
    poj 1742 Coins
  • 原文地址:https://www.cnblogs.com/jiackyan/p/3438262.html
Copyright © 2011-2022 走看看