实现自定义效果的状态栏
2014-11-08 18:21
155 查看
CGRect frame = CGRectMake(0, 0, 320, 20);
UIWindow* wd = [[UIWindow alloc] initWithFrame:frame];
[wd setBackgroundColor:[UIColor clearColor]];
[wd setWindowLevel:UIWindowLevelAlert];
frame = CGRectMake(100, 0, 30, 20);
UIImageView* img = [[UIImageView alloc] initWithFrame:frame];
[img setImage:[UIImage imageNamed:@"00_0103.png"]];
[wd addSubview:img];
[wd makeKeyAndVisible];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:2];
frame.origin.x += 150;
[img setFrame:frame];
[UIView commitAnimations];
上面的代码演示了创建一个小图标从时间的左侧移动到时间右侧的简单效果,喜欢的可以自己实现一些其他的效
UIWindow* wd = [[UIWindow alloc] initWithFrame:frame];
[wd setBackgroundColor:[UIColor clearColor]];
[wd setWindowLevel:UIWindowLevelAlert];
frame = CGRectMake(100, 0, 30, 20);
UIImageView* img = [[UIImageView alloc] initWithFrame:frame];
[img setImage:[UIImage imageNamed:@"00_0103.png"]];
[wd addSubview:img];
[wd makeKeyAndVisible];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:2];
frame.origin.x += 150;
[img setFrame:frame];
[UIView commitAnimations];
上面的代码演示了创建一个小图标从时间的左侧移动到时间右侧的简单效果,喜欢的可以自己实现一些其他的效
相关文章推荐
- iPhone遮盖系统栏,实现自定义效果的状态栏
- ios学习--iPhone遮盖系统栏,实现自定义效果的状态栏
- iPhone遮盖系统栏,实现自定义效果的状态栏
- iPhone遮盖系统栏,实现自定义效果的状态栏
- iPhone遮盖系统栏,实现自定义效果的状态栏
- iPhone遮盖系统栏,实现自定义效果的状态栏
- Flex实现组件自定义倒影效果之一:继承于UIComponent
- Android自定义button的实现,未选中,按下,选中效果
- 自定义Button 实现Flex Button 描边效果。
- vtkMapper相关类的分析及重写vtkMapper实现自定义的一些效果 (1)vtkAbstractMapper3D
- 实现自定义view(2):仿Android QQ多屏幕显示ListView的效果
- Android中ImageButton自定义按钮的按下效果的代码实现方法,附网上2种经典解决方法。
- extjs实现自定义 拖拽效果
- [Wap] 制作自定义WmlListAdapter来实现Mobile.List控件的各种效果
- 转载 :Android中ImageButton自定义按钮的按下效果的代码实现方法,附网上2种经典解决方法。
- 自定义ViewGroup 实现拖动跟快速滚动的效果
- 三种方式实现自定义圆形页面加载中效果的进度条
- 巧用自定义Menu控件实现Tab效果
- [Wap] 制作自定义WmlListAdapter来实现Mobile.List控件的各种效果
- PageAdmin如何实现自定义头信息效果。