iPhone:像新联系人一样表单

发布于 2024-09-06 04:12:35 字数 312 浏览 2 评论 0原文

我对 Apple iPhone 联系人应用程序有一些疑问。我想使用相同的方法来创建和修改信息。

这是两张图片:

替代文本http://grab.by/4ZjQ alt text http://grab.by/4ZjR

这样我们就有了创作和版本。该表单看起来像一个带有 groupedStyle 的 UITableView,但我不知道如何重新创建所有这些。您有一个想法或教程可以解释如何做到这一点吗?

多谢 !

I have some questions about the Apple iPhone Contact App. I want to use the same methode to create and modify information.

Here's two pics :

alt text http://grab.by/4ZjQ
alt text http://grab.by/4ZjR

So we have the creation and the edition. The form looks like an UITableView with a groupedStyle but I don't know how to re-creat all of this. Have you got an idea or a tutorial that might explain how to do it ?

Thanks a lot !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

迷爱 2024-09-13 04:12:35

最上面的是一个UIView,有一个UIImageView和一个UITableView,这个视图被设置为整个UITableView的标题。

至于编辑,您需要将 UILabel 替换为具有相同框架和字体大小的 UITextField。将内容从一种视图移动到另一种视图。

the top bit is a UIView with a UIImageView and a UITableView, this view is set as the header of the overall UITableView.

As for the editing, you need to swap out the UILabel, with a UITextField, which has the same frame, and font-size. move the content from one view to another.

清风无影 2024-09-13 04:12:35

创建一个 UIView ,它是一条线,然后将其作为子视图添加到单元格中

//in cellForRowAtIndexPath
UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(80,0,1,44)];
lineView.backgroundColor = [UIColor lightGreyColor];
[cell addSubview:lineView];

Create a UIView that is a line, then add it as a subview to the cell

//in cellForRowAtIndexPath
UIView *lineView = [[UIView alloc]initWithFrame:CGRectMake(80,0,1,44)];
lineView.backgroundColor = [UIColor lightGreyColor];
[cell addSubview:lineView];
幸福丶如此 2024-09-13 04:12:35

自定义 UITableview 绝对是最佳选择。为了让自己变得更简单,您可能需要查看 Sensible Tableview,它使所有这些都更容易实现:
http:// thenextweb.com/dd/2011/04/12/an-ios-developers-dream-sensible-tableview/?awesm=tnw.to_17mDs

Customizing the UITableview is definitely the way to go. To make it a little simpler on yourself, you may want to check out the Sensible Tableview, which makes all of this much easier to implement:
http://thenextweb.com/dd/2011/04/12/an-ios-developers-dream-sensible-tableview/?awesm=tnw.to_17mDs

黯然#的苍凉 2024-09-13 04:12:35

我正在尝试开发类似的东西并想象它。
在我看来,如果你仔细观察,屏幕似乎是由一个垂直的 UIScrollView 组成的。该组件将包含一个具有多个部分的 UITableView,甚至可能是多个 UITableView 组件。当将文本字段聚焦在单元格上时,UIScrollview 会滚动内容以将所选文本字段放置在更合适/平衡的 .y 位置,以供查看和编辑。

I'm trying to develop something like this and imagining it.
In my opinion, if you look closely, the screen seems to be composed of a vertical UIScrollView. This component will hold a UITableView with multiple sections or maybe even several UITableView components. When focusing textfields on cells, the UIScrollview scrolls the content to place the selected textfield in a more suitable/balanced .y position, for viewing and editing.

失与倦" 2024-09-13 04:12:35

可以通过自定义表视图来完成。使用基于表视图部分的自定义单元格。

It can be accomplished by customizing table views. Use the custom cells based on the section for the table view.

愿与i 2024-09-13 04:12:35

无需创建自己的表视图。地址簿框架创建了所有这一切,甚至还将联系人添加到 iPhone 的地址簿中。

No need to create your own table view. The address book framework creates absolutely all of this and will even add contacts to the iPhone's address book too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文