文件名称:ios版本的helloworld
文件大小:58KB
文件格式:RAR
更新时间:2015-06-22 04:49:36
xcode ios Absinthe lion Cydia http://blog.csdn.net/xiaoxiao108/article/details/7463037 最近下载了个xcode_4.3.1_for_lion.dmg ,安装 xcode 时老是提示安装失败,后来网上查了下,把mac日期修改成2012.1.1,才能安装成功。第一次写ios程序啊,程序相当简单,就一个helloworld 点击按钮触发alert事件 开发环境 mac 10.7.3 xocde4.3.1 ios5.1.x 开发步骤 1. 下载安装 xcode_4.3.1_for_lion.dmg 2.运行xcode 3.新建一个Single View Application 4.创建完成后双击文件中的MainStoryboard_iPad.storyboard文件打开设计界面 5.拖个Round Rect Button控件到界面里面 6.修改ViewController.h头文件 加入代码 @interface ViewController : UIViewController { IBOutlet UIButton * btn; } -(IBAction)btnPressed:(id)sender; 7.修改ViewController.m文件 加入代码 -(void)btnPressed:(id)sender { NSLog(@"33333333"); UIAlertView *alert =[[UIAlertView alloc] initWithTitle:@"hello" message:@"zhu" delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil]; [alert show]; } 8.右键单击View中添加的按钮分别添加Touch Up Inside 跟 btnPressed, Referencing Outlets跟btn的 关联 9.虚拟机运行效果 10.真机调试时如果有如下提示,需要进行xcode破解 12. 在的越狱的板子上运行效果 备注: 一.ios5.1.1越狱步骤 1.下载Absinthe 2.0 点击Jailbreak ,最后提示Done,enjoy!越狱完成 2.在Cydia中下载appsync for ios 5.0+ 二.xcode4.3.1真机调试步骤 1.创建证书 实用工具-钥匙串访问-证书助手-创建证书 名称填写:iPhone Developer 选中让我覆盖这些默认值 后面填好电子邮箱地址 选中代码签名 其他的默认就可以了 2.修改/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk目录下的 SDKSettings.plist文件 中
【文件预览】:
生成的ipad版本的ipa文件
----test 1.0.ipa(13KB)
test
----testTests()
--------testTests-Info.plist(683B)
--------testTests.m(429B)
--------testTests.h(222B)
--------en.lproj()
----test()
--------main.m(337B)
--------test-Prefix.pch(311B)
--------AppDelegate.h(278B)
--------AppDelegate.m(2KB)
--------.DS_Store(6KB)
--------ViewController.h(282B)
--------ViewController.m(1KB)
--------en.lproj()
--------test-Info.plist(2KB)
----.git()
--------index(1KB)
--------hooks()
--------config(111B)
--------description(73B)
--------refs()
--------branches()
--------logs()
--------objects()
--------info()
--------COMMIT_EDITMSG(15B)
--------HEAD(23B)
----.DS_Store(6KB)
----test.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(20KB)
--------xcuserdata()