随笔分类 -  iphone开发

摘要:在很多应用中,都有利用UIScrollView实现图片的无限滚动及自动滚动效果,下面我就跟大家分享下我是如何实现这种效果的。 1 // 2 // GXViewController.m 3 // 自动滚动及无线循环 4 // 5 // Created by 郭晓 on 14-3-7. 6 // Copyright (c) 2014年 郭晓. All rights reserved. 7 // 8 9 #import "GXViewController.h" 10 11 #define kCount 6 //图片总张数 12 13 static long ste... 阅读全文
posted @ 2014-03-07 18:33 郭晓 阅读(2766) 评论(2) 推荐(0)
摘要:iOS中有4个触摸事件、6个手势识别、响应者链条1、4个触摸事件- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; 2、. 阅读全文
posted @ 2014-03-05 23:46 郭晓 阅读(368) 评论(0) 推荐(0)
摘要:我们都知道在IOS7之前,Xcode中自带的UITabBarController控制器的tabbar样子很难看,可有时又想利用UITabBarController来快速切换界面,这样就牵扯到要自定义其中的tabbar。那么,如何才能自定义一个tabbar,拥有与QQ或者新浪微博那样好看的界面呢? 如上图中,我们的目标是自定义tabbar做成图中下方的样子,这样点击下方,以快速切换界面。 思路:1.定义一个GXViewController类继承自UITabBarController 2.将原先的tabbar隐藏,自定义一个控件覆盖在上面 3.在控件内增加可以点击的按钮,调整控件和按... 阅读全文
posted @ 2014-01-03 22:36 郭晓 阅读(5783) 评论(4) 推荐(4)