![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
IOS
xuaimian
这个作者很懒,什么都没留下…
展开
-
if(!obj)==if(obj==nil)
Objective-C中nil使用的最佳实践没有必要将nil作为初始值赋给变量1NSString *myString = nil;上面的代码与不带nil效果相同,所以让我们保持简洁:1NSString *myString;转载 2016-08-08 15:07:45 · 657 阅读 · 0 评论 -
cannot find cdtool at
Cannot find cdtool at '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/cdtool': Cannot find a simulator runtime for platform >.尝鲜要付出代价的原创 2017-09-14 11:15:53 · 637 阅读 · 0 评论 -
Swift版找字体名字
let familyNames =UIFont.familyNames for index in0...(familyNames.count-1) { let familyName = familyNames[index] let fontNames:NSArray =原创 2017-09-14 18:34:24 · 676 阅读 · 0 评论 -
mac 下开启任何来源
sudo spctl --master-disable原创 2017-09-25 10:26:15 · 325 阅读 · 0 评论 -
适配小刘海OC版
-(void)viewSafeAreaInsetsDidChange{ [superviewSafeAreaInsetsDidChange]; UIEdgeInsets safeEdgeInset =self.view.safeAreaInsets; _navBarView.height =40+safeEdgeInse原创 2017-09-28 16:01:50 · 522 阅读 · 0 评论 -
[[NSNotificationCenterdefaultCenter] addObserver时object的意义
[[NSNotificationCenterdefaultCenter] addObserver:self selector:@selector(notePushRediectController:) nam转载 2017-09-29 20:11:12 · 1885 阅读 · 0 评论 -
mac显示隐藏文件
defaults write com.apple.finder AppleShowAllFiles –bool truekillall Finder原创 2017-09-29 22:26:52 · 211 阅读 · 0 评论 -
XCODE4下项目名称的修改
学习札记2——XCODE4下项目名称的修改1 修改桌面显示名称(icon下的名字)bundle display name2 修改bundle Identifier在building setting里找到packaging ——product name3 整个项目名称的修改(顺序不可错错了也没事 就是多费点事)(1)view 右边栏显示出来原创 2017-09-22 15:50:57 · 269 阅读 · 0 评论 -
正则表达式
正则表达式是对字符串操作的一种逻辑公式,用事先定义好的一些特定字符、及这些特定字符的组合,组成一个"规则字符串",这个"规则字符串"用来表达对字符串的一种过滤逻辑。正则表达式的用处:判断给定的字符串是否符合某一种规则(专门用于操作字符串)- 电话号码,电子邮箱,URL...- 可以直接百度别人写好的正则- 别人真的写好了,而且测试过了,我们可以直接用转载 2017-09-05 19:19:44 · 150 阅读 · 0 评论 -
xib写好约束后 代码动态修改约束
方式一 遍历 找到xib中的约束 修改for(NSLayoutConstraint *constraintin self.constraints) { if (constraint.firstItem==self && constraint.firstAttribute==NSLayoutAttributeLeading) {原创 2017-08-18 09:20:47 · 1138 阅读 · 0 评论 -
objc
Class aa=NSClassFromString(@"ShopNameTableViewCell"); SEL sel=NSSelectorFromString(@"initWithTableView:"); id bb=[[aa alloc]init]; IMP imp=[bb methodForSelector:sel];原创 2017-08-09 22:54:44 · 219 阅读 · 0 评论 -
ASO相关
ASO:Apple Store Optimization 应用商店优化1、分析和借鉴竞品的关键词2、预判能力,对行业有着敏捷的观察能力3、随时更新关键词,如果一段时间以后发现关键词没有达到效果,马上替换掉4、善于运用第三方工具5、选词一定要和自己的APP有关APPDUU:http://www.appduu.com用于查看APP的关键词覆盖数(KCN)、关键词即时转载 2017-06-02 14:37:55 · 775 阅读 · 0 评论 -
各种数据类型所占的存储空间
typedef unsigned intuint32_t;在16位的编译器中占2个字节在32位的编译器中占4个字节在64位的编译器中占4个字节为了以后开发中能够方便查找,并正确的使用数据类型,下面是部分数据类型的取值范围:int:-2147483648~2147483647unsigned int:0~4294967295short:-3转载 2017-06-03 09:11:29 · 7495 阅读 · 0 评论 -
block的使用
1、声明block的类型finishtypedef void(^finish)(WMCustomDatePicker *picker,NSDate *date);2、声明一个finish类型的变量@property (nonatomic,copy)finish finished;3、声明一个调用finish的函数- (id)initWithf原创 2017-06-08 14:34:31 · 193 阅读 · 0 评论 -
常用宏定义
#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) #define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) #define IS_RETINA ([[UIScreen mainScreen] scale]原创 2017-06-09 13:09:21 · 206 阅读 · 0 评论 -
iOS系统方法挑选图片
iOS 图片来源有三种方法:typedef NS_ENUM(NSInteger, UIImagePickerControllerSourceType) { UIImagePickerControllerSourceTypePhotoLibrary, //1.从图库中选择 UIImagePickerControllerSourceTypeCamera, /转载 2017-06-09 16:30:07 · 1096 阅读 · 0 评论 -
iOS常用第三方库
下拉刷新EGOTableViewPullRefresh – 最早的下拉刷新控件。SVPullToRefresh – 下拉刷新控件。MJRefresh – 仅需一行代码就可以为UITableView或者CollectionView加上下拉刷新或者上拉刷新功能。可以自定义上下拉刷新的文字说明。具体使用看“使用方法”。 (国人写)XHRefreshControl – XHRefreshCon转载 2017-06-13 17:46:43 · 3826 阅读 · 0 评论 -
使用sdwebImage缓存图片不显示?
info plist 中添加App Transport Security SettingsAllow Arbitrary Loads =yes看看是不是 https 和http的问题原创 2017-06-13 19:07:11 · 274 阅读 · 0 评论 -
conflicts with same method from another category
我有强迫症,这个警告怎么消除啊 '_setupImageBubbleConstraints' in category from libEaseUILite.a(EaseBubbleView+Gif.o) conflicts with same method from another category原创 2017-08-08 08:45:07 · 2063 阅读 · 1 评论 -
Podfile
1.Empty->enter Podfile2. target 'KioSoftAdmin'do inhibit_all_warnings! pod 'MJExtension','~> 3.0.13' pod 'AFNetworking','~> 3.1.0'end3.终端 cd 拖入根目录原创 2017-10-10 11:36:34 · 206 阅读 · 0 评论