对联
来源:互联网 发布:知乎 如何正确吐槽 编辑:程序博客网 时间:2024/04/28 03:27
#import "AppDelegate.h"
#import "ViewController.h"
#define hangPi @"界世牛大"//宏定义
#define shangLian @"好好学习"
#define xiaLian @"天天向上"
@interface AppDelegate ()
{
UIImageView *imageView;
}
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
ViewController *vc = [[ViewController alloc]init];
self.window.rootViewController = vc;
[self.window makeKeyAndVisible];//让窗口是一个主窗口并且显示在屏幕上
self.window.backgroundColor = [UIColor whiteColor];
//标签初始化
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(90, 100, 200, 80)];
UILabel *label1 = [[UILabel alloc]initWithFrame:CGRectMake(40, 200, 50, 400)];
UILabel *label2 = [[UILabel alloc]initWithFrame:CGRectMake(290, 200, 50, 400)];
[self.window addSubview:label];
[self.window addSubview:label1];
[self.window addSubview:label2];
//设置标签的颜色
label.backgroundColor = [UIColor redColor];
label1.backgroundColor = [UIColor redColor];
label2.backgroundColor = [UIColor redColor];
//插入文本并设置文本的字体、大小、对其方式等
label.text = hangPi;
label.textAlignment = NSTextAlignmentCenter;
label.font = [UIFont systemFontOfSize:30];
label1.text = xiaLian;
label1.textAlignment = NSTextAlignmentCenter;
label1.font = [UIFont systemFontOfSize:30];
label1.numberOfLines = 4;
label2.text = shangLian;
label1.textAlignment = NSTextAlignmentCenter;
label2.font = [UIFont systemFontOfSize:30];
label2.numberOfLines = 4;
//插入视图
imageView = [[UIImageView alloc]init];
imageView.frame = CGRectMake(100, 200, 180, 400);
[self.window addSubview:imageView];
imageView.image = [UIImage imageNamed:@"奥黛丽.jpg"];
//延时
[self performSelector:@selector(start) withObject:nil afterDelay:2];
return YES;
}
-(void)start{
UIImage *image1 = [UIImage imageNamed:@"恐怖动画1.tiff"];
UIImage *image2 = [UIImage imageNamed:@"恐怖动画2.tiff"];
NSArray *array = @[image1,image2];
imageView.animationDuration = 1;
imageView.animationImages = array;//给帧动画设置图标素材
imageView.animationRepeatCount = 0;//给动画设置重复次数 0说明无限重复
[imageView startAnimating];
}
- 对联
- 对联
- 对联
- 对联
- 对联
- 对联
- 对联js
- 春节对联
- 另类对联
- 经典对联
- 新新对联
- 最新对联!
- 对联效果
- 对联广告
- 对联广告
- 对联广告
- 滚动对联
- 对联广告
- 初学Oracle的一点心得
- NoSQL数据库的事务处理与一致性
- 只是背着女友和别人热忱地相爱了,而已
- 求:未排序数组中累加和为给定值的最长子数组长度
- 送给和我一样曾经浮躁过的PHPer程序猿,希望有帮助
- 对联
- 使用AsyncTaskLoader获取本地数据(图片)
- b001-删数问题
- Qt QScrollArea显示滚动条(添加自定义控件)
- 矩阵快速幂模板
- Head First Java读书笔记 (一)
- Android异步加载(二)
- apache 配置
- RANSAC算法详解