- 博客(8)
- 收藏
- 关注
转载 NSTimer(定时器)的使用
调用一次计时器方法:12myTimer = [NSTimer scheduledTimerWithTimeInterval:1.5 target:self selector:@selector(scrollTimer) userInfo:nil repeats:NO]; //不重复,只调用一次。timer运行一次就会自动停
2015-12-29 13:43:03 403
原创 用AFN时报错
-(AFHTTPSessionManager *)manger{ if (_manger ==nil) { _manger = [AFHTTPSessionManagermanager]; _manger.responseSerializer.acceptableContentTyp
2015-12-28 16:15:32 303
原创 显示地图并有大头针在你的位置
UIViewController *vc = [[UIViewControlleralloc]init]; vc.view.backgroundColor = [UIColorredColor]; MKMapView *mp = [[MKMapViewalloc]initWithFrame:CGRectMake(0,0,
2015-12-28 16:08:17 496
原创 用系统自带的定位功能拿到所在的国家,城市,区
-(CLLocationManager *)man{ if (_man ==nil) { _man = [[CLLocationManageralloc]init]; _man.delegate =self;//设置代理以便调用下面的方法, _man.desiredAccuracy =
2015-12-28 15:45:51 1701
原创 UICollectioView的组头和组尾的高度不同设置
有些需要组头和组尾的高度不同,在layout中设置导置所有的组头和组尾的高都一样,刚做了个项目正好有这个需要,代码如下- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForFooter
2015-12-28 15:09:31 4772
原创 从接口拿到数据是<null>,项目就崩的问题
从后台拿到的数据,在将数据传给model时都是崩在传值的地方,报错为-[NSNull length]: unrecognized selector sent to instance 0x10d7abaf0经过查看,发现这些崩的数据都是,然后我是各种整啊,判断是否是空,长度是否是0等等各种都没有解决问题,就去找后台,后台那写的确实是nil,然后我就只有加判断了,各种判断各种整,整好了,我也忘
2015-12-22 16:49:10 484
原创 UICollectionView不能实现touch方法
页面有UICollectionView,写了touch方法但就是进不去,找了好长时间终于解决了,就是写一个UICollectionView的分类,在.m中写入如下三个方法- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ //if(!self.dragging) {
2015-12-17 17:28:07 2087
原创 UICollectionView关于item的报错
报错提示:the behavior of the UICollectionViewFlowLayout is not defined because:2015-12-07 14:22:33.640 MengKe[2799:100971] the item width must be less than the width of the UICollectionView minus the
2015-12-07 14:23:18 3378
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人