ios设备中有的加速计可以测量出加速度和重力。陀螺仪可用于确定设备的方向与每条坐标轴之间的夹角,可用于读取描述设备围绕其轴的旋转的值。
首先在工程中添加CoreMotion.framework#import #import
@interface ViewController : UIViewController
@property (strong, nonatomic) CMMotionM...
分类:
移动开发 时间:
2014-10-13 12:19:39
阅读次数:
217
遇到了一个坑QMediaPlayer::duration的坑.
这个坑是当你setMedia之后, 直接使用duration获取播放时长会得到0, 出错时候的代码片段如下:
void MainWindow::slotPlayAudio(const QString &audioFilePath)
{
currentAudioFilePath_ = audioFilePath;
...
分类:
其他好文 时间:
2014-10-12 22:45:58
阅读次数:
497
传统的旋转动画方式如:
<rotate
android:fromDegrees="0"
android:toDegrees="359"
android:duration="500"
android:repeatCount="-1"
android:pivotX="50%"
andro...
分类:
移动开发 时间:
2014-10-12 22:24:28
阅读次数:
416
W3C标准中对css3的transition这是样描述的:“css的transition允许css的属性值在一定的时间区间内平滑地过渡。这种效果可以在鼠标单击、获得焦点、被点击或对元素任何改变中触发,并圆滑地以动画效果改变CSS的属性值。”下面我们同样从其最语法和属性值开始一步一步来学习transi...
分类:
其他好文 时间:
2014-10-12 17:45:18
阅读次数:
256
property是一种代码生成机制,可以生成不同类型的getter/setter函数,特别是假设你想要用点(.)操作符号来存取变量的话,你就能必须使用property。怎样使用?使用方法如:@property (attribute1,attribute2) float value;这些attribu...
分类:
其他好文 时间:
2014-10-11 22:17:16
阅读次数:
212
Swift的String竟然没有length属性,好难受,每次要获取String的字符串长度都要借助全局函数countElements。
没办法,只有扩展String结构体,给它添加一个属性了。
import Foundation
extension String {
// readonly computed property
var length:...
分类:
编程语言 时间:
2014-10-11 21:48:46
阅读次数:
165
假设出现:nested push animation can result in corrupted navigation barFinishing up a navigation transition in an unexpected state. Navigation Bar subview t...
分类:
其他好文 时间:
2014-10-11 16:43:35
阅读次数:
170
效果图:代码结构图:代码:RootTableViewCell.h#import @interface RootTableViewCell : UITableViewCell@property(nonatomic,strong) UIButton * bookLeft;@property(nonato...
分类:
其他好文 时间:
2014-10-11 15:45:35
阅读次数:
165
Android动画主要包含补间动画(Tween)View Animation、帧动画(Frame)Drawable Animation、以及属性动画Property Animation。下面依次介绍一下各个动画。Tween动画,通过对 View 的内容进行一系列的图形变换 (包括平移、缩放、旋转、改变透明度)来实现动画效果。动画效果的定义可以采用XML来做也可以采用编码来做。Tween动画有4种类型:...
分类:
移动开发 时间:
2014-10-10 23:56:24
阅读次数:
400
Invalid property 'hibernateTemplate' of bean class [com.lzj.www.dao.impl.UserDaoImpl]: No property 'hibernateTemplate' found对于这个问题,在网上有很多相关的文章,但差不多都说同...
分类:
编程语言 时间:
2014-10-10 22:38:34
阅读次数:
2045