【代码笔记】浮动的云
2016-03-03 09:11
239 查看
一,效果图。
二,工程图。
三,代码。
RootViewController.h
RootViewController.m
二,工程图。
三,代码。
RootViewController.h
#import <UIKit/UIKit.h> @interface RootViewController : UIViewController @end
RootViewController.m
#import "RootViewController.h" //加入头文件 #import "BGMovingComponent.h" @interface RootViewController () @end @implementation RootViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. //初始化背景图 [self addView]; //初始化云 [self addCloudView]; } #pragma -mark -functions //初始化背景图 -(void)addView { self.title=@"浮动的云"; } //初始化云 -(void)addCloudView { BGMovingComponent *cloud = [[BGMovingComponent alloc] initWithFrame:CGRectMake(0, 0, 320, 60)]; [self.view addSubview:cloud]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. }
相关文章推荐
- Java关于排序的介绍2-归并排序
- Java正则表达式教程
- Change Default FTP Port For VSFTP
- 配置与使用 Git与Github
- 为什么Java要把字符串设计成不可变的
- golang time操作整理
- C#-Lambda
- Java 正则表达式入门
- java并发之(4):Semaphore信号量、CounDownLatch计数锁存器和CyclicBarrier循环栅栏
- 完美解决eclipse时创建新项目时出错问题
- C# 保护Excel文档
- 使用Eclipse进行远程调试
- 《基于MFC的OpenGL编程》Part 10 Blending, Antialiasing and Fog
- python中的__init__ 、__new__、__call__小结
- 简单总结Java IO中stream流的使用方法
- C#实现用户自定义控件中嵌入自己的图标
- Windows环境下编译lua
- C语言——结构体
- MATLAB一句总结
- 当在浏览器中输入google.com时发生了什么?