关于iPhone:如何更改Corona SDK for Retina Graphics中的tableView库

How do I change the tableView library in Corona SDK for Retina Graphics

我正在检查Corona SDK,并希望改编Coffee Demo(http://blog.anscamobile.com/2010/09/create-scrolling-list-views-with-text-and-graphics-in-coronasdk -ios-android-tutorial /),使其使用此处描述的Retina Display @ 2x图像配置:http://blog.anscamobile.com/2011/01/dynamic-image-resolution-made-easy/

我需要怎么做才能将Retina 4内容集成到tableView库中,从而使Coffee Demo自动Retina 4图像兼容?


这实际上是在Corona中可用的"界面小部件",它可以产生与视网膜显示器兼容的tableView:

http://developer.anscamobile.com/reference/index/widgetnewtableview

还有更多Corona SDK用户界面小部件在这里:
http://developer.anscamobile.com/content/widget


答案在您提供的第二个链接上...我引用:

As noted above, dynamic image resolution works in conjunction with dynamic content scaling (documented in the"Configuring Projects" section of the documentation). For further reference, the dynamic image resolution docs arehere.

To use this feature, you basically need to do two things:

  • Use display.newImageRect() rather than display.newImage() when loading your images
  • Specify one or more scaling thresholds in your project’s config.lua file
    The syntax is as follows:
  • display.newImageRect( [parentGroup,] filename [, baseDirectory] imageWidth, imageHeight )

    • imageWidth is the base image’s width in the base dimensions of the content.

    • imageHeight is the base image’s height in the base dimensions of the content.

    • parentGroup and baseDirectory are optional, and can be omitted; they behave in the same way as their counterparts in display.newImage().