文章列表
#define runTime 1.0
#define kDetal 50
//左旋转
- (IBAction)runzuo:(id)sender {
[UIViewbeginAnimations:nilcontext:nil];
[UIViewsetAnimationDuration:1.0];
_btn.transform = CGAffineTransformRotate(_btn.transform,- M_PI_4);
[UIViewcommitAnimations];
//定义常量
#define runTime 1.0
#define kDetal 50
//frame
- (IBAction)run:(id)sender {
//初始化动画
[UIViewbeginAnimations:nilcontext:nil];
//设置动画执行速度
[UIViewsetAnimationDuration:runTime];
//获取当前btn.frame的x.y
CGRect tempFrame = _btn.frame;
//获取当前传进来的空间的tag属性
int ...
IOS-delegate解释-01
- 博客分类:
- IOS
第一次进入程序:
1.didFinishLaunchingWithOptions --> 加载完毕(第一运行程序)
2.applicationDidBecomeActive --> 得到焦点
点击HOME:
1.applicationWillResignActive --> 失去焦点
2.applicationDidEnterBackground --> 进入后台
再次点击程序:
1.applicationDidEnterBackground --> 进入前台
2.applicationDidBecomeActive --> 得到焦点
JAVA-THREAD-定义并启动一个线程
- 博客分类:
- JAVA
1、Runnable
package thread;
public class StartRunnable {
public static void main(String[] args) {
new Thread(new HelloRunnable("xiaosaner",5)).start();
}
}
package thread;
public class HelloRunnable implements Runnable{
private String name;
private int age;
publi ...
JAVA-THREAD-CONCEPT
- 博客分类:
- JAVA
1、使用多线程目的 通常是为了提高并发性,这就不可避免的出现了线程同步的问题。
2、并发
并发是指两个或多个事物在同一时间间隔内发生。简单的理解就是在同一段时间内发生了多个事情。
3、同步
...