摘要: 程序中有一个UITextView控件 @property (weak, nonatomic) IBOutlet UITextView *textView; 一般情况下,以下代码可实现UITextView滚到底部效果 //contentSize为文本可读范围,setContentOffset设置可视范 阅读全文
posted @ 2016-03-05 00:33 -Eazy- 阅读(1600) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/chenyong05314/article/details/24695897 阅读全文
posted @ 2016-03-04 20:10 -Eazy- 阅读(107) 评论(0) 推荐(0)
摘要: 假设需滚动界面为控制器的view,需进行以下操作 1.添加键盘frame变化监听 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(KeyboardWillChangeFrame:) name:UIKe 阅读全文
posted @ 2016-03-04 16:29 -Eazy- 阅读(303) 评论(0) 推荐(0)
摘要: 外键约束: 表一的某个字段关联到表二的某个字段 例子: 国家表:t_country 地区表:t_area 若t_area表的country_id设置外键约束,关联了t_country表的id字段。那么从t_area表中country_id=1,表示China这个国家,以此类推。 注意事项: 1.若设 阅读全文
posted @ 2016-03-01 18:55 -Eazy- 阅读(4071) 评论(0) 推荐(0)
摘要: 自定义cell中添加了UIImageview,设置imageviewUIViewContentModeScaleAspectFill后,图片超出cell边界,应当剪切多余部分 例子: _imageView.contentMode=UIViewContentModeScaleAspectFill; _ 阅读全文
posted @ 2016-02-26 18:51 -Eazy- 阅读(875) 评论(0) 推荐(0)
摘要: 随机数 随机取0-100 arc4random() % 101 随机取80+(0至20) (arc4random() % 21) +80; 随机字符串 -(NSString *)ret32bitString { //随机生成n位字母 int n=4; char data[n]; for (int x 阅读全文
posted @ 2016-02-24 19:13 -Eazy- 阅读(211) 评论(0) 推荐(0)
摘要: //AllGestureView为自定义viewAllGestureView *gestureView=[[AllGestureView alloc]init];gestureView.frame=[UIScreen mainScreen].bounds;//先设置自定义view的透明度为0gest... 阅读全文
posted @ 2015-12-26 15:23 -Eazy- 阅读(243) 评论(0) 推荐(0)
摘要: 静态cell:cell数目固定不变,图片/文字固定不变(如qq设置列表可使用静态cell加载) 动态cell:cell数目较多,且图片/文字可能会发生变化(如应网络请求,淘宝列表中某个物品名称或者图片发生变化)参考:http://www.jb51.net/article/76473.htm 阅读全文
posted @ 2015-12-25 19:20 -Eazy- 阅读(200) 评论(0) 推荐(0)
摘要: 原由:点击cell上的按钮,无法获取button对应的cell位置//获取按钮上层控件,也就是cell本身AccountCell *cell= (AccountCell *)[按钮名称 superview];//获取该cell本身的位置NSIndexPath *indexPath=[self.col... 阅读全文
posted @ 2015-12-23 18:28 -Eazy- 阅读(277) 评论(0) 推荐(0)
摘要: 1.取消xib下Use Auto Layout2.xcode-》product-》clean 阅读全文
posted @ 2015-12-22 17:15 -Eazy- 阅读(267) 评论(0) 推荐(0)