iOS 之 anchorPoint 和 position

整體來講:anchorPoint決定了這個layer的動畫操做原點,position根據anchorPoint的位置,決定layer擺放在哪裏html

根據layer是根layer和非根layer的狀況:動畫

1.根layer的狀況下htm

修改anchorPoint的值,會直接致使layer(view)的位置的改變,而position的值則沒什麼影響。blog

2.非根layer的狀況下get

修改anchorPoint的值,只會致使致使動畫操做原點的改變,layer的位置則不受影響,position的值仍是會根據anchorPoint的值改變layer的位置。it

具體能夠參考:http://www.cnblogs.com/wendingding/p/3800736.htmlio

相關文章
相關標籤/搜索