iPhone - 通话屏幕中间的控件是什么?
作为一个让自己习惯更多 iPhone 元素的小项目,我决定在通话屏幕中创建一个示例,在本机 iPhone 通话屏幕(IOS 4)上对其进行建模,
但是我很难弄清楚本机中的哪些元素呼叫屏幕用于构成显示的视图。
我想知道是否有更多 iPhone 经验的人可以帮助我解释一下各种元素是什么?
底部是一个稍微透明的 UIActionSheet 并在其上放置了一个 UIBUtton 吗?或者它是一个稍微透明的图像视图,按钮覆盖在上面?
同样,在顶部,它看起来像是一个图像,其中包含被叫/呼叫者的姓名或号码以及下面的通话持续时间,我的想法是否正确?
我真正感兴趣的部分是图标被保存在屏幕中央的某种对话框中,当选择它时,它会动画地摆动到键盘上,这是我使用的某种 iPhone 控件吗?可以使用或者定制吗?
编辑:
到目前为止,我已经尝试了两件事来实现这一目标:
1)我已经在视图中创建了一个视图,我正在尝试翻转它,但是我似乎只能让主视图正确翻转,而不是其中的视图,这是我想要的视图,但它似乎没有是一个好的方法。
2)我试图考虑使用实用程序应用程序方法,但这似乎是为了翻转全屏,而不仅仅是屏幕(视图)中的一部分
有人知道下一步要尝试什么吗?或者上述方法之一是否是理想的方法并且应该进一步研究?
As a small project to get myself used to some more iPhone elements I've decided to create a sample in call screen, modeling it on the native iPhone call screen (IOS 4)
However I'm struggling to make out what elements the native in call screen uses to make up the view that is displayed.
I was wondering if someone with more experience on iPhone could help me out by explaining what the various elements are?
Is the bottom part a UIActionSheet that is slightly transparent and with a UIBUtton placed over it? Or is it a slightly transparent imageview with the button over-layed?
Similarly at the top, it looks like its an imageiew with the name or number of the callee/caller and the call duration underneath, would I be correct in thinking that?
The part I'm really interested in is the bit where the icons are held in some sort of dialog in the centre of the screen that is animated to swing around to a keypad when it is selected, is this some sort of iPhone control that I can use or customise?
EDIT:
I've tried two things to try to achieve this so far:
1) I've created a view within a view and I am trying to flip this however I can only seem to get the main view to flip properly and not the view inside it which is the one I want and it doesn't seem to be a good approach.
2) I've tried to look at using the Utility application approach to it but again this seems to be for flipping the full screen and not just a section within a screen (view)
Has anybody got any pointers on what to try next? Or if one of the above methods is the ideal way to do it and should be investigated further?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在基本层面上,我会说 6 个按钮的面板只是一个视图,其中 6 个按钮作为子视图放置在其中。
圆角和边框描边可以通过访问视图的图层属性和图层的cornerRadius、borderWidth和borderColor属性来实现,例如,
这需要在代码中包含
CoreGraphics
框架和适当的头文件。我注意到边框笔划中有一个渐变(或者看起来是一个渐变)。我不知道如何在不做一些更复杂和更聪明的事情的情况下实现这一点(例如包含视图,它在垂直和水平方向上比包含按钮的视图稍大,并且填充了渐变颜色。结果将是渐变边框,但这似乎不是最好的方法...
翻转实际上非常简单,您可以使用以下内容创建 UIView 动画:
这有帮助吗?或者至少可以帮助您入门?
At a basic level, I would say that the panel of 6 buttons is simply a view with 6 buttons laid out in it as subviews.
The rounded corners and border stroke can be achieved by accessing the view's layer property and the layer's properties for cornerRadius, borderWidth, and borderColor, e.g.
This requires including the
CoreGraphics
Framework, and the appropriate header files in your code.I notice there's a gradient (or it appears to be a gradient) in the border stroke. I am not sure how to achieve that without doing something more involved and clever (such as a containing view that is just slightly larger veritically and horizontally than the view containing the buttons and is filled with a gradient color. The result would be a gradient border, but this doesn't seem like the best way to do that...
The flip is actually pretty easy. You can create a UIView animation with something like this:
Does this help, or at least get you started?