04 2015 档案

摘要:TCP是全双工的,安全的,不过效率低,内存消耗大UDP是半双工的,不安全,不过效率高,内存消耗小在工程中导入三方库AsyncSocketTCP是需要三次握手的 1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 _mArray = [... 阅读全文
posted @ 2015-04-07 18:53 Angelone 阅读(163) 评论(0) 推荐(0)
摘要:1.创建一个页码控制器(小圆点) UIPageControl *pc = [[UIPageControl alloc] initWithFrame:CGRectMake(,,,)];2.小圆点的个数 pc.numberOfPages = 3; pc.userInteractionEnabled = ... 阅读全文
posted @ 2015-04-02 20:39 Angelone 阅读(293) 评论(0) 推荐(0)
摘要:1.创建一个滚动视图(在内容的展示上,类似于浏览器) UIScrollView *sv = [[UIScrollView alloc] initWithFrame:CGRectMake(,,,)];2.设置可展示内容的size sv.contentSize = CGSizeMake(,);3.设置弹... 阅读全文
posted @ 2015-04-02 20:35 Angelone 阅读(110) 评论(0) 推荐(0)
摘要:1.创建一个转场动画 CATransition *animation = [CATransition animation];2.动画时间 animation.duration = 0.8;3.动画类型 animation.type = @"rippleEffect";/* fademoveIn pu... 阅读全文
posted @ 2015-04-02 20:06 Angelone 阅读(110) 评论(0) 推荐(0)
摘要:UITouch1.UITouch *touch = [touches anyObject];//找到触摸事件 if([touch.view isKindOfClass:[UIImageView class]]){ CGPoint point = [touch locationInView:self.... 阅读全文
posted @ 2015-04-02 19:52 Angelone 阅读(199) 评论(0) 推荐(0)
摘要:/* 分栏控制器基础流程 * 第一步:把需要展示的页面创建出来。 * 第二步:如果需要,就把页面封装到导航里 * 第三步:设置每个页面/导航对应的专用按钮(tabBar上的) * 第四步:把这些页面/导航放到数组里,并和tabBarController关联 */ 1 /*******分栏控制器的专用... 阅读全文
posted @ 2015-04-02 15:07 Angelone 阅读(309) 评论(0) 推荐(0)
摘要:UISlider1.初始化 UISlider *slider = [UISlider alloc] initWithFrame:CGRectMake(,,,)];2.点击事件 slider addTarget:self action:@selector(click:) forControlEvent... 阅读全文
posted @ 2015-04-02 15:01 Angelone 阅读(243) 评论(0) 推荐(0)
摘要:UINavigation的相关操作:①创建导航 FirstViewController *fvc = [[FirstViewController alloc] init]; //创建一个页面 UINavigationController *nc = [[UINavigationController... 阅读全文
posted @ 2015-04-02 11:22 Angelone 阅读(275) 评论(0) 推荐(0)
摘要:UITextField的相关操作: 1 UITextField *tf = [[UITextField alloc] initWithFrame:CGRectMake(20, 60, 280, 70)]; 2 //文本输入框,一般用作用户输入账号,密码,个人信息等 3 4 ... 阅读全文
posted @ 2015-04-01 20:48 Angelone 阅读(196) 评论(0) 推荐(0)
摘要:UIView UIImageView的相关操作:1.初始化 UIView *view = [[UIView alloc] initWithFrame:CGRectMake(,,,)];2.查询某个view所有的子view,返回结果是数组 NSArray *subViews = [bigView su... 阅读全文
posted @ 2015-04-01 20:44 Angelone 阅读(141) 评论(0) 推荐(0)
摘要:一个小小的随机数工具。。。。。。。 1 self.view.backgroundColor = [UIColor yellowColor]; 2 3 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(40, 40... 阅读全文
posted @ 2015-04-01 19:06 Angelone 阅读(154) 评论(0) 推荐(0)
摘要:UIButton的相关操作: 在实际的工作中,至少需要一个视图控制器(页面),不会直接往window上写UI,所有的UI都是写在视图控制器里的1.页面间的关联(写在AppDelegate中) HomeViewController *hvc = [[HomeViewController alloc] ... 阅读全文
posted @ 2015-04-01 18:54 Angelone 阅读(191) 评论(0) 推荐(0)
摘要:UILabel的相关操作:①初始化:UILabel是UIView的子类,拥有UIVi所有办法 UILable *label = [[UILabel alloc] initWithFrame:CGRectMake(,,,);②背景颜色 label.backgroundColor = [UIColor ... 阅读全文
posted @ 2015-04-01 17:11 Angelone 阅读(147) 评论(0) 推荐(0)
摘要:一个小的浏览器。。。。。。。。。有后退,前进,刷新,停止,转到,本地,调js1 _webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 40, self.view.frame.size.width, self.view.frame.siz... 阅读全文
posted @ 2015-04-01 16:04 Angelone 阅读(128) 评论(0) 推荐(0)