UIScrollview 在縮放時獲取當前UIImageView指定座標

scaleX,scaleY是指定的UIImageView上的座標

scale 是縮放因子


[button setFrame:CGRectMake(scaleX *scale- button.frame.size.width/2 + mapImageView.frame.origin.x,scaleY *scale - button.frame.size.height + mapImageView.frame.origin.y,button.frame.size.width,button.frame.size.height)];

        [button setHidden:NO];

     }];


發佈了26 篇原創文章 · 獲贊 5 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章