会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Emyin
首页
新随笔
管理
上一页
1
2
3
4
5
6
7
···
41
下一页
2020年4月23日
iOS-UIScrollView/NSTimer
摘要: 1. 监听scrollview停止拖拽需要下面两个方法: 2. scrollview的代理为何是weak, 防止循环引用 3. 设置代理,可以拖线设置,也可以代码设置 4. 缩放: 实现delegate方法,设置缩放的view, 设置缩放比例 5. pagingEnabled = YES : 当滑到
阅读全文
posted @ 2020-04-23 13:55 Emyin
阅读(144)
评论(0)
推荐(0)
2020年4月22日
iOS-KVO
摘要: 键值监听 [person addObserver: forKeyPath ] [person removeObserver: forKeyPath】 当监听的属性值发生改变,会调用下面方法: -observeValueForKeyPath: ofObject...
阅读全文
posted @ 2020-04-22 22:53 Emyin
阅读(96)
评论(0)
推荐(0)
iOS-KVC
摘要: [person setValue:@"xiaomi" forKeyPath:@"dog.name"]; [person valueForKey:"age"] [person dictionaryWithValuesForKeys:@[@"name",@"age"]]; //模型转字典 forKey和
阅读全文
posted @ 2020-04-22 21:07 Emyin
阅读(86)
评论(0)
推荐(0)
iOS-图片拉伸失真解决办法
摘要: [image resizableImageWithCapInsets:UIEdgeInsetMake(imageHeight * 0.5, imageWidth * 0.5, imageHeight * 0.5 -1, imageWidth * 0.5 - 1) resizingMode:UIIMa
阅读全文
posted @ 2020-04-22 20:34 Emyin
阅读(477)
评论(0)
推荐(0)
iOS-动画
摘要: 1. 渐变动画 [UIView beginAnimations:nil context:nil];[UIView setAnimationDuration:1.0]; 改变frame等 [UIView commitAnimation]; [UIView animateWithDuration: an
阅读全文
posted @ 2020-04-22 20:22 Emyin
阅读(134)
评论(0)
推荐(0)
2020年4月19日
iOS-界面开发
摘要: 1. 控件为什么用weak修饰:控件已经被UIView强指针指向,如果用strong, 则viewController也将强指针指向控件, 在view销毁时可能无法销毁该控件。 2. command + shift + h : 模拟器回到主界面 command + shift + h(h连按两下)
阅读全文
posted @ 2020-04-19 09:45 Emyin
阅读(349)
评论(0)
推荐(0)
2020年4月13日
mac苹果系统常用软件
摘要: https://mp.weixin.qq.com/s/mVxJYiGrfselJx1b9XdvYw
阅读全文
posted @ 2020-04-13 19:56 Emyin
阅读(155)
评论(0)
推荐(0)
2020年4月12日
iOS-Foundation
摘要: 1. NSString 通过字符串常量创建,存储在常量区 通过alloc initWithFormat/stringWithFormat创建,存储在堆区,而且不同的平台存储的方式不一样。对于相同的两个创建语句,mac系统会自动对字符串对象优化,但iOS平台就是两个不同对象。不同编译器存储方式也不一样
阅读全文
posted @ 2020-04-12 16:28 Emyin
阅读(116)
评论(0)
推荐(0)
2020年4月10日
iOS -
摘要: 1. Category Category是给原有类增加方法的,不能增加属性 分类中的@property只会生成getter.setter的声明,不会生成方法的实现及成员变量。 分类可以访问原有类.h中声明的属性 如果一个分类有一个方法和原类方法名相同,那么用原类调用该方法是,实际调用的是分类的方法。
阅读全文
posted @ 2020-04-10 20:33 Emyin
阅读(170)
评论(0)
推荐(0)
2020年4月9日
iOS-内存管理
摘要: 1. alloc, new,copy一个对象时,对象的引用计数为1 引用计数为0时,才能释放 2. retain +1 release -1 retainCount 不准确 3. 对象引用计数为0需要销毁时,系统会调用-(void)dealloc方法,必须先调用[super dealloc]且要写在
阅读全文
posted @ 2020-04-09 19:04 Emyin
阅读(134)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
···
41
下一页
公告