• 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;
            }
  • 相关阅读:
    crontab与系统时间不一致
    MySQL构造测试数据
    【SQL优化】SQL优化工具
    mysql case when then 使用
    update没带where,寻找问题的思路
    线程池
    线程理论
    数据共享
    进程池
    管道
  • 原文地址:https://www.cnblogs.com/jiackyan/p/3438262.html
Copyright © 2020-2023  润新知