简体   繁体   English

Objective-C:自定义UI元素

[英]Objective-C: Custom UI elements

I am a noob just getting started with Obj-C and iPhone development. 我是一个刚开始使用Obj-C和iPhone开发的菜鸟。 I've been going through many examples and tutorials for the past 2 weeks and making good progress learning how to use the CoreLocation, CoreGraphics, MapKit, UI, etc. Very basic and straight-forward. 在过去的两周中,我一直在阅读许多示例和教程,并且在学习如何使用CoreLocation,CoreGraphics,MapKit,UI等方面取得了良好的进展。非常简单,直接。 There are many tutorials out there on these subjects. 关于这些主题有很多教程。
However, now with that functionality in the bag, I am starting on putting my our project together. 但是,现在有了这个功能,我就开始将我的项目放在一起。 Our UI designer has created custom views of many iPhone controls like the UIToolbar, UIActionsheet, etc. Like having custom images for backgrounds and buttons. 我们的UI设计器已经创建了许多iPhone控件的自定义视图,例如UIToolbar,UIActionsheet等。例如具有用于背景和按钮的自定义图像。 I cannot find any solid tutorials or advice on how to go about customizing things like the tab bar. 我找不到任何可靠的教程或关于如何自定义选项卡栏之类的建议。 For example, some say to create a Category overriding the drawRect method. 例如,有人说要创建覆盖drawRect方法的Category。 Others say to subclass the UIToolbar class, but this say this is not recommended and may get appStore rejected. 其他人则说要继承UIToolbar类,但这并不建议这样做,并且可能会拒绝appStore。 At this point I am confused and frustrated at which direction to start. 在这一点上,我对从哪个方向开始感到困惑和沮丧。 Can someone with experienced with UI customization and app store approval please give me some direction or point me to some good tutorials? 可以给具有UI定制和应用商店批准经验的人给我一些指导,或为我提供一些好的教程吗? Thank you. 谢谢。

I would suggest that you can customise what Apple allow you to easily do with the available APIs and follow Apple's advice to not override drawrect. 我建议您可以自定义Apple允许您轻松使用可用API进行的操作,并遵循Apple的建议不覆盖drawrect。 Oh and watch some of this years ADC videos. 哦,请看一些今年的ADC视频。

Of course the coming ios5 will greatly increase your uikit customisation possibilities for ios5 devices. 当然,即将面世的ios5将大大增加ios5设备的uikit自定义可能性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM