设为首页 加入收藏

TOP

iOS- XKZoomingView 简单的图片缩放预览,支持横屏、长图【手势:单击、双击、放大缩小】(三)
2019-08-31 00:18:34 】 浏览:85
Tags:iOS- XKZoomingView 简单 图片 缩放 预览 支持 长图 手势 单击 双击 放大 缩小
frame
= imageViewFrame; } - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return self.mainImageView; } - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ if (self.isZooming || self.zoomScale != 1) { return; } _currPont = scrollView.contentOffset; } #pragma mark - 监听屏幕旋转通知 - (void)statusBarOrientationChange:(NSNotification *)notification{ self.zoomScale = 1; } - (void)dealloc{ [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; } @end

USE

XKZoomingView *zoomView = [[XKZoomingView alloc]init];
zoomView.frame = self.view.bounds;
zoomView.mainImage = [UIImage imageNamed:@""];
[self.view addSubview:zoomView];

 ELSE

 

首页 上一页 1 2 3 下一页 尾页 3/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇iOS开发简记(7):网络请求模块 下一篇iOS证书配置与管理

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目