UITextView *textView2 = [[UITextView alloc]initWithFrame:CGRectMake(, textView1.frame.size.height + , ,)];
textView2.backgroundColor = [UIColor clearColor];
textView2.textColor = [UIColor blackColor];
textView2.font= [UIFont systemFontOfSize:];
[scrollView addSubview:textView2];
[textView2 release];
textView2.text = [NSString stringWithFormat:@"%@\n%@",[dataDic objectForKey:@"retweeted_status_user_name"],[dataDic objectForKey:@"retweeted_status_text"]]; CGRect txtFrame1;
if(IOS7BC){
txtFrame1 = textView2.frame;
txtFrame1.size.height =[[NSString stringWithFormat:@"%@\n ",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;
}

UITextView ios7的更多相关文章

  1. IOS7开发~新UI学起(三)

    1.UITextView: A )      IOS7新增加的 UITextViewDelegate 方法: - (BOOL)textView:(UITextView *)textView shoul ...

  2. [转]iOS7中UITextView contentsize改变时机

    在iOS7以下版本中,对UITextView设置了text属性,则contentsize就会变化,从而可以根据contentsize的变化来改变UITextView高度来做出TextView高度随着输 ...

  3. UITextView 动态高度计算(iOS7版)

    NSDictionary *attrsDictionary = [NSDictionarydictionaryWithObject:[UIFontsystemFontOfSize:kCellConte ...

  4. UITextView in iOS7 doesn't scroll

    UITextView in iOS7 has been really weird. As you type and are entering the last line of your UITextV ...

  5. 关于UITextView / String的尺寸

    关于UITextView以及String的尺寸动态获取 iOS7开始,UITextView设置text后不会立即反映到contentSize属性,而是在父容器layoutSubviews时进行cont ...

  6. iOS7光标问题

    iOS7光标问题 有网友遇到textView在ios7上出现编辑进入最后一行时光标消失,看不到最后一行,变成盲打,stackOverFlow网站上有大神指出,是ios7本身bug,加上下面一段代码即可 ...

  7. iOS7开发中的新特性

        iOS7到现在已经发布了有一段时间了.相信你现在已经了解了它那些开创性的视觉设计,已经了解了它的新的API,比如说SpirteKit,UIKit Dynamics以及TextKit,作为开发者 ...

  8. UITextView 不左上角显示

    在Autolayout中 UITextView显示不左上角显示,修改如下 在viewDidLoad里面添加如下代码 if([[[UIDevice currentDevice] systemVersio ...

  9. TextKit学习(三)NSTextStorage,NSLayoutManager,NSTextContainer和UITextView

    先上一张图: 这是使用UITextView时用到的iOS7新增加的类:NSTextContainer.NSLayoutManager.NSTextStorage及其相互关系: 这三个新出的类还没有在官 ...

随机推荐

  1. Java数字、货币值和百分数等的格式化处理

    如果我们用下列语句输出一个数 System.out.println(123456.789); 将会在Console看到输出 123456.789 那么如何得到123,456.789这种格式化的输出呢? ...

  2. 图解MonoForAndroid开发环境搭建

    电脑系统:windows 8.1 企业版 预装VS:2010旗舰版+2013 with update2旗舰版 ==================================== 1.1 安装ja ...

  3. 查看library_cache 库缓冲区的命中率

    关于library cache的命中率:    SQL> desc V$librarycache    NAMESPACE                                     ...

  4. unexpected nil window in _UIApplicationHandleEventFromQueueEvent...

    unexpected nil window in _UIApplicationHandleEventFromQueueEvent, _windowServerHitTestWindow: <UI ...

  5. 跟我学android-使用Eclipse开发第一个Android应用(三)

    打开Eclipse,选择 File—New –Android Application Project Application Name  就是我们的 应用名称,也是我们在手机应用程序列表里看到的名称. ...

  6. js学习笔记之:数组(二)

    今天来学习一下数组的遍历.删除等知识点:    1 数组的遍历 数组元素的遍历可以使用for循环,采用关键字for...in var aCity =  new Array("北京" ...

  7. javascript 向上滚动

    <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta http-equiv="Co ...

  8. jquery animate函数实现

    jquery animate 函数 实现动画效果 参数一 比如高度宽度 之类的:'-=50' 参数二 速度之类 <html xmlns="http://www.w3.org/1999/ ...

  9. python运维开发之第六天

    Python面向对象 python从设计之初就已经是一门面向对象的语言,在python中创建一个类和对象很容易. 面向对象简介:类(class),类变量,object(基类),实例变量,构造函数,封装 ...

  10. php in_array比较原理和类型比较问题

    in_array 是PHP 的检查数组中是否存在某个值 的函数,里面有三个参数 bool in_array ( mixed $needle , array $haystack [, bool $str ...