如何获取UI日历? [英] How can I get the UI Calendar?

查看:176
本文介绍了如何获取UI日历?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能帮我解答这个问题吗?

Could you help me with this question, please?

我只需要在一个屏幕上放一个简单的日历,我不知道我如何获取它,因为这个UI元素不在IB。

I only need to put a simple Calendar in one of the screens, and I do not have any idea of how can I obtain it, because this UI element is not in the IB.

我的客户端想要的屏幕像下面的图像,没有UISegmentedControl

My client wants the screen like the image below, without the UISegmentedControl (with list, day, month) that has the Calendar app on iPhone.

他只想查看一个日历,当您点击某个日期时,会显示另一个视图(FYI:

He wants to see just a calendar, and when you click in one of the days, another view will appear (FYI: view with data loaded from a website corresponding for that day).

http://craigl21.typepad.com/.a/6a00e008db59db8834010535e2d304970c-800wi

所以,最后我的问题是:

So, finally my questions are:


  1. 如何获取日历?

  2. 我有今天导航栏工作的右侧栏按钮项视图已加载)。我想知道如何为日历中的日子添加一个类似的功能,我想他们都是按钮,我不知道如何访问它们(因为我不知道任何关于日历元素)。

  3. 默认情况下,当您加载此日历视图时,必须以蓝色选择今天的日期,并且当您按任意日期时,将加载另一个视图。如果最初选择今天的日期,当我加载日历视图时,具有今天的详细信息的新视图将立即加载? (如何避免此行为?)或希望日历会等待我点击今天的日期(或任何其他日期)?

推荐答案

NSCalendar类仅用于日期计算,苹果不提供标准日历元素作为其UIKit库的一部分。但是,看看这个github项目,有人发布了一个包含自定义日历UI的项目。

The NSCalendar classes are only used for date calculation and apple does not provide a standard calendar element as a part of their UIKit library. However, take a look on this github project, someone published a project that contains a custom made calender UI.

https://github.com/guicocoa/calendar

这是所有开放原始码,因此您可以根据需要调整设计和功能

It's all open source ofcourse, so you can adjust the design and functionality as you need

这篇关于如何获取UI日历?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆