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

  • 关于我们
  • 免责声明