animation

How to fix titleView being masked to navigation bar during transition?

一曲冷凌霜 提交于 2020-02-02 12:45:26
问题 In my view controller I am setting the titleView to a UIView which contains a UIImageView which is made into a circle using setCornerRadius on its layer. The top half of the circle is positioned over the navbar, and the bottom half over the view, like this: Now when I push this view controller, as it animates in, the bottom half of the circle is cut off until the animation completes. Only the part that's in the navbar is shown, something like this: As soon as the push animation ends, the full

How to fix titleView being masked to navigation bar during transition?

流过昼夜 提交于 2020-02-02 12:45:08
问题 In my view controller I am setting the titleView to a UIView which contains a UIImageView which is made into a circle using setCornerRadius on its layer. The top half of the circle is positioned over the navbar, and the bottom half over the view, like this: Now when I push this view controller, as it animates in, the bottom half of the circle is cut off until the animation completes. Only the part that's in the navbar is shown, something like this: As soon as the push animation ends, the full

How to set the image resolution for animations?

非 Y 不嫁゛ 提交于 2020-02-01 17:37:11
问题 how can I set the resolution of an animation saved as mp4 movie with "matplotlib.animation" module? On the web I only found examples using "animation.FuncAnimation". For example the nice tutorial from http://jakevdp.github.com/blog/2012/08/18/matplotlib-animation-tutorial/ used: anim = animation.FuncAnimation(fig, animate, init_func=init, frames=200, interval=20, blit=True) anim.save('basic_animation.mp4', fps=30, extra_args=['-vcodec', 'libx264']) From the matplotlib.animation module

android微信摇一摇(抽奖)

别说谁变了你拦得住时间么 提交于 2020-02-01 14:38:04
android微信摇一摇(抽奖) package com.example.sensoreventlistenertest; import java.util.Random; import com.example.sensoreventlistenertest.ShakeListener.OnShakeListener; import android.media.MediaPlayer; import android.os.Bundle; import android.os.Handler; import android.os.Vibrator; import android.app.Activity; import android.content.Intent; import android.view.Gravity; import android.view.View; import android.view.Window; import android.view.animation.Animation; import android.view.animation.AnimationSet; import android.view.animation.TranslateAnimation; import android.widget.Button; import android

Problem with jquery animation and Internet explorer 8

江枫思渺然 提交于 2020-02-01 05:07:46
问题 this evening I worked very hard trying to understand html positions and jquery animation a I did an HTML page as follows: <html> <head> <script src="jquery-1.5.1.min.js" type="text/javascript"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> body { background-image: url(Cartoon_Landscape2.jpg); } </style> <script type="text/javascript"> function moveDIV ( obj, x, y ) { var element = document.getElementById(obj); element.style.left=x;

ViewPager inside Fragment with margins and page transformer not rendering correctly

一个人想着一个人 提交于 2020-02-01 03:17:27
问题 I have a viewpager with fragments inside it. I use the code similar to e.g. ViewPager margin in PageTransformer transformations and padding so you can see the faded out edge of fragments on either side of the fragment you are currently viewing. But the problem is when the viewpager is first started, the fragments on either side are not faded and zoomed out. I.e. the transformPage method of my ZoomOutPageTransformer doesn't get called until you start swiping, so the initial off-page right /

Unity3D新老动画的倒序播放

半城伤御伤魂 提交于 2020-02-01 02:26:55
在使用高版本unity的时候,自己制作动画时,默认添加Animator(新动画)组件,若是一般的单个动画正常播放,新老动画差不离,就业没有在意。后期制作过程中出现倒序播放的要求,找了好久才找到,原来新老动画倒序播放还是有些区别的!(终究还是个Low瓢\(^o^)/~)一起来看看吧! 一、老动画Animation 设置指定动画的起始时间,播放速度,再执行播放方法即可 正序: void PlayAnimation() { Animation _animation = this.GetComponent<Animation>(); string animClip = "_main_window"; _animation[animClip].time = 0; _animation[animClip].speed = 1f; _animation.Play(animClip); } 倒序: void RevertAnimation() { Animation _animation = this.GetComponent<Animation>(); string animClip = "_main_window"; _animation[animClip].time = _animation[animClip].clip.length; _animation[animClip].speed

css3中的新特性经典应用

让人想犯罪 __ 提交于 2020-01-31 19:24:00
这篇文章主要分析css3新特性的典型应用,都是干活,没得水分。     1.动画属性:animation。     利用animation可以实现元素的动画效果,他是一个简写属性,用于设置6个动画属性:amination-name(名字)/duration(持续时间)/delay(延迟时间)/timing-function(速度曲线)/iteration-count(播放次数)/direction(是否轮流反向播放动画)。 animation: name duration timing-function delay iteration-count direction; animation-delay - 设置延时,也即从元素加载完成之后到动画序列开始执行的时间。 animation-direction - 设置动画在每次运行完后是反向运行还是重新回到开始位置重复运行。 允许值:normal(正常顺序), alternate, reverse(反向播放), alternate-reverse 默认值:normal normal:动画循环播放时,从结束状态跳回到起始状态 浏览器对其他值的支持情况不佳,应该慎用。 animation-duration - 设置动画一个周期的时长。 animation-iteration-count - 设置动画重复次数

CSS动效集锦,视觉魔法的碰撞与融合(三)

只愿长相守 提交于 2020-01-31 09:14:33
本文讲述的原理和相关demo 扇形DIV的使用——实现雷达扫描图 DIV环形布局—实现loading圈 动画的向量合成—实现抛物线动画 无限滚动动画—实现跑马灯效果 perspective和transform的运用——实现卡片翻转 话不多说,请看。 扇形DIV的使用——实现雷达扫描图 在一些杀毒或文件扫描类的软件上,我们可能会看到一些雷达扫描的UI样式,例如下图所示 如果我们要通过CSS该如何去实现话,我们的想法一般是先画个扇形,然后给它加上渐变。 实现渐变的方式很简单,但我们该如何实现一个扇形呢? 我们可以通过一些技巧实现这一点,请看: 没错,我们可以通过skew函数,将黄色的div倾斜,然后溢出部分通过overflow:hidden遮住就可以了。 锐角扇形:deg<0,向右边倾斜,即可得到锐角扇形 钝角扇形:deg>0, 向左边倾斜,即可得到钝角扇形 代码如下 // CSS代码 @keyframes rotateAnimate { from { transform : rotate(0deg) skew(-30deg) } to { transform : rotate(360deg) skew(-30deg) } } .fan-wrapper { overflow : hidden ; position : relative ; margin : 100px ; width

Animation while switching Activity in Android?

…衆ロ難τιáo~ 提交于 2020-01-31 07:05:26
问题 I want an animation while switching from one activity to another in Android. The animation I'm aiming for is a bottom to top like animation. How can I do that? 回答1: Yes it is possible. check out this question. You have to define animations in anim folder than you can overide current animation using overridePendingTransition( R.anim.slide_in_up, R.anim.slide_out_up ); 回答2: You can set your animation when you go to another activity using this overridePendingTransition(android.R.anim.fade_in,