UITextView ios7
- 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的更多相关文章
- IOS7开发~新UI学起(三)
1.UITextView: A ) IOS7新增加的 UITextViewDelegate 方法: - (BOOL)textView:(UITextView *)textView shoul ...
- [转]iOS7中UITextView contentsize改变时机
在iOS7以下版本中,对UITextView设置了text属性,则contentsize就会变化,从而可以根据contentsize的变化来改变UITextView高度来做出TextView高度随着输 ...
- UITextView 动态高度计算(iOS7版)
NSDictionary *attrsDictionary = [NSDictionarydictionaryWithObject:[UIFontsystemFontOfSize:kCellConte ...
- 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 ...
- 关于UITextView / String的尺寸
关于UITextView以及String的尺寸动态获取 iOS7开始,UITextView设置text后不会立即反映到contentSize属性,而是在父容器layoutSubviews时进行cont ...
- iOS7光标问题
iOS7光标问题 有网友遇到textView在ios7上出现编辑进入最后一行时光标消失,看不到最后一行,变成盲打,stackOverFlow网站上有大神指出,是ios7本身bug,加上下面一段代码即可 ...
- iOS7开发中的新特性
iOS7到现在已经发布了有一段时间了.相信你现在已经了解了它那些开创性的视觉设计,已经了解了它的新的API,比如说SpirteKit,UIKit Dynamics以及TextKit,作为开发者 ...
- UITextView 不左上角显示
在Autolayout中 UITextView显示不左上角显示,修改如下 在viewDidLoad里面添加如下代码 if([[[UIDevice currentDevice] systemVersio ...
- TextKit学习(三)NSTextStorage,NSLayoutManager,NSTextContainer和UITextView
先上一张图: 这是使用UITextView时用到的iOS7新增加的类:NSTextContainer.NSLayoutManager.NSTextStorage及其相互关系: 这三个新出的类还没有在官 ...
随机推荐
- 关于<:if>没有<c:else>解决方案
<c:if>没有<c:else>可以用<c:choose>来取代结构: <c:choose> <c:when test=""& ...
- HTML5 History对象,Javascript修改地址栏而不刷新页面
一.History对象 History 对象包含用户(在浏览器窗口中)访问过的 URL. History 对象是 window 对象的一部分,可通过 window.history 属性对其进行访问. ...
- (转)Android Touch事件传递机制
-----来源:http://www.trinea.cn/android/touch-event-delivery-mechanism/ 介绍Android Touch事件的传递机制. 不少朋友私信问 ...
- <q>标签,短文本引用
想在你的html中加一段引用吗?比如在你的网页的文章里想引用某个作家的一句诗,这样会使你的文章更加出彩,那么<q>标签是你所需要的. 语法: <q>引用文本</q> ...
- web前端对上传的文件进行类型大小判断的js自定义函数
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- CentOS6.5 下 Mysql5.7主从复制
包下载http://url.cn/WrNg5S 主数据库:192.168.161.129 从数据库1:192.168.161.130 从数据库1:192.168.161.138 MySQL安装地址:/ ...
- [CentOS 0010] CentOS 配置mysql允许远程登录
Mysql为了安全性,在默认情况下用户只允许在本地登录,可是在有此情况下,还是需要使用用户进行远程连接,因此为了使其可以远程需要进行如下操作: 一.允许root用户在任何地方进行远程登录,并具有所有库 ...
- js join()函数将数组转换成字符串
join() 方法用于把数组中的所有元素放入一个字符串.作用是将数组转换为字符串,其作用和toString()相同. 元素是通过指定的分隔符进行分隔的. 例如: var asp=['H','ell', ...
- js与jquery获取父元素,删除子元素的不同方法
var obj=document.getElementById("id");得到的是dom对象,对该对象进行操作的时候使用js方法 var obj=$("#id" ...
- php 用于绘图使用的颜色数组
$colorArr = array(0x912CEE, 0x99ff00, 0x312520, 0x801dae, 0x25f8cb, 0xCC3333, 0x808080, 0xa29b7c, 0x ...