第一次
CornerAndCorner
better
展开
-
MJRefresh上拉加载没有更多数据不提示
MJRefresh上拉加载没有更多数据的时候写了下面代码却还是不提示: [self.tableview.mj_footerendRefreshingWithNoMoreData];明明写了这句话(地方要写对哦),也运行了就是不提示没有更多数据,打个断点查看是不是在运行结束还执行了 [self.tableview原创 2017-11-09 11:58:09 · 7927 阅读 · 1 评论 -
[!] 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 · 1008 阅读 · 0 评论 -
如何解决afnetworking内存泄漏
写个单例就解决了//解决AFNetworking内存泄漏+(AFHTTPSessionManager *)sharedHTTPSession{ staticdispatch_once_t onceToken; dispatch_once(& onceToken, ^{原创 2016-09-29 15:37:55 · 1190 阅读 · 0 评论 -
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing the same vi
因为push了两次,看看你自己的代码有没有多写了Push两遍的代码原创 2016-09-29 15:28:40 · 1572 阅读 · 0 评论 -
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 · 6226 阅读 · 0 评论 -
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 阅读 · 0 评论 -
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift
clean一下 重新运行原创 2016-09-29 15:20:01 · 2774 阅读 · 0 评论 -
UIWebView读取Gif图 swift
let file =NSBundle.mainBundle().pathForResource("voicegif", ofType: "gif") if file !=nil { let fileUrl =NSURL.fileURLWithP原创 2016-09-29 15:18:58 · 606 阅读 · 0 评论 -
302解决
302暂时性转移 我的解决方法是网络请求没有设置cookies,设置一下就好了原创 2016-09-02 14:43:22 · 2871 阅读 · 0 评论 -
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 · 2779 阅读 · 0 评论 -
Attempt to set a non-property-list object
原因是使用NSUserDefaults 保存了自定义的类不能保存自定义的类只能是基本数据类型 NSArray NSString NSNumber NSDictionary等等不过你可以使用NSData转换,这个很麻烦,还不如使用CoreData,或者FMDB原创 2016-09-02 14:37:48 · 432 阅读 · 0 评论 -
移动UICollectionViewCell
- (void)handlelongGesture:(UILongPressGestureRecognizer *)longGesture { //判断手势状态 switch (longGesture.state) { case UIGestureRecognizerStateBegan:{ //判断手势落点位置是否在路径上原创 2016-09-02 14:34:17 · 535 阅读 · 0 评论 -
401错误
401一般是未登录,需要进行认证 //401 设置用户名和密码 认证 NSString * user = [userDefaults objectForKey:@"employeeNumber"]; NSString * password = [userDefaults objectForKey:@"password"]; [manage原创 2016-09-02 14:29:36 · 1854 阅读 · 0 评论 -
iOS区分各种设备
if([ [ UIDevice currentDevice ] userInterfaceIdiom ] == UIUserInterfaceIdiomPhone ){ //IPhone设备 }else{ //ipad设备 } + (NSString*)deviceString { // 需要#import "sys/utsname.h" struct utsnam原创 2016-09-02 14:27:06 · 403 阅读 · 0 评论 -
AFNetWorking获取状态码
failure:^(NSURLSessionDataTask *_Nullable task, NSError *_Nonnull error) { NSHTTPURLResponse * responses = (NSHTTPURLResponse *)task.response; NSLog(@"%ld",(long)r原创 2016-09-02 14:21:31 · 4680 阅读 · 0 评论 -
CUICatalog: Invalid asset name supplied
你的图片是空的,可能是你代码里面的image没写,或者图片丢失了 看看还在不,重新拉进去原创 2016-09-29 15:43:32 · 550 阅读 · 0 评论 -
Please make sure you have the correct access rights and the repository exists
要么是你的老大没给把你拉进项目,要么就是你克隆的SSH写错了 ,写成别人的了,不是自己的原创 2016-09-29 15:46:12 · 2028 阅读 · 0 评论 -
iOS删除导航栏的黑线
// 删除黑线 [[[self.navigationBar.subviews.firstObject subviews] lastObject] removeFromSuperview];原创 2016-09-29 16:50:39 · 413 阅读 · 0 评论 -
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
1.NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)2.[] nw_coretls_callback_handshake_message_block_invoke_3 tls_handshake_continue: [-9807]打印这些是因为网络请求没有配置HTTP原创 2017-11-09 11:51:06 · 748 阅读 · 0 评论 -
_BSMachError: port 9f03; (os/kern) invalid name (0xf) "Unable to deallocate send right"
1. _BSMachError: port 9f03; (os/kern) invalid name (0xf) "Unable to deallocate send right"2._BSMachError: port 8f03; (os/kern) invalid name (0xf) "Unable to deallocate send right"3.nw_coretls_call原创 2017-11-09 11:42:32 · 1381 阅读 · 0 评论 -
The resource could not be loaded because the App Transport Security policy requires the use of a sec
The resource could not be loaded because the App Transport Security policy requires the use of a secure connection百思不得姐,有时候明明设置了info.plist的Allow Arbitrary Loads为YES,还是请求不了数据,因为我还设置了Allow Arbitrary L原创 2017-09-15 16:11:49 · 782 阅读 · 0 评论 -
Error Domain=NSURLErrorDomain Code=-1007 "太多 HTTP 重定向" UserInfo={NSUnderlyingError=0x170247230 {Erro
突然APP就请求不到任何数据了,我以为是服务器出了问题,postman请求是没有问题的,那就是我手机端有问题咯,试了各种方法不行(clean,关掉xcode重启,电脑重启,手机重启啊等等),最后终于好了删掉APP重新运行就好了呀原创 2017-09-15 16:00:24 · 4236 阅读 · 0 评论 -
A security policy configured with `AFSSLPinningModeCertificate` can only be applied on a manager wit
A security policy configured with `AFSSLPinningModeCertificate` can only be applied on a manager with a secure base URL (i.e. https)本来就是写个demo,然后去git上下载了一份最新的AFNetworking,运动就崩了,打印这个错误,一头雾水,其他项目这样写没有原创 2017-09-15 15:55:35 · 4616 阅读 · 0 评论 -
Provisioning profile "iOS Team Provisioning Profile:XXXX"doesn't include the currently selected devi
真机调试的时候,以前的设备在xcode上运行都没事,新的设备都运行不了,报三个错误跟证书有关系,附图一张这里只解决这个问题,去苹果官网,进入自己的开发者账号,进入证书,重新下载真机调试证书developer,然后双击会自动打开钥匙串,然后clean一下项目,手机拔掉重连,在TARGETS-->General里面显示成下图就可以运行成功了下载证书步骤:1.2.3.点击上图,然后原创 2017-04-29 10:29:55 · 13174 阅读 · 0 评论 -
Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLKey=http://XXXX, NSLo
Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLKey=http://XXXX, NSLocalizedDescription=cancelled, NSErrorFailingURLStringKey=http://XXX}请求数据的位置有问题,跟其他的冲突了,检查代码吧原创 2016-07-27 19:12:02 · 13655 阅读 · 9 评论 -
button上多一块蓝色
解决方法 使用自定义custom而不是系统的原创 2016-07-27 19:35:39 · 329 阅读 · 0 评论 -
Code signing is required for product type 'Application' in SDK 'iOS 10.1'
Showing Recent MessagesXXX has conflicting provisioning settings. XXXX is automatically signed, but code signing identity iPhone Distribution:XXXX (XXXXX) has been manually specified. Set the code signing identity value to "iPhone Developer" in the build原创 2016-11-11 18:27:33 · 3391 阅读 · 2 评论 -
1631: CFNetwork internal error (0xc01a:/BuildRoot/Library/Caches/com.apple.xbs/Sources/CFNetwork_Sim
1631: CFNetwork internal error (0xc01a:/BuildRoot/Library/Caches/com.apple.xbs/Sources/CFNetwork_Sim/CFNetwork-758.3.15/Loading/URLConnectionLoader.cpp:289) 不好意思,好像CSDN不支持复制粘贴的图片,今天发现只要是我复制粘贴过来的图片都没有了,真让人抓狂啊原创 2016-11-11 18:31:22 · 3814 阅读 · 0 评论 -
Multiple errors occurred while copying the files
Multiple errors occurred while copying the files原创 2016-11-11 18:35:17 · 566 阅读 · 0 评论 -
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has be
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates每次一打开相机就会在控制台打印这个 看着原创 2016-11-09 17:39:25 · 658 阅读 · 0 评论 -
iOS10调用相册导致模拟器和xcode闪退
自从升级了xcode8就各种不适应,XIB尺寸大小选择找不到了,模拟器也运行不了,重下载也不行,升级xcode也不行,总之带来了各种麻烦,今天突然模拟器可以了,因为有个网络请求要用到一个软件,真机不可以,所以我又试了试,结果突然就好了,估计只是一时的。真机上的相册和照相机都可以打开,到模拟器上就闪退了APP和xcode,原因是因为iOS10要求调用系统的东西都需要权限。所以我们只需要在Info.p原创 2016-11-09 17:31:50 · 1853 阅读 · 0 评论 -
Xcode8的XIB中使用UIScrollView遇到的问题
XIB建的界面 里面用scrollView实现的,我选定了一个模拟器iPhoneSE然后运行之后,5的尺寸一样,所以没问题,6和7的尺寸运行出问题了,就是宽度出问题了,还是5的宽度。吓得我以为不同宽度的都要再做一份,但是我并没有这么做,我要XIB就是为了省代码才用的,干嘛还要创建那么多界面呢。然后我就想到了一个方法试试看看能不能解决,结果很惊喜,我一试真的解决了这个问题。你可以随便选择一个模拟原创 2016-11-09 17:21:42 · 950 阅读 · 0 评论 -
AFHTTPSessionManager随机生成boundary
NSString * boundary = [NSStringstringWithFormat:@"%@%08X%08X",exStr,arc4random(),arc4random()];exStr是你们后台上传图片时固定的boundary的前缀,就是不会变化的那部分取出来原创 2016-09-02 14:20:16 · 1858 阅读 · 0 评论 -
SDWebImage加载图片设置cookie
WeakSelf; [SDWebImageDownloader.sharedDownloaderdownloadImageWithURL:urloptions:SDWebImageDownloaderHandleCookiesprogress:^(NSInteger receivedSize,NSInteger expectedSize)原创 2016-09-02 14:10:48 · 1432 阅读 · 0 评论 -
iOS 设置星期
原创 2016-07-14 18:54:18 · 427 阅读 · 0 评论 -
Multiple errors occurred while copying the files
是添加重名文件造成的,解决方法:clean 然后打开xcode文件删除刚刚添加进去的文件 重新拉进去原创 2016-07-14 18:53:12 · 868 阅读 · 0 评论 -
The working copy"XXX" failed to commit files
出现这种原因是因为拉进去的图片与之前的重复了,然后我就在文件中把新拉进去的文件删掉,clean,然后提交代码到git上就提交不了了,然后clean一下重新提交就可以了原创 2016-07-14 18:50:48 · 1109 阅读 · 0 评论 -
__NSCFConstantString alignmentRectInsets
出现这种问题 ,就是自己大意了,设置图片的时候只写了字符串,丫的,没报错,真是奇葩。比如设置button的背景图片,写 [button setBackImage:[UIImage imageWithNamed:@""];原创 2016-07-14 18:43:22 · 615 阅读 · 0 评论 -
XIB不能关联问题
我出现的原因是;创建的文件重名了,Xcode居然没有提示,这是恶心。删除文件重建文件,如果你的XIB已经绘制好了,不想重绘制,解决方法:第一:先删除然后重建一个文件命名不同第二:把新建的XIB里面的view删除,第三:把删除的XIB里面的view复制过去,第四:把复制进去的XIB的view关联file's OwnerOK解决了。。。。。。。。。。。。原创 2016-07-14 18:35:21 · 1444 阅读 · 0 评论 -
Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Cache
出现这种错误就是tableView的cell空的,要看看你的register,还有代理方法哪里写错了原创 2016-07-14 18:24:04 · 472 阅读 · 0 评论