摘要: /*UITabBarController //实例化三个controller MyViewController1 *vc1 = [[MyViewController1 alloc]init]; MyViewController2 *vc2 = [[MyViewController2 alloc]init]; // MyViewController3 *vc3 = [[MyViewController3 alloc]init]; //实例化一个导航,导航管理vc2,vc3 两个页面 UINavigationController *nc ... 阅读全文
posted @ 2012-12-16 20:28 sshsxl 阅读(281) 评论(0) 推荐(0)
摘要: /**UISengmentedControl,段控件- (void)viewDidLoad{ UISegmentedControl *sc = [[UISegmentedControl alloc]initWithItems:[NSArray arrayWithObjects:@"1",@"2",@"3", nil]]; //对象数组,可以是图片[UIImage imageNamed:@""] [self.view addSubview:sc]; [sc release]; sc.frame = CGRectMak 阅读全文
posted @ 2012-12-12 23:16 sshsxl 阅读(215) 评论(0) 推荐(0)
摘要: #import "viewController.h"//新建一个OC类继承UIViewController@implementation viewController//实例化一个Controller,一个Controller代表一个页面,会实例化一个UIView//self.view 装载完成之后调用,即初始化完成之后就会调用-(id)init{ self = [super init]; self.view.backgroundColor = [UIColor redColor]; return self;}//self.view [0,0,320,460];-(void 阅读全文
posted @ 2012-12-11 22:29 sshsxl 阅读(415) 评论(0) 推荐(0)
摘要: UIView &&UIImageView UIView *view = [[UIView alloc]init ]; view.frame = CGRectMake(0.,20,150,150); view.backgroundColor = [UIColor redColor]; [self.window addSubview:view]; [view release]; //view 是相对于它父视图的位置 UIView *view2 = [[UIView alloc]initWithFrame:CGRectMake(0, 20, ... 阅读全文
posted @ 2012-12-05 22:40 sshsxl 阅读(304) 评论(0) 推荐(0)
摘要: //定义一个buttonUIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];/*UIButtonType typedef enum { UIButtonTypeCustom = 0, // no button type UIButtonTypeRoundedRect, // rounded rect, flat white button, like in address card UIButtonTypeDetailDisclosure, UIButtonTypeInf... 阅读全文
posted @ 2012-12-04 22:18 sshsxl 阅读(227) 评论(0) 推荐(0)
摘要: UILable //UILable,继承于UIView;初始化设置坐标,width,heightUILabel *lab = [[UILabel alloc]initWithFrame:CGRectMake(0, 20, 80, 80)];//CGRectMake();返回一个结构体, /* struct CGRect { CGPoint origin; CGSize size; }; struct CGPoint { CGFloat x; CGFloat y; }; struct CGSize { CGFloat width; ... 阅读全文
posted @ 2012-12-03 22:13 sshsxl 阅读(275) 评论(0) 推荐(0)
摘要: Unix系统命令Unix文件系统:所有文件都存放在根目录/下面,没有盘符的概念;核心Mach kernel 就在这里 驱动位置 /System/Library/Estensions 用户文件 /User/用户名【桌面文件 /User/用户名/Desktop】 非图形界面进入终端: 开机F8,-s启动,输入命令 mount –uw/在桌面上看到的硬盘都挂载在/Volumes下面【接上外接硬盘USBHD, ls /Volumes/USBHD/】获得权限:为防止误操作破坏系统,在用户状态下没有权限操作系统重要文件,需获得权限 sudo –s ----然后输入密码即可;查看命令:查看当前所在目录:p. 阅读全文
posted @ 2012-10-20 14:38 sshsxl 阅读(294) 评论(0) 推荐(0)