摘要: TCP是全双工的,安全的,不过效率低,内存消耗大UDP是半双工的,不安全,不过效率高,内存消耗小在工程中导入三方库AsyncSocketTCP是需要三次握手的 1 - (void)viewDidLoad 2 { 3 [super viewDidLoad]; 4 _mArray = [... 阅读全文
posted @ 2015-04-07 18:53 Angelone 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1.创建一个页码控制器(小圆点) UIPageControl *pc = [[UIPageControl alloc] initWithFrame:CGRectMake(,,,)];2.小圆点的个数 pc.numberOfPages = 3; pc.userInteractionEnabled = ... 阅读全文
posted @ 2015-04-02 20:39 Angelone 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 1.创建一个滚动视图(在内容的展示上,类似于浏览器) UIScrollView *sv = [[UIScrollView alloc] initWithFrame:CGRectMake(,,,)];2.设置可展示内容的size sv.contentSize = CGSizeMake(,);3.设置弹... 阅读全文
posted @ 2015-04-02 20:35 Angelone 阅读(100) 评论(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 阅读(103) 评论(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 阅读(190) 评论(0) 推荐(0) 编辑
摘要: /* 分栏控制器基础流程 * 第一步:把需要展示的页面创建出来。 * 第二步:如果需要,就把页面封装到导航里 * 第三步:设置每个页面/导航对应的专用按钮(tabBar上的) * 第四步:把这些页面/导航放到数组里,并和tabBarController关联 */ 1 /*******分栏控制器的专用... 阅读全文
posted @ 2015-04-02 15:07 Angelone 阅读(289) 评论(0) 推荐(0) 编辑
摘要: UISlider1.初始化 UISlider *slider = [UISlider alloc] initWithFrame:CGRectMake(,,,)];2.点击事件 slider addTarget:self action:@selector(click:) forControlEvent... 阅读全文
posted @ 2015-04-02 15:01 Angelone 阅读(230) 评论(0) 推荐(0) 编辑
摘要: UINavigation的相关操作:①创建导航 FirstViewController *fvc = [[FirstViewController alloc] init]; //创建一个页面 UINavigationController *nc = [[UINavigationController... 阅读全文
posted @ 2015-04-02 11:22 Angelone 阅读(267) 评论(0) 推荐(0) 编辑
摘要: UITextField的相关操作: 1 UITextField *tf = [[UITextField alloc] initWithFrame:CGRectMake(20, 60, 280, 70)]; 2 //文本输入框,一般用作用户输入账号,密码,个人信息等 3 4 ... 阅读全文
posted @ 2015-04-01 20:48 Angelone 阅读(190) 评论(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 阅读(134) 评论(0) 推荐(0) 编辑