logo
  • 教程列表
  • SO官方文檔
  • UIImageView 與 UIScrollView 結合使用
    • 雙擊
    • 捏手勢變焦
  1. StackOverflow 文件
  2. Xamarin.iOS 教程
  3. UIImageView 與 UIScrollView 結合使用
  4. 捏手勢變焦

捏手勢變焦

Created: November-22, 2018

private float minScale = 1f;
private float maxScale = 4f;

private void SetUpPinchGestureZoom()
{
    imageViewToZoom.ContentMode = UIViewContentMode.ScaleAspectFit;

    scrollView.MaximumZoomScale = maxScale;
    scrollView.MinimumZoomScale = minScale;

    scrollView.ViewForZoomingInScrollView += (UIScrollView sv) => { return imageViewToZoom; };
}
  • 雙擊

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明