<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 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      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
    主站蜘蛛池模板: 国产高清免费观看| 免费一级毛suv好看的国产网站 | av电影在线免费看| 免费a级毛片无码av| 成人无码区免费A∨直播| 亚洲无人区码一二三码区别图片| 99久久免费精品视频| 亚洲AV无码日韩AV无码导航| 国产在线国偷精品免费看| 免费a级毛片无码av| 国产精成人品日日拍夜夜免费| 亚洲AV无码日韩AV无码导航| 四色在线精品免费观看| 国产成人亚洲午夜电影| 亚洲人成人网站在线观看| 皇色在线免费视频| 婷婷久久久亚洲欧洲日产国码AV| 性xxxx视频免费播放直播 | 亚洲成a人片在线观看天堂无码| 18禁无遮挡无码网站免费| 大桥未久亚洲无av码在线 | 国产亚洲精品国产| 中文字幕在线免费| 亚洲小说图区综合在线| 亚洲gv白嫩小受在线观看| 日本午夜免费福利视频| 国产精品无码永久免费888| 亚洲国产成人久久综合一区77 | 美女被免费视频网站| 亚洲七七久久精品中文国产| 在线看片v免费观看视频777| 久久亚洲国产最新网站| 日韩精品成人亚洲专区| 免费观看91视频| 亚洲综合国产成人丁香五月激情 | 亚洲一区二区影院| 色吊丝永久在线观看最新免费| 无码人妻一区二区三区免费视频| 亚洲第一AV网站| 夜夜爽免费888视频| 麻豆高清免费国产一区|