MGConferenceDatePicker

https://github.com/matteogobbi/MGConferenceDatePicker

MGConferenceDatePicker is an object wich extend a UIView furnishing a very nice type of data picker.

MGConferenceDatePicker是一个对象,扩展了UIView并展示出一个样式华丽的时间选择器.

Info

This code must be used under ARC. If your code doesn't use ARC you can mark this source with the compiler flag -fobjc-arc

这份代码是在ARC下使用的.如果你的项目不支持ARC,你可以加一个编译标签-fobjc-arc

Example Usage

In the package is included the project to test the object. This is an easy example to init the control from code:

zip包中已经包含了使用样例,使用起来是非常简单的:

    //New view controller
UIViewController *pickerViewController = [[UIViewController alloc] init]; //Init the datePicker view and set self as delegate
MGConferenceDatePicker *datePicker = [[MGConferenceDatePicker alloc] initWithFrame:self.view.bounds];
[datePicker setDelegate:self]; //OPTIONAL: Choose the background color
[datePicker setBackgroundColor:[UIColor whiteColor]]; //Set the data picker as view of the new view controller
[pickerViewController setView:datePicker]; //Present the view controller
[self presentViewController:pickerViewController animated:YES completion:nil];

Or you are also able to set the view directly in the NIB or in the XIB file and simply just set the delegate from code.

See the example's project.

或者,你也可以将这个view直接设置到NIB或者XIB文件中,在代码中设置代理即可.

附录:

-以下是封装的一些细节-

一个文件中封装了3个类:

界面上的选择由4个scrollView组成:

总结:

这个MGConferenceDatePicker极具学习价值:)

[翻译] MGConferenceDatePicker的更多相关文章

  1. 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...

  2. 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...

  3. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  4. 【探索】机器指令翻译成 JavaScript

    前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...

  5. 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...

  6. 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...

  7. 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...

  8. 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?

    0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...

  9. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点

    在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...

随机推荐

  1. php-redis 模块 文档

    直接从这位朋友转载过来. 地址 Redis::__construct构造函数$redis = new Redis(); connect, open 链接redis服务参数host: string,服务 ...

  2. Android多媒体技术之音频播放

    1.Android中音频播放的方式和区别. MediaPlayer:主要用于播放音频,可以播放视频,但是一般不用其进行视频播放. SoundPool:主要用于播放一些短促的声音片段,主要优势是cpu资 ...

  3. JavaScript数据结构-12.散列碰撞(线性探测法)

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  4. CountDownLatch 使用(模拟一场比赛)

    java.util.concurrency中的CountDownLatch,主要用于等待一个或多个其他线程完成任务.CountDownLatch在初始化时,会被赋一个整数,每次执行countDown( ...

  5. 转载:BIO | NIO | AIO

    http://my.oschina.net/bluesky0leon/blog/132361 也谈BIO | NIO | AIO (Java版)   转载自:zheng-lee博客 发布时间: 201 ...

  6. checkebox 全选 ,子复选框单个全部选择后,全选框也会被选择

    <script> //点击全选,子复选框被选中 function demo(){ var allcheck=document.getElementById("allcheck&q ...

  7. JS实现二叉树的创建和遍历

    1.先说二叉树的遍历,遍历方式: 前序遍历:先遍历根结点,然后左子树,再右子树 中序遍历:先遍历左子树,然后根结点,再右子树 后续遍历:先遍历左子树,然后右子树,再根结点   上代码:主要还是利用递归 ...

  8. 三、hive JavaAPI示例

    在上文中https://www.cnblogs.com/lay2017/p/9973370.html 我们通过hive shell去操作hive,本文我们以Java代码的示例去对hive执行加载数据和 ...

  9. Mybatis之简单注解

    Mybatis使用注解实现主键自增长: oracle: @SelectKey(statement="select my_seq.nextval from dual",resultT ...

  10. 【SSH网上商城项目实战26】完成订单支付后的短信发送功能

     转自: https://blog.csdn.net/eson_15/article/details/51475431 上一节我们使用了Java mail完成了给买家发送邮件的功能,还遗留一个功能,就 ...