BKZoomView

https://github.com/freshking/BKZoomView

A UIView that will zoom into its parent view. It can be implemented with only three lines of code and is very easy to use. It is optionally drag-able with a customizable zoom scale.

一个UIView,用来放大它的父类view,非常容易使用,仅需3行代码。支持拖动这个view,并定制缩放比例。

How to

Initialize the zoom view anywhere in a view.

在一个view中初始化一个区域。

BKZoomView *zoomView = [[BKZoomView alloc] initWithFrame:CGRectMake(0, 280, self.view.frame.size.width, 150)];
[zoomView setZoomScale:2.0];
[zoomView setDragingEnabled:NO];
[self.view addSubview:zoomView];

Options:

  1. setZoomScale: Here you can set the zoom value (Standard = 2.0) 设置放大区域(默认值为2.0)
  2. setDragingEnabled: Here you can decide wether the user can drag the zoom view around or if it is static. If static, then the user can touch throuch this view which is nice if you place it over a UITableView and still want to scroll. 设置是否可以拖动:在这里,你可以设置用户是否可以拖动这个view,你也可以设置成静态的。

Important:

[zoomview setNeedsDisplay] must be called everytime you want to update the zoom view. For example the zoom view is placed over a UITableView and you want a live zoom when scrolling, then you must implement this in the scrollViewDidScroll: method. Exception here is when dragging.

[zoomview setNeedsDisplay]在你更新缩放view的时候必须每次都调用。如果在scrollView中调用的话,你在scrollViewDidScroll:方法中调用就行了。

For further information please check out the example application.

更多的信息,请检查demo项目工程。

[翻译] BKZoomView的更多相关文章

  1. 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...

  2. 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...

  3. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  4. 【探索】机器指令翻译成 JavaScript

    前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...

  5. 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...

  6. 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...

  7. 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...

  8. 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?

    0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...

  9. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点

    在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...

随机推荐

  1. sklearn 绘制roc曲线

    from sklearn.metrics import roc_curve, auc import matplotlib as mpl import matplotlib.pyplot as plt ...

  2. nginx学习笔记(7)Nginx如何处理一个请求---转载

    如何防止处理未定义主机名的请求基于域名和IP混合的虚拟主机一个简单PHP站点配置 基于名字的虚拟主机 Nginx首先选定由哪一个虚拟主机来处理请求.让我们从一个简单的配置(其中全部3个虚拟主机都在端口 ...

  3. C语言——打印“Hello World!”,这么简单?

    打印Hello World! #inculde <stdio.h> int main(){ printf("Hello World!"); return 0; } 第一 ...

  4. Qt 绘图与动画系统

    Qt 提供了内置的绘图系统以及独立的QtOpenGL模块提供对OpenGL的支持.Qt提供了基于状态机的QPainter系统和面向对象的Graphics View系统. QPainter 基于状态机的 ...

  5. 三种数据库访问——原生JDBC

    原生的JDBC编程主要分一下几个步骤: (原生的JDBC编程指,仅应用java.sql包下的接口和数据库驱动类编程,而不借助任何框架) 1. 加载JDBC驱动程序: 2. 负责管理JDBC驱动程序的类 ...

  6. .Net调用Java端带有WS-Security支持的Web Service【亲测通过】

    做了几年的开发,今天终于鼓起勇气开通了博客园.平时都是找各种大牛,看他们的分享博客的解决BUG.从今天起,我也开始分享我学习之路.还望大家多多支持! 最近收到一个采用Axis2实现的WebServic ...

  7. JBoss 实战(2)

    转自:https://www.cnblogs.com/aiwz/p/6154591.html JBOSS HTTP的Thread Group概念 JBOSS是一个企业级的J2EE APP Contai ...

  8. maven配置Mac平台

    Mac OS X 安装Maven: 下载 Maven, 并解压到某个目录.例如/Users/robbie/apache-maven-3.3.3 打开Terminal,输入以下命令,设置Maven cl ...

  9. 最全的Spring AOP

    1.什么是AOP? AOP(Aspect-Oriented Programming, 面向切面编程): 是一种新的方法论, 是对传统 OOP(Object-Oriented Programming, ...

  10. gRPC版本的 Google APIs

    gRPC将是未来google所有客户端的库标准(DevoxxFR), 这句话的出处: https://twitter.com/chanezon/status/585724143003402240    ...