<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
    主站蜘蛛池模板: 吃奶摸下高潮60分钟免费视频| 国产精品内射视频免费| 亚洲网站免费观看| 久久精品亚洲一区二区| 亚洲精品无码MV在线观看| 国产亚洲精品线观看动态图| 亚洲XX00视频| 亚洲AV无码一区二区三区国产 | 亚洲天然素人无码专区| 亚洲一区二区三区91| 亚洲美女在线观看播放| 亚洲精品网站在线观看你懂的| 亚洲最新视频在线观看| 亚洲高清日韩精品第一区| 亚洲色图.com| 亚洲国产av高清无码| 亚洲另类视频在线观看| 国产v亚洲v天堂a无| 亚洲人成网站18禁止| 亚洲中文无码永久免| 婷婷国产偷v国产偷v亚洲| 日本高清免费中文在线看| 亚欧乱色国产精品免费视频| 久久精品成人免费国产片小草| 成人电影在线免费观看| 99re免费视频| 免费看国产精品3a黄的视频| 日本久久久免费高清| 久久精品国产精品亚洲艾草网美妙| 国产国拍精品亚洲AV片| 久久精品视频亚洲| 亚洲国产精品网站久久| 亚洲乱亚洲乱妇无码| 日韩在线一区二区三区免费视频| 91精品全国免费观看青青| 午夜免费福利视频| 成年女人毛片免费播放人| 一区国严二区亚洲三区| 国产亚洲真人做受在线观看| 亚洲人色大成年网站在线观看| 亚洲AV无码XXX麻豆艾秋|