AprSnow's Blog


  • Home

  • Archives

  • About

  • Tags

  • Categories

CGAffineTransform

Posted on 2019-03-13

定义

An affine transformation matrix for use in drawing 2D graphics.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Return the transform [ a b c d tx ty ]. */

/* Return a transform which translates by `(tx, ty)':
t' = [ 1 0 0 1 tx ty ] */
public /*not inherited*/ init(translationX tx: CGFloat, y ty: CGFloat)


/* Return a transform which scales by `(sx, sy)':
t' = [ sx 0 0 sy 0 0 ] */
public /*not inherited*/ init(scaleX sx: CGFloat, y sy: CGFloat)


/* Return a transform which rotates by `angle' radians:
t' = [ cos(angle) sin(angle) -sin(angle) cos(angle) 0 0 ] */
public /*not inherited*/ init(rotationAngle angle: CGFloat)
Read more »

自旋锁与互斥锁

Posted on 2018-09-21 | In Objective-C

本文介绍了 iOS 各种加锁方法。

Read more »

view to image

Posted on 2018-09-06 | In Objective-C

引子

最近遇到一个需求,需要把一个 UIView 转换为一个 UIIamge,这里用到了 UiKit 的上下文,还需要了解 Core Graphics 的一些内容,所以总结一下。

Read more »

消息发送与转发

Posted on 2018-08-10 | In Objective-C

本文总结了 runtime 中的消息发送与转发过程。

Read more »

定期更新 Homebrew

Posted on 2018-08-06 | In Experience

前言

Homebrew 是使用 Mac OS 的一件利器,Homebrew 可以安装 Apple 没有预装但非常需要的东西。Homebrew 会将软件包安装到独立目录,并将其文件软链接至 /usr/local。

Read more »

七月总结

Posted on 2018-07-29 | In Summary

本月重新读了一遍《剑指Offer》,并把题目做了一遍。
本月在swift上学习了一些很好用的技巧,比如 map,filter,reduce。本月重点学习了 Runloop, Runtime, block 的底层细节,并且总结了一个 Method Swizzling 标准代码。

Read more »

iOS App 启动过程:main 及生命周期

Posted on 2018-07-25 | In Objective-C

iOS App 启动过程(三),本文介绍 main() 函数之后的过程以及 controller 与 view 的生命周期。

Read more »

iOS App 启动过程:从 exec 到 main

Posted on 2018-07-18 | In Objective-C

iOS App 启动过程(二),本文介绍从 exec() 方法到 main() 方法的过程。

Read more »

iOS App 启动过程:基础概念

Posted on 2018-07-13 | In Objective-C

iOS App 启动过程(一),本文介绍一些基础概念。

Read more »

从 NSObject 推出 UIAlertController

Posted on 2018-07-11 | In Objective-C

引子

UIAlertView在iOS9之后被Apple废弃了,Apple推荐使用UIAlertController。但是,有时候我们使用UIAlertController时可能不是在一个UIViewController中,而是在一个NSObject中,但是UIAlertController是需要通过UIViewController才能present,那么如何在NSObject中正确使用UIViewController呢?
这里我总结了常用的三种方法。

Read more »
12…4

AprSnow

31 posts
6 categories
1 tags
© 2019 AprSnow
Powered by Hexo
|
Theme — NexT.Gemini v5.1.4