UIImageView、UIView、拉伸像素点
2015-06-04 11:08
489 查看
UIImageView的动画效果
UIImageView *imaView=[[UIImageView
alloc]init
];
//添加将要播放的图片数组
imaView.animationImages=arr;
//设置播放时间
imaView.animationDuration=1;
//启动动画
[imaView
startAnimating];
图片拉伸像素点
UIImage *bubble = [UIImage
imageWithContentsOfFile:[[NSBundle
mainBundle] pathForResource:@"bubble"
ofType:@"png"]];
UIImageView *bubbleImageView = [[UIImageView
alloc] initWithImage:[bubble
stretchableImageWithLeftCapWidth:21
topCapHeight:14]];
UIView
//将某个视图提到最前面显示
[self.view
bringSubviewToFront:view1];
//将某个视图放到最后面
[self.window
sendSubviewToBack:view1];
// view1是view2的父试图。
//如果子视图的长和宽都要跟着父试图走,那么就按照下面的方法执行
view2.autoresizingMask=UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
[view1 addSubview:view2];
UIImageView *imaView=[[UIImageView
alloc]init
];
//添加将要播放的图片数组
imaView.animationImages=arr;
//设置播放时间
imaView.animationDuration=1;
//启动动画
[imaView
startAnimating];
图片拉伸像素点
UIImage *bubble = [UIImage
imageWithContentsOfFile:[[NSBundle
mainBundle] pathForResource:@"bubble"
ofType:@"png"]];
UIImageView *bubbleImageView = [[UIImageView
alloc] initWithImage:[bubble
stretchableImageWithLeftCapWidth:21
topCapHeight:14]];
UIView
//将某个视图提到最前面显示
[self.view
bringSubviewToFront:view1];
//将某个视图放到最后面
[self.window
sendSubviewToBack:view1];
// view1是view2的父试图。
//如果子视图的长和宽都要跟着父试图走,那么就按照下面的方法执行
view2.autoresizingMask=UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth;
[view1 addSubview:view2];
相关文章推荐
- XIB自定义uitableviewCell管理多个uitableviewCell控件
- POJ 2031 Building a Space Station (最小生成树)
- UIView常用的一些方法小记之setNeedsDisplay和setNeedsLayout
- UICollectionView
- Android build-tools升级至23.0.0_rc1后无法编译的问题解决
- 开启线程异步更新UI
- Android酷炫实用的开源框架(UI框架)
- Error: Cannot run program "/home/xxx/android_developer_tools/android-ndk-r8/ndk-build.cmd": Unknown reason
- Winows 10 build 10136最新截图曝光! Edge浏览器图标正式使用
- 从WSS3.0/MOSS2007升级至SPS2010后的UI升级与降级
- numpy user guide 笔记
- [iOS] UIFont 设置字体
- IOS UIViewController的生命周期
- [Selenium] waitUntilAllAjaxRequestCompletes
- Android酷炫实用的开源框架(UI框架)
- UITableViewCell分割线(样式,宽度·高度调整,颜色等的设置)
- 《转》优化UITableViewCell高度计算的那些事
- UIDatePicker简单运用
- Kendo UI 简单使用
- iOS解析--自动无限循环UIScrollView原理