详解iPhone开发备忘实现实例是本文要介绍的内容,主要是实现一个备忘的小实例,不多说,我们来看内容。
1、添加sqlite框架的路径如下:
- /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/libsqlite3.dylib
2、iPhone开发不使用xib文件的方法:
修改main.m里的UIApplicationMain参数为
Java代码
- UIApplicationMain(argc, argv, nil, @"AppDelegate");
- // AppDelegate为你的ApplicationDelegate
- AppDelegate:
- UIWindow *localWindow = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
- localWindow.backgroundColor = [UIColor whiteColor];
- self.window = localWindow;
- [localWindow release];
- navigationController = [[UINavigationController alloc] initWithRootViewController:[[HomeViewController alloc] init]];
- [window addSubview:[navigationController view]];
- [window makeKeyAndVisible];
- UIApplicationMain(argc, argv, nil, @"AppDelegate");
- // AppDelegate为你的ApplicationDelegate
- AppDelegate:
- UIWindow *localWindow = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
- localWindow.backgroundColor = [UIColor whiteColor];
- self.window = localWindow;
- [localWindow release];
- navigationController = [[UINavigationController alloc] initWithRootViewController:[[HomeViewController alloc] init]];
- [window addSubview:[navigationController view]];
- [window makeKeyAndVisible];
3、SQLITE建表语句
Java代码
- CREATE TABLE accountbook(id integer primary key autoincrement,
- price number,
- costtime date,
- categorycode varchar(2),
- categoryname varchar(20),
- year varchar(4),
- month varchar(2),
- day varchar(2));
- CREATE TABLE accountbook(id integer primary key autoincrement,
- price number,
- costtime date,
- categorycode varchar(2),
- categoryname varchar(20),
- year varchar(4),
- month varchar(2),
- day varchar(2));
4、linux/MAC下强制结束进程
ps -ef //查看进程号
kill -9 进程号 //强制结束
5、iphone程序设置启动横屏
只要在Info.plist里面加UIInterfaceOrientation
给个 UIInterfaceOrientationLandscapeRight 就可以了
6、彩色UIProgressView
小结:详解iPhone开发备忘实现实例的内容介绍完了,希望本文对你有所帮助!