oc
文章平均质量分 69
清哥home
加油,奋斗吧,骚年
展开
-
tableview联动效果
- (void)viewDidLoad { [superviewDidLoad]; self.view.backgroundColor = [UIColorwhiteColor]; _selectIndex =0; _isScrollDown =YES; NSString *pat原创 2016-11-03 16:29:12 · 250 阅读 · 2 评论 -
transform 学习
- (void)viewDidLoad { [super viewDidLoad]; UILabel *backLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 100, 100)]; backLabel.backgroundColor = [UIColo...原创 2018-11-20 14:51:53 · 139 阅读 · 0 评论 -
ios时间差(与当前时间)
//写个字符串分类- (NSString *)dateTimeDifferenceWithStartTimeEndTime{ NSDateFormatter *date = [[NSDateFormatteralloc]init]; [date setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; NSDate原创 2017-04-12 11:32:49 · 590 阅读 · 0 评论 -
一个界面发多次网络请求(GCD使用)
- (void)test{ /* 先判断两个请求是否有依赖性,有的话就很简单了,在第一个请求回调后发送第二个请求。 如果两个请求没有依赖,但UI需要在两个请求完成后才能刷新,加个判断,如果两个请求完成就刷新。 如果都请求没有依赖性,界面也是分两部分展示请求下来原创 2017-02-27 16:20:11 · 1581 阅读 · 0 评论 -
ios下拉图片放大
//// ViewController.m// ios下拉图片放大//// Created by 洪福清 on 2017/3/3.// Copyright © 2017年 BJTYL. All rights reserved.//#import "ViewController.h"#define Ima原创 2017-03-03 11:46:02 · 277 阅读 · 0 评论 -
qq好友列表(tableview的使用)
//// ViewController.m// qq好友列表//// Created by 洪福清 on 2016/12/13.// Copyright © 2016年 BJTYL. All rights reserved.//#import "ViewController.h"#import "PersonMod原创 2017-02-28 14:26:14 · 374 阅读 · 0 评论 -
tableview嵌套scrollview(手势冲突暂无发现)
问题:像这样能进行滑动的界面。如何去搭建思路:创建分组tableview。。每组里面嵌套一个scrollview.1.在controller中- (void)viewDidLoad { [superviewDidLoad]; self.view.backgroundColor = [UIColorredColo原创 2016-11-14 14:44:57 · 773 阅读 · 0 评论 -
segemtController 切换视图(可以左右滑动)
//// ViewController.m// scrollview加collectionview//// Created by 洪福清 on 16/11/29.// Copyright © 2016年 BJTYL. All rights reserved.//#import "ViewController.h"#原创 2016-11-29 16:54:06 · 398 阅读 · 1 评论 -
调用手机闪光灯(项目遇到才写的)
- (void)viewDidLoad { [superviewDidLoad]; self.view.backgroundColor = [UIColorwhiteColor]; //模拟器不支持。。别傻傻的用模拟器测试 UIButton *btn = [UIButtonbuttonWithTyp原创 2016-11-07 17:21:05 · 780 阅读 · 1 评论 -
collection头部和尾部的使用
1.就行tablview一样,collection view也是有头部和尾部的。。只不过他继承与UICollectionReusableView//// ViewController.m// test2//// Created by 洪福清 on 16/8/11.// Copyright © 2016年 BJTYL. All ri原创 2016-11-04 14:22:32 · 377 阅读 · 0 评论 -
kvo 的认识(后续还有修改)
1.对Person 这个类 进行监听 self.person= [[Personalloc]init];self.person.name=@"hong"; [selftestDemoOne];2.设置监听 [self.personaddObserver:selfforKeyPath:@"name"options:NSKeyValue...原创 2019-06-11 15:20:29 · 80 阅读 · 0 评论