<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 閱讀(201) 評論(0)  編輯  收藏 所屬分類: iPhone
    主站蜘蛛池模板: 久久久久免费精品国产| 亚洲乱亚洲乱妇24p| 真实乱视频国产免费观看| 蜜桃AV无码免费看永久| 丝袜足液精子免费视频| 一级中文字幕乱码免费| 国产精品亚洲专区一区| 亚洲免费网站观看视频| 中文在线免费不卡视频| 99re6在线精品免费观看| 在线观看特色大片免费网站| 国产精品综合专区中文字幕免费播放| 午夜在线a亚洲v天堂网2019| 亚洲人成网站18禁止久久影院| 亚洲一区二区三区四区视频| 亚洲一区二区三区高清视频| 亚洲三级视频在线| 亚洲精品无码人妻无码| 特级毛片全部免费播放| 久久国产精品免费一区| 日韩成人免费视频| 最近2019中文免费字幕| 免费国产在线观看| 精品日韩亚洲AV无码一区二区三区 | 久久美女网站免费| 无码人妻一区二区三区免费手机 | 国产精品亚洲аv无码播放| 亚洲欧洲国产成人精品| 亚洲av综合av一区二区三区| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 麻花传媒剧在线mv免费观看| 全免费a级毛片免费看不卡| 亚洲美女高清一区二区三区| 少妇中文字幕乱码亚洲影视| 亚洲色少妇熟女11p| 免费日本一区二区| 亚洲国产一级在线观看| 亚洲色偷偷综合亚洲AV伊人蜜桃| 中文字幕免费人成乱码中国| 真实乱视频国产免费观看| 亚洲国产精品人久久电影 |