<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Sealyu

    --- 博客已遷移至: http://www.sealyu.com/blog

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks

    Beautiful Table View Helper Class

    Beautiful Table View Demo Screenshot

    Beautiful Table View Demo Screenshot

    A while back, Matt Gallagher from Cocoa with Love wrote an excellent post on customizing UITableView drawing.

    In the article, Matt shows how you can style UITableViews quite easily by setting the backgroundView and selectedBackgroundView to UIImageViews containing custom background images for each cell. The only trick to it is to make sure that you choose the proper image based on whether you’re the top row, bottom row, middle row, or only row in the table.

    Anyway, I’ve found the techniques he mentions in the article pretty useful in a number of projects, so I wrote Beautiful Table View helper class so I could get the functionality easily whenever I want to include a table view controller. I thought I’d post the code here in case anyone else might find it useful: here’s a sample project.

    To “beautify” your table view controller, all you have to do is derive your view controller from BeautifulTableViewController like so:

    @interface FavoriteGamesTable : BeautifulTableViewController {
                // Your implementation
                }

    Then implement numberOfSectionsInTableView, numberOfRowsInSection, and cellForRowAtIndexPath like you normally would. The only other thing you have to do is insert the following line before you return from cellForRowAtIndexPath:

    [super beautifyCell:cell atIndexPath:indexPath];

    And make sure to call [super viewDidLoad] in your viewDidLoad method. And that’s it! So feel free to use the Beautiful Table View Helper (and even the art, drawn by my talented wife!) in your projects if you find it useful. And thanks again to Matt for letting me know about this method!

    posted on 2010-10-01 21:30 seal 閱讀(194) 評論(0)  編輯  收藏 所屬分類: iPhone
    主站蜘蛛池模板: 久久精品国产亚洲AV未满十八| 精品无码国产污污污免费网站国产| 日韩a在线观看免费观看| 一级毛片免费毛片毛片| 特级av毛片免费观看| 午夜a级成人免费毛片| 久久性生大片免费观看性| 亚洲人成毛片线播放| 一级女人18毛片免费| 亚欧乱色国产精品免费视频| 久久精品亚洲精品国产色婷| 国产免费人人看大香伊| 免费无码成人AV在线播放不卡| 亚洲av永久无码精品网址| 免费观看国产小粉嫩喷水| 99精品视频在线观看免费专区 | 亚洲AV无码一区二区乱子伦 | 成人免费视频77777| 一级毛片免费不卡| 亚洲AV无码国产精品色| 国产亚洲欧洲精品| 免费观看四虎精品国产永久| 精品免费久久久久久久| 女人隐私秘视频黄www免费| 亚洲日本va一区二区三区| 亚洲狠狠久久综合一区77777| 四虎影视在线永久免费观看| 91麻豆最新在线人成免费观看| 亚洲中文字幕无码中文字| 亚洲国产精品日韩| 无人在线观看完整免费版视频| 国产在线观看无码免费视频| 亚洲AV网一区二区三区| 国产成人精品日本亚洲网址| 亚洲成亚洲乱码一二三四区软件| 99久久人妻精品免费一区| 国产免费久久精品丫丫| 精品成人一区二区三区免费视频| 亚洲一区中文字幕在线电影网| 亚洲AV无码成人精品区蜜桃| 亚洲综合另类小说色区色噜噜|