2015年7月24日

UIScrollView常用方法

摘要: //缩放- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{ //返回要缩放的视图 return self.rv.imV;}//- (void)scrollViewDidScroll:(UIScrollView *)sc... 阅读全文

posted @ 2015-07-24 10:44 yucaijiang 阅读(203) 评论(0) 推荐(0) 编辑

UIScrollView属性

摘要: UIImage *image=[UIImage imageNamed:@"1.png"]; //滚动视图 self.scrollV=[[UIScrollView alloc] init]; self.scrollV.frame=[UIScreen mainScreen].bounds; self.s... 阅读全文

posted @ 2015-07-24 10:43 yucaijiang 阅读(183) 评论(0) 推荐(0) 编辑

iOS 中UISlider常用知识点

摘要: self.slider=[[UISlider alloc]initWithFrame:CGRectMake(50, 100, 200, 50)];//self.slider.tintColor=[UIColor blueColor];//已经使用进度条颜色 //数值减小(球左边)颜色 self.... 阅读全文

posted @ 2015-07-24 10:41 yucaijiang 阅读(333) 评论(0) 推荐(0) 编辑

iOS中UISegmentedControl常用属性

摘要: NSArray *array=@[@"红",@"黄",@"蓝"]; //数组中有多少元素,分段控制就有多少条目(分段) self.seg=[[UISegmentedControl alloc] initWithItems:array]; //选中某一个 self.seg.selectedSegme... 阅读全文

posted @ 2015-07-24 10:39 yucaijiang 阅读(308) 评论(0) 推荐(0) 编辑

iOS触摸事件

摘要: {//开始触摸点 CGPoint _startPoint;}- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { // Initialization code //给testVIew加上颜... 阅读全文

posted @ 2015-07-24 10:21 yucaijiang 阅读(223) 评论(0) 推荐(0) 编辑

iOS appdelegate 中将自定义的视图作为启动视图

摘要: #import "RootViewController.h" RootViewController *rootVC=[[[RootViewController alloc] init] autorelease]; self.window.rootViewController=rootVC; 阅读全文

posted @ 2015-07-24 10:18 yucaijiang 阅读(503) 评论(0) 推荐(0) 编辑

iOS内存警告处理

摘要: - (void)didReceiveMemoryWarning//内存警告{ [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. NSLog(@"内存快爆了"); //判断是否加载过... 阅读全文

posted @ 2015-07-24 10:15 yucaijiang 阅读(202) 评论(0) 推荐(0) 编辑

iOS 自定义一个视图作为根视图

摘要: #import "myView.h"//使用这个myview来代替控制器自带的view@property(nonatomic,retain)myView *myview;- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *... 阅读全文

posted @ 2015-07-24 10:14 yucaijiang 阅读(526) 评论(0) 推荐(0) 编辑

程序启动流程

摘要: //将要开始编辑- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ NSLog(@"快要开始编辑了"); return YES;}- (void)applicationWillResignActive:(UIApplicatio... 阅读全文

posted @ 2015-07-24 10:10 yucaijiang 阅读(195) 评论(0) 推荐(0) 编辑

iOS 回收键盘

摘要: 先要遵循协议 设置代理 self.jiagetextfield.delegate=self; self.mingchengtextfield.delegate=self;//释放第一响应者-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent ... 阅读全文

posted @ 2015-07-24 10:08 yucaijiang 阅读(191) 评论(0) 推荐(0) 编辑

导航