<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级毛片免费播放下载| 91麻豆国产免费观看| 成在线人免费无码高潮喷水| 国产精品久久久久久亚洲小说| 亚洲人成影院午夜网站| 久久久婷婷五月亚洲97号色| 国产亚洲精品资在线| mm1313亚洲精品无码又大又粗| 成人免费看片又大又黄| 黄页网站免费观看| 182tv免费视视频线路一二三 | 在线精品亚洲一区二区小说| 国产成人综合久久精品免费 | 国产亚洲精品成人久久网站| 亚洲人成网站色在线观看| 亚洲人成综合在线播放| 久久亚洲私人国产精品| 亚洲av成人无码久久精品| 国产av无码专区亚洲av桃花庵| 亚洲精品无码av天堂| 亚洲成av人片不卡无码久久| 免费人成在线观看播放国产 | 久久精品国产精品亚洲毛片| 久久噜噜噜久久亚洲va久| 久久精品亚洲综合一品| 亚洲国产成人久久精品影视| 香蕉视频在线观看亚洲| 亚洲AV第一页国产精品| 亚洲精品在线免费观看| 亚洲图片激情小说| wwwxxx亚洲| 久久水蜜桃亚洲AV无码精品| 老司机亚洲精品影院在线观看| 看成年女人免费午夜视频| 色一情一乱一伦一视频免费看|