![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS
文章平均质量分 51
SiamPig
这个作者很懒,什么都没留下…
展开
-
ld: framework not found -fobjc-arc
程序编译报错信息如下:ld: framework not found -fobjc-arcclang: error: linker command failed with exit code 1 (use -v to see invocation)Google了一下,没找到原因,最后排查了一下,发现原因是在Other Link Flags里面,正常的应该类似于: 而出现这种错误的则是,多原创 2015-11-27 21:47:17 · 4263 阅读 · 0 评论 -
UICollectionview不滚动
UICollectionview很好的东西,以前使用的时候,都没什么问题,最近使用的时候,当我设置了所有cell的attribute的时候,包括frame,发现collection view不滚动了,检查来检查去,包括使用代码让它滚动到某个cell的地方,都不滚动,检查了API,才发现一个坑货- (CGSize)collectionViewContentSize; // Subclasses原创 2015-03-14 21:33:53 · 5491 阅读 · 0 评论 -
VFL的使用
由于项目中一直没使用XIB,storyboard之类的,再加上现在屏幕那么多,适配起来真不是一件轻松的事情,无奈,只能使用VFL。根据这个VFL,说说自己使用过程中的一些看法。(H 和 V老是弄混,哎)1、addSubview要在addConstraint之前。例如:_detailInfoLabel = [[UILabel alloc] initWithFrame:CGRectZero原创 2015-03-14 21:00:22 · 2225 阅读 · 0 评论 -
特殊字符正则表达式查询
个人随笔记录:- (NSMutableAttributedString *)filterLinkWithContent:(NSString *)content { NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:content];原创 2015-01-20 20:32:42 · 1221 阅读 · 0 评论 -
UUID of Xcode6 version
VVDocument在Xcode6下不能使用,需要在配置里面加上原创 2014-10-22 09:59:00 · 1108 阅读 · 0 评论 -
Dumplicate targets in Xcode5
针对一个项目,我们可能要出好几个版本,z原创 2014-05-11 23:01:15 · 1178 阅读 · 0 评论 -
How to add subview inside UIAlertView for iOS 7
I am having an application on iTunes store which displays some UILabel and UIWebView on UIAlertView. According to session video, addSubView for UIAlertView will not work. They have talked about Co转载 2014-04-26 12:13:15 · 3674 阅读 · 0 评论 -
老的iPhone项目工程编译只有3.5寸
今天要将几年前的一个iPhone项目升级,适配7,结果发现不管模拟器选择的是原创 2014-04-21 15:48:00 · 913 阅读 · 0 评论 -
第三方库,Directory not found 解决办法
发现很多人遇到一个问题,在一个项目中倒入第三方库,在本地编译是没有任何问题的,结果上传到svn,别人check下来,或者将项目挪移到另一个路径下面,编译的时候就会报形如下方的错误:针对这种问题,很多人,都是将第三方库删除,然后重新导入一遍,问题就可以解决掉。产生这个问题的原因其实很简单:这个地方表示的是你的第三方库的地址,在老版本的Xcode中,用户导入第三方库,默认的地址原创 2014-03-24 10:16:20 · 5585 阅读 · 0 评论 -
iOS高效编码之一----使用文字语法
在iOS开发过程中,NSString, NSArray, NSDictionary,NSNumber这几个类用的实在是非常多,以前的时候,都是用系统自带的方法使用这些类,后来发现有人习惯使用文字语法,一直觉得只是一种新的写法,没怎么关注,最近看了下,发现还是有很多好处。一、NSNumber:NSNumber *tempValue = [NSNumber numberWithInt:3];原创 2014-03-20 23:25:41 · 7927 阅读 · 0 评论 -
lipo (dumplicate symbols for architecture XXXX)
最近遇到一个诡异的问题,项目中添加了第三方公司提供的静态库A,A又使用了第三方开源静态库B,而我们的项目中也使用了开源库B,结果编译的时候报了个如下的错误:ld: 198 duplicate symbols for architecture x86_64clang: error: linker command failed with exit code 1 (use -v to see in原创 2015-03-15 10:08:05 · 1573 阅读 · 0 评论 -
Collectionview在iOS7上不显示
collectionview在iOS8上正常展示,但是在iOS7上不展示原创 2015-03-19 14:51:13 · 1503 阅读 · 0 评论 -
Method swizze
Method ori_method = class_getInstanceMethod([UITextView class], @selector(setText:)); Method current_method = class_getInstanceMethod([UITextView class], @selector(customSetText:)); method_exc原创 2015-06-15 12:49:51 · 688 阅读 · 0 评论 -
Add closure to extension within swift in runtime
Add closure to extension within swift主要是利用objc_setAssociatedObject将closure添加到实例中去,先看看该方法在Objective-c和swift中的声明: Objective-Cvoid objc_setAssociatedObject(id object, const void *key, id value, objc_Asso原创 2015-11-19 22:44:19 · 1251 阅读 · 0 评论 -
failed to update auto layout status: the agent crashed within Xcode7
场景: 原先的项目使用的是swift1.2+storyboard,下载了Xcode7 GM版本,打开项目之后,首先提示的是各种语法修改,按照提示,将语法修改完之后,程序编译运行一切OK。 点击storyboard,结果环境给出了这种的错误提示(可正常编译运行),入下图所示: ZLAttributedPlaceHolderTextField实现如下:import UI原创 2015-09-15 14:55:06 · 5073 阅读 · 0 评论 -
dyld: Library not loaded: @rpath/XXXX Reason: image not found
dyld: Library not loaded, Reason:image not found原创 2015-09-12 23:21:30 · 3815 阅读 · 0 评论 -
a declaration cannot be both 'final' and 'dynamic'
swift 1.2 编译的时候,遇到如下的错误信息: a declaration cannot be both 'final' and 'dynamic'不明所以,不知道是什么原因,后来发现是因为在extension里面添加static var变量的时候出现了该问题,例如:class MyClass {}extension MyClass { static var someProperty原创 2015-09-01 18:47:33 · 3074 阅读 · 0 评论 -
how to get rid of the UITabBarItem padding
手机APP,选中某一个Item的时候,其背景要完整的替换掉,采用系统自带的@property(nonatomic,retain) UIColor *selectedImageTintColor会出现边框的情况,最后找不到其它解决办法,使用了一个变通的方法:UIImageView *imageView = [[UIImageView alloc] initWithImage:[[UIIm原创 2015-07-18 00:33:47 · 993 阅读 · 0 评论 -
pods was rejected as an implicit dependency
使用cocoapods编译项目的时候,遇到如下的错误:pods was rejected as an implicit dependency按照网上搜索到的结果,删除了相关的文件之后,(pods was rejected as an implicit dependency) 编译还是会遇到一些找不到类库的错误,最终无奈,设置所有的pods库里的:Build Active Architect原创 2015-07-15 11:22:04 · 742 阅读 · 0 评论 -
iOS8旋转屏
最近项目中需要出现一个场景,所有的界面都只能竖屏,除了某个界面只支持横屏,我的项目框架是:1、根视图是一个TabBarController(系统自带的)2、每一个tabBar item 都是一个 navigationController (item A, item B, item C)3、A中点击某个地方,跳转到D界面,D只能横屏。一开始循规蹈矩的重写了- (NSUIntege原创 2015-07-09 20:37:21 · 832 阅读 · 0 评论 -
push public library to cocoapods
平时开发整理出了一些自己常用的控件啊,方法之类的,每次创建工程的时候,都得拷贝进去,发现将自己的常用的这些东西折腾成一个开源的库,放到cocoapods上,下次使用的时候,直接借助cocoapods就解决,省很多事情,但是在将我自己的开源库添加到cocoapods中遇到了不少问题,先说说自己一步步的操作吧(举个例子:新建一个叫CommonAlertFramework库):这些基本上都是在ter原创 2015-06-30 15:37:07 · 1922 阅读 · 0 评论 -
UIViewAlertForUnsatisfiableConstraints to catch this in the debugger
使用storyboard拖拽约束collection view的时候,遇到如下的警告错误:Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look原创 2015-06-27 23:51:13 · 3422 阅读 · 0 评论 -
IOS7.1企业发布以及tomcat下根证书制作
针对IOS7.1企业版发布报无法链接,暂时采用的是共享到网络的办法来解决,一种是使用dropbox,一种是使用skydrive一、使用dropbox1、登录dropbox 将以前生成的plist文件上传到dropbox上。2、右击该plist文件,在弹出的菜单中选择 共享链接,2、在共享链接界面,点击获取链接3、此时该plist文件的共享链接地址自动保存到粘贴板中,链接地址形如原创 2014-03-19 22:47:55 · 2738 阅读 · 2 评论