开发者

Customize UI with UIWebView vs Subclassing

I need to create a custom button, custom label, custom tableview, and custom datepicker, but it seems harder to subclass the button/label/table/datepicker than to create a HTML string inside a UIWebView and customize it th开发者_StackOverflow中文版ere... My application would be full Objective-c except these 4 controls.

What does Apple say about customizing a control using UIWebview. Is it frowned upon? What are pro & cons for these 2 approaches?

Should I take a quick HTML, but it feels like I'm cheating, or take a long process to subclass these controls? More importantly, will Apple approve my apps with controls that's using UIWebView?

Thanks.


I'm sure Apple would approve an app with HTML controls, but I'd strongly advise you do it right and subclass the controls you wish to customise (or create your own from scratch). In my experience, native controls are leaps and bounds above what you can achieve with HTML and CSS, and it'll be worth it in the long run.

Besides, UILabels, UIButtons, and UITableViews are actually quite easy to customise; you may have some difficulty with the UIDatePicker but it's still possible to make it your own.


Ok, just in case somebody is having the same problem as me, I finally found another easy way to "customize" the view without going into so much trouble subclassing it.. It's : Use an image to be used as the view background. Then you can place the controls in the placeholder in the image. And set the controls as transparent...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜