background image

image.size.height);

[self.viewaddSubview:imageView];     [self  performSelectorInBackground:@selector(detect:) 

withObject:nil];}detect 为自己定义的方法,编辑选取照片后要实现的效果取消选择:

 -(void)imagePickerControllerDIdCancel:(UIImagePickerController*)picker

 {   [picker dismissModalViewControllerAnimated:YES];} 

6.跳

ViewnextWebView 

[[WEBViewController 

alloc] 

initWithNibName:@"WEBViewController" 

bundle:nil];[self 

presentModalViewController:nextWebView animated:YES]; 

 

7.创建一个 UIBarButton 右边按钮 UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] 

initWithTitle:@"

style:UIBarButtonItemStyleDone 

target:self 

action:@selector(clickRightButton)];[self.navigationItem setRightBarButtonItem:rightButton];  

8.设置 navigationBar 隐藏 self.navigationController.navigationBarHidden = YES;// 

9.UIlabel 多 行 文 字 自 动 换 行   ( 自 动 折 行 ) UIView  *footerView  =  [[UIView 

alloc]initWithFrame:CGRectMake(10,  100,  300,  180)];UILabel  *label  =  [[UILabel 

alloc]initWithFrame:CGRectMake(10, 100, 300, 150)];label.text = @"Hello world! Hello world!

Hello  world!  Hello  world!  Hello  world!  Hello  world!  Hello  world!  Hello  world!Hello  world! 

Hello  world!  Hello  world!  Hello  world!  Hello  world!  Helloworld!";// 背 景 颜 色 为 红 色

label.backgroundColor = [UIColor redColor];//设置字体颜色为白色 label.textColor = [UIColor 

whiteColor];// 文 字 居 中 显 示 label.textAlignment  =  UITextAlignmentCenter;// 自 动 折 行 设 置

label.lineBreakMode  =  UILineBreakModeWordWrap;label.numberOfLines  =  0;   10. 代 码 生 成

ButtonCGRect  frame  =  CGRectMake(0,  400,  72.0,  37.0);UIButton  *button  =  [UIButton 

buttonWithType:UIButtonTypeRoundedRect];button.frame = frame;[button setTitle:@"新添加的

forState: 

UIControlStateNormal];button.backgroundColor 

[UIColor 

clearColor];button.tag 

2000;[button 

addTarget:self 

action:@selector(buttonClicked:) 

forControlEvents:UIControlEventTouchUpInside];[self.view addSubview:button];  

11.让某个控件在 View 的中心位置显示:(某个控件,比如 label,View)label.center = 

self.view.center; 

12.自

text

cell.backgroundColor 

[UIColorscrollViewTexturedBackgroundColor];

                   找软件资料,就到一览软件文库

http://wk.yl1001.com/rj/