iOS版 hello,world版本2
//
// main.m
// Hello
//
// Created by lishujun on 14-8-28.
// Copyright (c) 2014年 lishujun. All rights reserved.
// #import <UIKit/UIKit.h> // 视图控制器对象
@interface HelloWorldViewController : UIViewController
@end @implementation HelloWorldViewController -(void) loadView
{
//创建视图对象
UIView *contentView = [[UIView alloc]initWithFrame:[[UIScreen mainScreen] applicationFrame]];
contentView.backgroundColor = [UIColor lightGrayColor];
self.view = contentView; //创建label对象
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(0.0, 0.0, 320.0, 30.0)];
label.text = @"Hello World";
label.center = contentView.center; // 垂直居中
label.textAlignment = UITextAlignmentCenter; // 水平居中
label.backgroundColor = [UIColor clearColor];
label.textColor = [UIColor redColor]; //在视图上添加label
[contentView addSubview:label];
} @end // 委托对象
@interface HelloWorldAppDelegate : NSObject <UIApplicationDelegate>
{
IBOutlet UIWindow *window;
} @property (nonatomic, retain) UIWindow *window;
@property (nonatomic, retain) HelloWorldViewController *viewController;
//window 必须声明为属性,声明为局部变量则无法绘制视图,显示为黑屏
//apple 官方文档把viewController也声明为属性了
@end @implementation HelloWorldAppDelegate @synthesize window;
@synthesize viewController; -(void) applicationDidFinishLaunching:(UIApplication *)application
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen]bounds]];
self.viewController = [[HelloWorldViewController alloc]init];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
} @end // 程序入口
int main(int argc, char * argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, @"HelloWorldAppDelegate");
}
}
iOS版 hello,world版本2的更多相关文章
- 高仿美团iOS版,版本5.7
高仿美团iOS版,版本:5.7 iOS技术交流群:112365317 github链接:https://github.com/lookingstars/meituan 假设你认为不错.欢迎star 哦 ...
- android版本vqmon移植IOS版
IOS交叉编译 1.android版本 vqmon已经正常运行,现需要开放IOS版本,作移植工作. 2. 注意事项: 1)ROOT权限,IOS必须越狱. 2)依赖库:pcap, ffmpeg,lib ...
- 微信聊天记录查看器(程序+源码) - iOS版
本文版权归cxun所有,如有转载请注明出处与本文链接,谢谢!原文地址:http://www.cnblogs.com/cxun/p/4338643.html Updates [2016.10.14]感谢 ...
- 视频直播SDK-ios版
IOS视频直播接入说明 一.名词解释 分辨率:用于计算机视频处理的图像,以水平和垂直方向上所能显示的像素数来表示分辨率.常见视频分辨率的有1080P即1920x1080,720P即1080x720,6 ...
- 腾讯微信被怼,iOS版微信不能打赏了
2017年4月19日,估计很多有着大量粉丝的微信自媒体作者会感到很不爽,因为他们的苹果粉丝再也无法很爽快地.肆意.任性地打赏他们了,按目前iphone手机的占有率,估计打赏率会掉一半以上. 据微信派微 ...
- 中小团队快速实现持续交付iOS版
时间来到8102年,但是很多中小团队还是缺少持续交付,打包发布还是处于原始手打阶段使得工程师们不能安安心心写点代码,明明今天还有很多bug需要修改,突然测试工程师跑过来说赶紧给我出一个包,这时候你不得 ...
- iOS版微信6.5.21发布 适配iPhone X
昨日,iOS版微信迎来v6.5.21正式版发布,本次升级主要适配iPhone X,在聊天中查找聊天内容时,可以查找交易消息.可以给聊天中的消息设置日期提醒.上一个正式版v6.5.16发布于9月13日, ...
- 微信iOS版更新:可批量管理不常联系的朋友
iOS版微信更新了v6.5.13版本,在新版本当中微信新增加了可批量管理不常联系的朋友功能,同时在群资料页可以查看最近收到的小程序,不过据网友爆料,腾讯在新的更新日志当中已经删除了“批量管理不常联系的 ...
- 微信团队原创分享:iOS版微信的内存监控系统技术实践
本文来自微信开发团队yangyang的技术分享. 一.前言 FOOM(Foreground Out Of Memory),是指App在前台因消耗内存过多引起系统强杀.对用户而言,表现跟crash一样. ...
- [App Store Connect帮助]一、 App Store Connect 使用入门(4)iOS 版 App Store Connect
通过 iOS 版 App Store Connect,您可以在移动设备上查看销售数据.App 元数据和顾客评论.您还可以检查 App 状态.发布您 App 的新版本并回应“Resolution Cen ...
随机推荐
- MySQL 使用while语句向数据表中批量插入数据
1.创建一张数据表 mysql> create table test_while ( -> id int primary key) charset = utf8; Query OK, ro ...
- (转)在javascript中关于submit和button提交表单区别
原文来自:http://www.jb51.net/article/42236.htm submit是button的一个特例,也是button的一种,它把提交这个动作自动集成了,submit和b ...
- LINUX 文件系统JBD ----深入理解Fsync
http://www.cnblogs.com/hustcat/p/3283955.html http://www.cnblogs.com/zengkefu/p/5639200.html http:// ...
- String类的基本用法与注意点,StringBuffer类的用法
package cn.hncu.day8; public class RegExpDemo { public static void main(String[] args) { String str ...
- 为什么java不支持多重继承?
什么是钻石问题?如下图所示,B和C继承于A,D继承B和C(多重继承),在D中调用A的方法时,无法判断是调用B中的实现还是C的实现,下图继承关系是个菱形,所以该问题又叫做菱形问题. 如果java要解决这 ...
- Install-User.ps1
Install-User.ps1 function Install-User { param( [Parameter()] [string]$ComputerName = $env:computern ...
- springmvc使用@ResponseBody返回json乱码解决方法
1.springmvc 3.2以上的版本解决乱码的方法: 第一步:在配置中加入: <mvc:annotation-driven> <mvc:message-converters re ...
- python sklearn.linear_model.LinearRegression.score
score(self, X, y, sample_weight=None) 作用:返回该次预测的系数R2 其中R2 =(1-u/v).u=((y_true - y_pred) ** 2).su ...
- (转)Spring MVC
资源下载: Spring_MVC_教程_快速入门_深入分析V1.1.pdf SpringMVC核心配置文件示例.rar 作者:赵磊 博客:http://elf8848.iteye.com 目录 一.前 ...
- CenOs安装中文输入法
http://jingyan.baidu.com/album/d8072ac4434666ec95cefda1.html?picindex=2 查看链接