摘要: //请求数据时传参数要将汉字转码 //GET获取数据,所有的参数信息都会暴露 GET方法和POST方法对比: 优点: GET: 1.请求方便,直接用一个完整的路径去请求获取数据 2.发送求请求过程中不会发送请求体,不会破坏服务器的封装性。从这个角度来讲,GET相对于POST安全。 POST: 1.发 阅读全文
posted @ 2016-01-28 14:46 Jaycee麦子 阅读(454) 评论(0) 推荐(0) 编辑
摘要: 1 2 3 1. 4 5 UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle: @"设置头像" delegate:self cancelButtonTitle:@"取消" destruc... 阅读全文
posted @ 2016-01-28 14:43 Jaycee麦子 阅读(1757) 评论(0) 推荐(0) 编辑
摘要: 1 //清除缓存按钮的点击事件 2 3 - (void)putBufferBtnClicked:(UIButton *)btn{ 4 5 CGFloat size = [self folderSizeAtPath:NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, ... 阅读全文
posted @ 2016-01-28 14:38 Jaycee麦子 阅读(650) 评论(0) 推荐(0) 编辑
摘要: 1 //自动调节输入文本框的高度 2 3 - (void)textViewDidChange:(UITableView *)textView{ 4 5 float height; 6 7 if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { 8 9 CGRect... 阅读全文
posted @ 2016-01-28 10:23 Jaycee麦子 阅读(1143) 评论(0) 推荐(0) 编辑
摘要: 1 一、//触摸空白处隐藏键盘 2 3 -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 4 5 [_feedBackTextView resignFirstResponder]; 6 7 [_telTextField resignFirstResponder]; 8 9 ... 阅读全文
posted @ 2016-01-28 09:48 Jaycee麦子 阅读(373) 评论(0) 推荐(0) 编辑
摘要: srand(seed)用来将随机序列的起始点设为seed srand((int)time(0))表示以当前时间对应的int值为随机序列起点,这样每次运行程序,由于起点不同才可以得到不同的随机数 time函数给出从1970年1月1日00:00:00至今的秒数,它必须带一个参数,用来存储这个秒数,tim 阅读全文
posted @ 2016-01-28 09:03 Jaycee麦子 阅读(450) 评论(0) 推荐(0) 编辑