UIView scale to 0 using CGAffineTransformMakeScale

前端 未结 3 1409
孤街浪徒
孤街浪徒 2021-02-20 16:22

Is it possible to scale a UIView down to 0 (width and height is 0) using CGAffineTransformMakeScale?

view.transform = CGAffineTransformMakeScale(0.0f, 0.0f);

Why w

3条回答
  •  花落未央
    2021-02-20 16:27

    There are lots of times when the underlying frameworks need to invert your transform matrix. The inverse of a matrix is some matrix M' such that the product of your matrix M and the inverse matrix M' is the identify matrix 1.

    1 = M * M'

    The zero matrix does not have an inverse, hence the error message.

提交回复
热议问题