大夏VIEW使用技巧
HDXTextView *remark=[[HDXTextView alloc] initWithFrame:CGRectMake(leftmargin-5,labbackView.top, cellContentView.width-2*leftmargin+10, txtViewHeight)];
remark.tag=indexPath.row;
remark.layer.borderWidth=0.5;
remark.layer.borderColor=[Toolobject hexStringToColor:@"ffffff" ].CGColor;
[cellContentView addSubview:remark];
remark.font=[UIFont systemFontOfSize:12];
remark.placeholder=@"请填写任务异常说明 (必填)";
remark.placeholderColor=[Toolobject hexStringToColor:@"cfcfcf" ];
remark.surplusLblPlaceholderSizelen=500;
remark.surplusLblPlaceholder=@"还可输入500字";
remark.surplusLblPlaceholderColor=[Toolobject hexStringToColor:@"cfcfcf" ];
cellContentView.height=remark.bottom+25;
if(![self isEditingException]){
remark.editable=NO;
remark.placeholder=@"";
remark.textColor=[Toolobject hexStringToColor:@"666666" ];
remark.text=[NSString stringWithFormat:@"异常说明: %@",[dict objectForKey:@"content"]];
cellContentView.height=remark.bottom+5;
}
__weak typeof(remark) weakRemark=remark;
remark.editblock=^(NSString *strcontent){
//修改输入内容
if(self.tableArray.count<=remark.tag){
[weakRemark resignFirstResponder];
return ;
}
NSMutableDictionary *dict=[NSMutableDictionary dictionaryWithDictionary:[self.tableArray objectAtIndex:weakRemark.tag]];
[dict setObject:strcontent forKey:@"content"];
[self.tableArray setObject:dict atIndexedSubscript:weakRemark.tag];
};
大夏VIEW使用技巧的更多相关文章
- MVC View小技巧
1.在View中添加命名空间引用 1)直接在.cshtml文件中添加 @using MvcMusicStore.Models 2)在Views文件夹的web.config文件中添加,对整个Views文 ...
- 各类.NET学习视频推荐
想提高个人的技术水平一般来说都是看书.看博客.看官方实例.看视频等等,最近我也总算是稍微空了一点了,所以想找点学习资源看下,相对的我比较倾向于看 视频,因为看视频一般都有讲师讲解,而且许多视频都讲的不 ...
- Container View 使用小技巧
一.传值,顺传 -(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { TVC *vc = segue.destin ...
- iOS开发小技巧--获取自定义的BarButtonItem中的自定义View的方法(customView)
如果BarButtonItem是通过[[UIBarButtonItem alloc] initWithCustomView:(nonnull UIView *)]方法设置的.某些情况下需要修改BarB ...
- iOS开发小技巧--学会包装控件(有些view的位置由于代码或系统原因,位置或者尺寸不容易修改或者容易受外界影响)
一.百思项目中遇到了两处这样的问题, 第一处 - 是评论界面的headerView,由于直接把自己搞的xib加载了放在了那里,xib中setFrame写了好多-= +=,每次滚动的时候,会频繁调用x ...
- Android开发技巧——ViewPager加View情况封装PagerAdapter的实现类
ViewPager是Android的support库中的一个控件. ViewPager + Fragment的使用,已经有FragmentAdapter的实现可以帮助我们快速进行开发了: ViewPa ...
- iOS开发小技巧--textField成为密码框,view加载完后textField获取焦点
文本框安全输入:Secure Text Entry(安全文本输入) view加载完后textField获取焦点的正确做法
- Android View 背景选择器编写技巧
在项目中选择器的使用是非常多的,以下是本人在项目中的一些常用的背景选择器的写法 带边框下划线背景选择器效果图: 上面布局中放了10个CheckBox,然后设置了CheckBox的背景图片位,背景选择器 ...
- 自己定义View——坑、技巧、调优
<span style="font-size:14px; font-family: Arial, Helvetica, sans-serif; background-color: rg ...
随机推荐
- Cppcheck软件使用
一款开源源码检测工具.简单易用. 官网网址:http://cppcheck.sourceforge.net/ 软件可直接官网下载. [plain] view plaincopy Features Ou ...
- Android NDK 编译FFmpeg(不需要复杂的环境变量设置)
环境: CentOS6.2——64位 借鉴:https://vec.io/posts/how-to-build-ffmpeg-with-android-ndk 在根目录下创建work文件夹:cd / ...
- 神器之“c#反编译工具“
1. ".net reflector"本人正在使用,下载地址 2."ILSpy"没实用过,可是听杨中科老师说挺好. 有了这个,妈妈再也不用操心我看不到别人封装好 ...
- cocos2d-x -- 渠道SDK【棱镜】接入(2)
上一章<cocos2d-x -- 渠道SDK[棱镜]接入(1)>,已经接入好了SDK.如今要准备加入渠道了,以豌豆荚为例. 详细流程: 1.加入渠道:
- C#操作XML存取创建XML
using System.Xml; #region 生成XML文档 /// <summary> /// /// </summary> /// <param name=& ...
- Process Node.js 进程
Process 进程 process.argv 是命令行参数数组,第一个元素是node,第二个元素是脚本文件名,从第三个元素开始每个元素是一个运行参数. process.stdout 标准输出流 co ...
- English - 英语学习小笔记
1.It is...to do sth:做某事是.... 解析:It 是形式主语,后面一半接形容词做表语,to do sth是不定式短语作真正主语. 2.make do和make doing是两种表达 ...
- Mac之vim普通命令使用
Mac之vim普通命令使用 标签: vim命令 高级一些的编辑器,都会包含宏功能,vim当然不能缺少了,在vim中使用宏是非常方便的: :qx 开始记录宏,并将结果存入寄存器x q 退出记录模式 @x ...
- 使用astyle格式化代码【脚本】
astyle使用基础教程 http://cppblog.com/jokes000/articles/158838.html steps: (1) apt-get install astyle 或者去主 ...
- C++ HttpServlet 高并发多线程 HTTP 服务器(转)
from:http://www.oschina.net/code/snippet_568966_43193 C/C++ 程序虽然执行效率高,但程序员在开发 WEB 应用时却因为没有好的 WEB 开 ...