![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ios
wre_most2
这个作者很懒,什么都没留下…
展开
-
Objective-C中的instancetype和id异同
一、什么是instancetypeinstancetype是clang 3.5开始,clang提供的一个关键字,表示某个方法返回的未知类型的Objective-C对象。我们都知道未知类型的的对象可以用id关键字表示,那为什么还会再有一个instancetype呢?二、关联返回类型(related result types)根据Cocoa的命名规则,满足下述规则的方法:1、类方法中,以alloc或转载 2015-05-09 17:14:14 · 367 阅读 · 0 评论 -
无限滚动的TableView
转自 https://iphone2020.wordpress.com/2012/10/01/uitableview-tricks-part-2-infinite-scrolling/, 感谢作者!Last time I posted about the UITableView Tricks to lay the cells of the tablview in Circu转载 2016-12-29 09:37:52 · 921 阅读 · 0 评论 -
欢迎使用CSDN-markdown编辑器
OC property原创 2016-08-03 13:55:36 · 528 阅读 · 0 评论 -
Core Animation
Views vs. layersA layer is a simple model class that exposes a number of properties to represents some image-based content. Every UIView is backed by a layer, so you can think of layers as the lower翻译 2015-11-20 22:38:30 · 920 阅读 · 0 评论 -
Swift 中的可选类型(Optional)
在 Swift 中,我们使用可选类型来表示值有可能缺失的情况。一个可选类型的值表示他有值并且值等于 x 或者他根本就没有值。注意:可选类型在C语言和OC语言中并不存在。OC中与可选类型意思最接近的是一个本该返回某个类型的对象的方法可以返回nil,nil在此时表示没有有效值。然而,OC中的这种机制只对对象类型有效,对结构体,基本C类型和枚举等都无效。对于这些类型,当他们没有有效值的时候,OC会返回一翻译 2015-10-13 22:46:37 · 1149 阅读 · 0 评论 -
iOS Animations
1. Spring Animations (弹性动画) animateWithDuration(_:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:) •usingSpringWithDamping: This controls原创 2015-11-13 10:07:32 · 693 阅读 · 0 评论 -
Swift 细小知识点汇集
浮点型转换为整型舍去浮点数的小数部分即可。类型别名根据程序上下文,你想要使用一个更为贴切的名称来引用某个类型的变量,此时你可以为那个类型定义一个类型别名。类型别名使用 typealias 关键字来定义。比如当描述一个外部资源的大小的时候,可以如下定义别名:typealias AudioSample = UInt16定义了类型别名之后,你可以使用别名来代替原来的类型名:// AudioSample 是翻译 2015-10-08 21:48:01 · 526 阅读 · 0 评论 -
GCD 学习总结
一些相关的名词。串行和并行用于描述队列。串行队列总是一个任务一个任务的执行,并行队列可能同时执行多个任务。同步和异步对函数调用来讲。同步调用会等到调用的方法执行完成再返回控制权,异步调用是通知函数去执行,然后不等待函数执行完成,即返回控制权。临界区临界区的代码一定不可以并行执行,他们通常是操作一个共享的数据。竞争条件两个或多个进程读写某些共享数据,而最后的结果取决于进程运行的精确时序。死锁原创 2015-10-20 21:47:24 · 554 阅读 · 0 评论 -
@import vs #import - iOS 7
It's a new feature called Modules or "semantic import". There's more info in the WWDC 2013 Session 205 & 404 videos. It's kind of a better implementation of the pre-compiled headers. You can use mod转载 2015-05-09 17:26:26 · 537 阅读 · 0 评论 -
tableview 视差效果
转自 https://blog.krishan711.com/gorgeous-parallax-scrolling-with-uitableviewcells,感谢作者!Parallax scrolling is a powerful weapon to wield. If it's used incorrectly, it's super annoying; but whe转载 2016-12-29 09:41:03 · 421 阅读 · 0 评论