05 2017 档案

摘要:在FMDB中,除查询(executeQuery)以外的所有操作,都称为“更新”(executeUpdate)。例如insert、update、delete、 create、drop等SQL语句命令都是更新操作。 一、使用队列(线程安全)代码如下: static FMDatabaseQueue *_q 阅读全文
posted @ 2017-05-16 15:39 湘岳 阅读(256) 评论(0) 推荐(0) 编辑
摘要:// static的作用:能保证_db这个变量只被IWStudentTool.m直接访问 static sqlite3 *_db; + (void)initialize { // 0.获得沙盒中的数据库文件名 NSString *filename = [[NSSearchPathForDirecto 阅读全文
posted @ 2017-05-16 14:53 湘岳 阅读(1656) 评论(0) 推荐(0) 编辑
摘要:1.定义一个记录光标底部的成员变量cursorBottom 2.监听键盘出现和键盘消失通知(记得在dealloc方法中 移除监听器) 3.在UITextField的代理方法textFieldShouldBeginEditing:中转换当前输入框的原点坐标到scrollView中的坐标,计算光标底部坐标并保存 4.在监听键盘出现执行方法中计算 需不需要滚动及滚动大小,动画实现滚动 5.在监听键盘消失方法和点击空白处方法,关闭键盘 阅读全文
posted @ 2017-05-09 18:18 湘岳 阅读(509) 评论(0) 推荐(0) 编辑
摘要:首先在info.plist设置View controller-based status bar appearance 为NO 这样状态栏就是由UIApplication 单例统一控制 //在这个控制器,状态栏是白色,并且隐藏导航栏 - (void)viewWillAppear:(BOOL)anima 阅读全文
posted @ 2017-05-09 17:27 湘岳 阅读(219) 评论(0) 推荐(0) 编辑
摘要:CGFloat recordLeft = point.right + 18; NSString * recordText = dic[@"processStatus"]; CGFloat textMaxW = SCREEN_WIDTH - recordLeft - kCellBorder + 16; 阅读全文
posted @ 2017-05-09 16:42 湘岳 阅读(175) 评论(0) 推荐(0) 编辑
摘要:@interface BillsCell () @property (nonatomic, strong) UIPanGestureRecognizer *panRecognizer; @property(nonatomic,assign) CGFloat lastDownX ; @property 阅读全文
posted @ 2017-05-09 16:32 湘岳 阅读(634) 评论(0) 推荐(0) 编辑
摘要:1.添加监听 //禁止webView内部的scrollView的滚动 self.webView.scrollView.scrollEnabled = NO; //kvo监听webView内部的scrollView的contentSize [self.webView.scrollView addObs 阅读全文
posted @ 2017-05-09 15:40 湘岳 阅读(1906) 评论(0) 推荐(0) 编辑