摘要: 1、创建与基础设置 // 创建网格视图布局对象,可以设置滑动方向,cell 的间距等 UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init]; // 两个cell之间最小的行间距 flowL 阅读全文
posted @ 2018-08-08 22:28 CH520 阅读(258) 评论(0) 推荐(0)
摘要: 前言 UITabBarController: 分栏视图控制器,在创建时,需要一次性的将所有 viewController 或 navigationController 添加到 UITabBarController 的 viewControllers 属性中。 UITabBarController 一 阅读全文
posted @ 2018-08-08 22:26 CH520 阅读(219) 评论(0) 推荐(0)
摘要: 前言 大多数时候,iPhone、iPod 应用与 iPad 应用开发没有太大的区别,但是 iPad 的屏幕比 iPhone 大, 设计程序时可以充分利用 iPad 的大屏幕特点,例如 TabBar 和 Navigation 的使用会减少, 相应的会采用新的一种 ViewController 来代替, 阅读全文
posted @ 2018-08-08 22:20 CH520 阅读(1029) 评论(0) 推荐(0)
摘要: 1、创建与设置 // 1. 创建时不添加按钮 // 实例化 alertController 对象 UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"警告" message:@"真的要关 阅读全文
posted @ 2018-08-08 22:13 CH520 阅读(405) 评论(0) 推荐(0)
摘要: 1、UIPasteboard 简介 顾名思义,UIPasteboard 是剪切板功能。 我们在使用iOS的原生控件UITextField、UITextView、UIWebView,如果长按时,就会出现复制、剪切、选中、全选、粘贴等功能,这个就是利用了系统剪切板功能来实现的。 每一个 App 都可以去 阅读全文
posted @ 2018-08-08 21:38 CH520 阅读(312) 评论(0) 推荐(0)
摘要: 1、UIMenuController 简介 默认情况下,UITextFiled、UITextView、UIWebView 都有苹果自带的有 UIMenuController 功能。 UITextFiled 的弹出菜单效果系统自带的,如下图。 2、menuController 的创建 2.1 给 La 阅读全文
posted @ 2018-08-08 21:35 CH520 阅读(712) 评论(0) 推荐(0)
摘要: 1、tapGesture 点击手势 1.1 tapGesture 的创建 // 实例化点击手势对象 UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@sel 阅读全文
posted @ 2018-08-08 21:29 CH520 阅读(161) 评论(0) 推荐(0)
摘要: 创建与设置 // 长度为系统默认长度 UIProgressView *progressView = [[UIProgressView alloc] init]; // 将 progressView 添加到 View [self.view addSubview:progressView]; // 设置 阅读全文
posted @ 2018-08-08 21:15 CH520 阅读(149) 评论(0) 推荐(0)