- 博客(29)
- 收藏
- 关注
原创 React Native学习笔记-4:CSS优先级速记
学习过程中涉及到CSS优先级,书本上介绍的权限形如:id选择器默认优先级最高,权值100class选择器、属性选择器、伪类选择器权值010标签选择器的优先级权值为001需要做的就是统计选择符中的id、class、标签名个数,然后把对应的权值相加即可。根据结果便可得出优先级高低。 但是在计算的过程中,很容易弄混各个的权值,发现只要记住ice这个单词即可,权值就出来了。这样就不会弄混了。
2016-02-25 23:01:24
1422
原创 React Native学习笔记-3: unable to find module in its module map
开发过程中遇到如下的问题:Unable to find this module in its module map or any of the node_modules directories under XXXXXXXXXXXX原因有可能是(原因后续慢慢补充):import or require 的时候的路径写错了。
2016-02-25 16:42:27
5221
原创 React Native学习笔记-2:this.props.navigator undefined
源码如下:'use strict';import React, { AppRegistry, Component, StyleSheet, Text, View, ScrollView, PixelRatio, NavigatorIOS, TextInput,} from 'react-native';class HelloWorld extends Comp
2016-02-23 13:35:24
11477
原创 React Native学习笔记-1:JSC profiler is not supported.
JSC profiler is not supported. Unknown Option:node_modules/react-deep-force-update/.babelrc.stage
2016-02-22 23:01:28
2317
原创 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
4354
原创 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
1290
原创 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
5125
原创 dyld: Library not loaded: @rpath/XXXX Reason: image not found
dyld: Library not loaded, Reason:image not found
2015-09-12 23:21:30
3870
原创 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
3117
原创 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
1028
原创 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
800
原创 iOS8旋转屏
最近项目中需要出现一个场景,所有的界面都只能竖屏,除了某个界面只支持横屏,我的项目框架是:1、根视图是一个TabBarController(系统自带的)2、每一个tabBar item 都是一个 navigationController (item A, item B, item C)3、A中点击某个地方,跳转到D界面,D只能横屏。一开始循规蹈矩的重写了- (NSUIntege
2015-07-09 20:37:21
872
原创 push public library to cocoapods
平时开发整理出了一些自己常用的控件啊,方法之类的,每次创建工程的时候,都得拷贝进去,发现将自己的常用的这些东西折腾成一个开源的库,放到cocoapods上,下次使用的时候,直接借助cocoapods就解决,省很多事情,但是在将我自己的开源库添加到cocoapods中遇到了不少问题,先说说自己一步步的操作吧(举个例子:新建一个叫CommonAlertFramework库):这些基本上都是在ter
2015-06-30 15:37:07
1971
原创 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
3488
原创 StoryBoards学习笔记-约束添加
一直都是纯代码,结果用VFL写约束,写的要疯掉了,没办法,硬着头皮去学习一下storyboard怎么玩,先说说storyboard里的约束吧:以前都只会点击下方的这些,但是这些实在是没办法满足我的需求,比如,我要设置两个控件的关系,尝试了一下,才知道,如果你要设置A和B之间的关系,1、选中A2、按住control键3、拖拽鼠标到B上,松开鼠标4、就会出现一个对话框,自己
2015-06-27 01:56:27
573
原创 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
734
原创 ld: warning: -macosx_version_min not specified
编辑静态库的时候,遇到了如下的错误:ld: warning: -macosx_version_min not specified脑袋犯浑了,不知道是啥原因,最后才发现,macosx_version_min这个参数没设置而已,例如,我以前的命令是:ld -dylib -lsystem -lobjc -syslibroot /Applications/Xcode.app/Conte
2015-04-19 16:13:06
1839
原创 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
1628
原创 UICollectionview不滚动
UICollectionview很好的东西,以前使用的时候,都没什么问题,最近使用的时候,当我设置了所有cell的attribute的时候,包括frame,发现collection view不滚动了,检查来检查去,包括使用代码让它滚动到某个cell的地方,都不滚动,检查了API,才发现一个坑货- (CGSize)collectionViewContentSize; // Subclasses
2015-03-14 21:33:53
5588
原创 VFL的使用
由于项目中一直没使用XIB,storyboard之类的,再加上现在屏幕那么多,适配起来真不是一件轻松的事情,无奈,只能使用VFL。根据这个VFL,说说自己使用过程中的一些看法。(H 和 V老是弄混,哎)1、addSubview要在addConstraint之前。例如:_detailInfoLabel = [[UILabel alloc] initWithFrame:CGRectZero
2015-03-14 21:00:22
2274
原创 特殊字符正则表达式查询
个人随笔记录:- (NSMutableAttributedString *)filterLinkWithContent:(NSString *)content { NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:content];
2015-01-20 20:32:42
1278
转载 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
3702
原创 第三方库,Directory not found 解决办法
发现很多人遇到一个问题,在一个项目中倒入第三方库,在本地编译是没有任何问题的,结果上传到svn,别人check下来,或者将项目挪移到另一个路径下面,编译的时候就会报形如下方的错误:针对这种问题,很多人,都是将第三方库删除,然后重新导入一遍,问题就可以解决掉。产生这个问题的原因其实很简单:这个地方表示的是你的第三方库的地址,在老版本的Xcode中,用户导入第三方库,默认的地址
2014-03-24 10:16:20
5954
原创 iOS高效编码之一----使用文字语法
在iOS开发过程中,NSString, NSArray, NSDictionary,NSNumber这几个类用的实在是非常多,以前的时候,都是用系统自带的方法使用这些类,后来发现有人习惯使用文字语法,一直觉得只是一种新的写法,没怎么关注,最近看了下,发现还是有很多好处。一、NSNumber:NSNumber *tempValue = [NSNumber numberWithInt:3];
2014-03-20 23:25:41
7980
原创 IOS7.1企业发布以及tomcat下根证书制作
针对IOS7.1企业版发布报无法链接,暂时采用的是共享到网络的办法来解决,一种是使用dropbox,一种是使用skydrive一、使用dropbox1、登录dropbox 将以前生成的plist文件上传到dropbox上。2、右击该plist文件,在弹出的菜单中选择 共享链接,2、在共享链接界面,点击获取链接3、此时该plist文件的共享链接地址自动保存到粘贴板中,链接地址形如
2014-03-19 22:47:55
2808
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人