自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(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关注的人

提示
确定要删除当前文章?
取消 删除