VICMAImageView

https://github.com/vitoziv/VICMAImageView

Change image view's content mode with your animation!

修改 imageView 的contentMode属性就有动画效果!

Installation

Cocoapods

pod 'VICMAImageView', '~> 1.0'

用Cocoapods安装

pod 'VICMAImageView', '~> 1.0'

Usage

Use VICMAImageView like a UIImageView

就像使用UIImageView那样子来使用VICMAImageView

- (void)viewDidLoad {
[super viewDidLoad];
UIImage *image = [UIImage imageNamed:@"1.jpg"];
VICMAImageView *imageView = [[VICMAImageView alloc] initWithImage:image];
imageView.frame = CGRectMake(0, 0, 100, 100);
[self.view addSubview:imageView];
}

Animate contentMode in animation block

在animation的block中赋值就可以看到动画效果了.

[UIView animateWithDuration:0.3
animations:^{
imageView.contentMode = UIViewContentModeScaleAspectFill;
}];

License

VICMAImageView is available under the MIT license. See the LICENSE file for more info.

VICMAImageView遵循MIT协议,你可以查看MIT协议了解更多.

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

  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. Android Studio 和 gradle 修改缓存文件夹路径

    Android Studio的缓存文件主要有四个文件夹,分别是 .android 这个文件夹是Android SDK生成的AVD(Android Virtual Device Manager)即模拟器 ...

  2. PL/SQL:these query result are not updateable,include the ROWID to get updateab -----for update

    these query result are not updateable,include the ROWID to get updateab 原因: 其实,选中一个表后,右键,如果选择“query ...

  3. Charles 抓取 iphone https的设置方式

    1. Charles:  help > SSL Proxying > Install Charles Root Certificate, 2. 将会打开 钥匙串访问 的功能,查找 Char ...

  4. Spring注解_详解

    @Autowired 注释 将 @Autowired 注释标注在成员变量上   import org.springframework.beans.factory.annotation.Autowire ...

  5. [javaSE] GUI(菜单)

    菜单MenuBar Menu  MenuItem 调用Frame对象的setMenuBar()方法,设置菜单,参数:MenuBar对象 import java.awt.FlowLayout; impo ...

  6. BZOJ2656 [Zjoi2012]数列

    Description 小白和小蓝在一起上数学课,下课后老师留了一道作业,求下面这个数列的通项公式: $$\begin{aligned}A_0 &= 0\\A_1 &= 1\\A_{2 ...

  7. POJ P1741 Tree 解题报告

    Description Give a tree with n vertices,each edge has a length(positive integer less than 1001). Def ...

  8. Liunx一些命令

    1.设置管理员的密码:sudo passwd root2.获取管理员权限su root3.查看IP地址sudo ifconfig -a4.创建一个文件sudo touch test.txt5.创建一个 ...

  9. 02--CSS的继承性和层叠性

    一 继承性 css有两大特性:继承性和层叠性 面向对象语言都会存在继承的概念,在面向对象语言中,继承的特点:继承了父类的属性和方法.那么我们现在主要研究css,css就是在设置属性的.不会牵扯到方法的 ...

  10. lnmp环境 开启pathinfo

    thinkphp url访问模式中 默认的pathinfo不起作用? 1.检查你的tp配置文件config.php URL模式 'url_model'=> '1', //URL模式 即pathi ...