最近剛發現一個問題,anchorPoint這個屬性雖然是屬於CCNode的,但是CCLayer設置anchorPoint沒有效果。CCLayer的anchorPoint被默認設定在(0, 0)位置,而且無法改變。
根據網上的搜索得到一個解決辦法:在setAnchorPoint之前先設置setIsRelativeAnchorPoint = YES;
最近剛發現一個問題,anchorPoint這個屬性雖然是屬於CCNode的,但是CCLayer設置anchorPoint沒有效果。CCLayer的anchorPoint被默認設定在(0, 0)位置,而且無法改變。
根據網上的搜索得到一個解決辦法:在setAnchorPoint之前先設置setIsRelativeAnchorPoint = YES;