自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

CornerAndCorner的博客

发现错误请大家多多指教,如果对你有帮助就顶一下吧

  • 博客(22)
  • 收藏
  • 关注

原创 iOS删除导航栏的黑线

// 删除黑线    [[[self.navigationBar.subviews.firstObject subviews] lastObject] removeFromSuperview];

2016-09-29 16:50:39 414

原创 Please make sure you have the correct access rights and the repository exists

要么是你的老大没给把你拉进项目,要么就是你克隆的SSH写错了 ,写成别人的了,不是自己的

2016-09-29 15:46:12 2029

原创 CUICatalog: Invalid asset name supplied

你的图片是空的,可能是你代码里面的image没写,或者图片丢失了 看看还在不,重新拉进去

2016-09-29 15:43:32 550

原创 [!] Unable to satisfy the following requirements:

[!] Unable to satisfy the following requirements:- `Alamofire (~> 4.0)` required by `Podfile`Specs satisfying the `Alamofire (~> 4.0)` dependency were found, but they required a higher min

2016-09-29 15:41:27 1009

原创 如何解决afnetworking内存泄漏

写个单例就解决了//解决AFNetworking内存泄漏+(AFHTTPSessionManager *)sharedHTTPSession{        staticdispatch_once_t onceToken;        dispatch_once(& onceToken, ^{                

2016-09-29 15:37:55 1191

原创 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing the same vi

因为push了两次,看看你自己的代码有没有多写了Push两遍的代码

2016-09-29 15:28:40 1574

原创 Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewContr

XIB和View没有连接上选中下面的New Referencing Outlet的圈然后把线连到File's Owner ,会弹出一个view选中即可,如果出现很多view,是因为你的界面上有很多view,一定要选最外面的那个view(图上灰色的那个view)

2016-09-29 15:27:37 6228

原创 Terminating app due to uncaught exception 'Cannot Install Constraint', reason: 'No common superview

先把控件addSubviews上 然后再拉约束,如下 let imageView =UIImageView.init()                imageView.image =UIImage(named: "comment_head")        backView.addSubview(imageView) 

2016-09-29 15:21:37 517

原创 Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift

clean一下 重新运行

2016-09-29 15:20:01 2777

原创 UIWebView读取Gif图 swift

let file =NSBundle.mainBundle().pathForResource("voicegif", ofType: "gif")                if file !=nil {                                    let fileUrl =NSURL.fileURLWithP

2016-09-29 15:18:58 608

原创 302解决

302暂时性转移 我的解决方法是网络请求没有设置cookies,设置一下就好了

2016-09-02 14:43:22 2871

原创 XXX is busy: Processing symbol files

This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.  This will cause an exception in a future release.xcode出现这种情况不要

2016-09-02 14:40:56 2781

原创 Attempt to set a non-property-list object

原因是使用NSUserDefaults 保存了自定义的类不能保存自定义的类只能是基本数据类型 NSArray NSString NSNumber NSDictionary等等不过你可以使用NSData转换,这个很麻烦,还不如使用CoreData,或者FMDB

2016-09-02 14:37:48 432

原创 移动UICollectionViewCell

- (void)handlelongGesture:(UILongPressGestureRecognizer *)longGesture {    //判断手势状态    switch (longGesture.state) {        case UIGestureRecognizerStateBegan:{            //判断手势落点位置是否在路径上   

2016-09-02 14:34:17 536

原创 401错误

401一般是未登录,需要进行认证  //401 设置用户名和密码 认证    NSString * user = [userDefaults objectForKey:@"employeeNumber"];        NSString * password = [userDefaults objectForKey:@"password"];        [manage

2016-09-02 14:29:36 1856

原创 iOS区分各种设备

if([ [ UIDevice currentDevice ] userInterfaceIdiom ] == UIUserInterfaceIdiomPhone ){ //IPhone设备 }else{ //ipad设备 } + (NSString*)deviceString { // 需要#import "sys/utsname.h" struct utsnam

2016-09-02 14:27:06 403

原创 AFNetWorking获取状态码

failure:^(NSURLSessionDataTask *_Nullable task, NSError *_Nonnull error) { NSHTTPURLResponse * responses = (NSHTTPURLResponse *)task.response;                NSLog(@"%ld",(long)r

2016-09-02 14:21:31 4682

原创 AFHTTPSessionManager随机生成boundary

NSString * boundary = [NSStringstringWithFormat:@"%@%08X%08X",exStr,arc4random(),arc4random()];exStr是你们后台上传图片时固定的boundary的前缀,就是不会变化的那部分取出来

2016-09-02 14:20:16 1860

原创 SDWebImage加载图片设置cookie

WeakSelf;            [SDWebImageDownloader.sharedDownloaderdownloadImageWithURL:urloptions:SDWebImageDownloaderHandleCookiesprogress:^(NSInteger receivedSize,NSInteger expectedSize)

2016-09-02 14:10:48 1438

原创 MBProgressHUD needs to be accessed on the main thread.

引用第三方风火轮的时候 刚开始没问题 后来就开始崩溃了,原因是要放在主线程运行   dispatch_async(dispatch_get_main_queue(), ^{                hud = [[MBProgressHUDalloc] initWithView:weakSelf.view];                hu

2016-09-02 14:06:54 1876

原创 iOS时间格式

G:公元年代yy:年的后两位yyyy:完整的年MM:月份,显示1-12MMM:月份,显示英文简写MMMM:月份,显示英文全称dd:天,两位显示d:天,显示一位数EEE:英文简写星期EEEE:英文全称星期aa:上下午,显示AM/PMHH:24小时制hh:12小时制 或者K也是12小时制m:显示分钟一位mm:显示分钟两位s:显示秒一位ss

2016-09-02 14:05:56 747

原创 字符串NSString转NSDate

NSString * dateStr =@"2015-08-31 12:00:50";        NSDateFormatter * formatter =[NSDateFormatternew];        [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];        NSDate

2016-09-02 13:57:54 376

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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