摘要: 请求 用的是一个类似网址的东西拿到的是JSON文件NSString *path =[NSString stringWithFormat:@"http://apis.juhe.cn/cook/query?key=80996127f667eac43832103850b3b13a&menu=%@",sel... 阅读全文
posted @ 2015-09-21 19:42 十九_黄 阅读(112) 评论(0) 推荐(0)
摘要: 《JSon数据》基本顺序1,NSString *path=@“路径”;2,NSData *pathdata=[nsdata datawithcontentsoffile:path];如果存入的是字典3,NSDicitonary *dic=[NSJsonserialization JSONobject... 阅读全文
posted @ 2015-09-21 19:41 十九_黄 阅读(173) 评论(0) 推荐(0)
摘要: 四种创建cell方式的总结1,纯代码创建cell方式1把uiviewcontroller删,建uitableviewcontroller 在storyboard中创建一个uitableviewcontroller 与之对应,把cell删掉2建一个uitableviewcell 其内用initwit... 阅读全文
posted @ 2015-09-19 11:59 十九_黄 阅读(173) 评论(0) 推荐(0)
摘要: 显示图片文件时设置显示样式[iv setContentMode:UIViewContentModeScaleAspectFit];有三种样式 fill充满 fit使。。。适应 scale比例规模 aspect方向1,scaletofill;就算图片变形也要填充满2,scaleaspectfit 适应... 阅读全文
posted @ 2015-09-14 23:44 十九_黄 阅读(133) 评论(0) 推荐(0)
摘要: 如果想要直接用路径图片cell.imageView.image = [UIImage imageWithContentsOfFile: @“路径”];filePath];tableview的CELL中添加右侧按钮 还有按钮颜色tableview的左右键添加注意viewWillAppear/viewD... 阅读全文
posted @ 2015-09-12 16:50 十九_黄 阅读(122) 评论(0) 推荐(0)
摘要: 控件UIlabel *l1text font设置字体设置居中 l1 setTextAlignment:NSTextAlignmentCenter设置行数 numberOfLines// lf.font = [UIFont fontWithName:@"字体名称" size:18];... 阅读全文
posted @ 2015-09-09 20:53 十九_黄 阅读(130) 评论(2) 推荐(0)
摘要: 正向传值跳转页面过程中 从ViewController(A类) 向 SecondViewController(B类)中跳转在ViewControlller中创建的一个SecondViewController页面所以从ViewController向Second传叫正向传值如果传的是text 那么实际传... 阅读全文
posted @ 2015-09-08 10:36 十九_黄 阅读(129) 评论(0) 推荐(0)
摘要: Label.numberOfLines 可以控制其内的行数若=0 只要空间够 可以无数行若=1 1行 ; 若=2 2行;类推UIbutton 通过代码设置字 和 图片UIbutton *l1=[UIbuttom alloc]initwithframe:CGrectmake….[l1 settitle... 阅读全文
posted @ 2015-09-06 23:42 十九_黄 阅读(103) 评论(0) 推荐(0)
摘要: 拆箱装箱数组中只能装入对象,而很多时候我们需要把类似Int 或者结构体这种装入此时我们需要进行拆装基本思想是 把类似int还有结构体 转换成相对应的对象 然后加入数组 ,导出时 要从对象型变成对应的int或者结构体类@property NSmutableArray *ages;self.ages=[... 阅读全文
posted @ 2015-09-06 01:26 十九_黄 阅读(85) 评论(0) 推荐(0)
摘要: 一 图片1背景图片因为是两张相同图片不断重复出现 开始时瞬间加载用for(int i=0,i<2,i++) 开timer实现动作2飞行效果是两张图片出现一个位置 长时间变换加载开timerint count;count++;if(count%2=0){self.image=[uiimage imag... 阅读全文
posted @ 2015-09-03 21:17 十九_黄 阅读(222) 评论(0) 推荐(0)