Pocket Weather AU 使用了哪些布局组件?

发布于 2024-10-18 08:52:28 字数 543 浏览 0 评论 0原文

谁能评论一下 iPhone 应用程序“Pocket Weather AU”使用了哪些用于导航/布局等的 IOS 组件?它的设置方式看起来相当不错。我猜测:

导航控制器

  • 第一级 - 包含一个表格视图,底部有一个工具栏
  • 第二级 - 详细视图 - 可能完全是一个自定义页面
  • 然后关于主页顶部的“+”和“网格”按钮 - 希望这些只是可以放入标准导航控制器中的按钮,然后可以触发单独的视图

主屏幕

在此处输入图像描述

详细信息屏幕

在此处输入图像描述

PS.此外,当按下“+”符号时,它会转到:

在此处输入图像描述

Could anyone comment on what IOS components for navigation/layout etc were used for the iPhone application "Pocket Weather AU"? It looks quite good the way it's set out. I'm guessing:

Navigation Controller

  • 1st Level - Contains a table view, with a tool bar at bottom
  • 2nd Level - Detailed view - probably a custom page totally
  • Then regarding the "+" and "grid" button at top in main page - hopefully these are just buttons one can put into the standard Navigation Controller that can then trigger a separate view

Main Screen

enter image description here

Details Screen

enter image description here

PS. Also when the "+" symbol is pressed it goes to:

enter image description here

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

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

发布评论

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

评论(1

只是偏爱你 2024-10-25 08:52:28

看起来就像第一个屏幕上 UINavigationController 中高度定制的普通样式 UITableView。每个单元格都有一个透明的背景图像,整个表格视图都有一个背景图像。它看起来像字幕样式单元格。天气缩略图(太阳、云等)是作为子视图添加到单元格或可能是单元格附件的 UIImageVIew。高/低温只是作为子视图添加到单元格中的 UILabel。

顶部的按钮只是 UIBarButtonItems(添加和网格)。它们可以添加到 viewDidLoad 中,如下所示:

self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addAction:)] autorelease];

将 UIToolBar 添加为包含两个 UIBarButtonItems(编辑和刷新)的子视图。 UIToolBar 中还有一个 UILabel 子视图,可能还有一些用于布局的灵活空间。

第二个屏幕是自定义视图控制器。我会把类似的东西放在 .xib 中。

addAction 看起来像这样:

    FindLocationController *findLocationController = [[FindLocationController alloc] initWithStyle:UITableViewStylePlain];
findLocationController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
findLocationController.title = @"Find Location";

UINavigationController *findLocationNavController = [[UINavigationController alloc] initWithRootViewController:findLocationController];
[self.navigationController presentModalViewController:findLocationController animated:YES];

[findLocationController release];
[findLocationNavController release];

Just looks like a highly customized Plain Style UITableView in a UINavigationController on the first screen. Each cell has a transparent background image and the entire table view has a background image. It looks like Subtitle style cells. The weather thumbnail (sun, cloud, etc) is a UIImageVIew added as a subview to the cell or possibly the cell accessory. The high/low temperatures are just UILabels added as subviews to the cell.

The buttons on top are just UIBarButtonItems (Add and the Grid). They can be added in viewDidLoad, like so:

self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addAction:)] autorelease];

A UIToolBar is added as a subview containing two UIBarButtonItems (Edit and Refresh). There is also a UILabel subview in the UIToolBar and probably some Flexible Space for layout.

The second screen is a custom view controller. I would lay something like that in a .xib.

addAction would look something like this:

    FindLocationController *findLocationController = [[FindLocationController alloc] initWithStyle:UITableViewStylePlain];
findLocationController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
findLocationController.title = @"Find Location";

UINavigationController *findLocationNavController = [[UINavigationController alloc] initWithRootViewController:findLocationController];
[self.navigationController presentModalViewController:findLocationController animated:YES];

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