<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 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      618 隨筆 :: 87 文章 :: 225 評(píng)論 :: 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) 評(píng)論(0)  編輯  收藏 所屬分類: iPhone
    主站蜘蛛池模板: 永久在线毛片免费观看| 自拍偷自拍亚洲精品被多人伦好爽| 亚洲欧美不卡高清在线| 国产乱色精品成人免费视频 | 久久久久久a亚洲欧洲AV| 精品久久久久成人码免费动漫| 欧美色欧美亚洲另类二区| 亚洲精品你懂的在线观看 | 在线观看日本免费a∨视频| 色吊丝免费观看网站| 亚洲电影一区二区| 精品国产麻豆免费网站| 黄色网址在线免费| 亚洲七久久之综合七久久| 亚洲中久无码永久在线观看同| 国产国产人免费视频成69堂| 黄色免费网站在线看| 亚洲经典在线中文字幕| 亚洲乱码中文字幕综合234| 国产成人免费网站| 99久久免费国产特黄| 亚洲乱码国产乱码精华| 亚洲国产成人久久精品动漫| 波多野结衣一区二区免费视频| 最好看最新的中文字幕免费| 一级毛片大全免费播放下载 | 日韩毛片免费一二三| 亚洲成年人免费网站| 国产亚洲av人片在线观看| 免费涩涩在线视频网| 老汉精品免费AV在线播放| 成人精品综合免费视频| 亚洲色偷偷色噜噜狠狠99| 91亚洲导航深夜福利| 最新国产AV无码专区亚洲| 免费在线精品视频| 日本大片在线看黄a∨免费| 免费福利视频导航| 午夜免费福利小电影| 国产黄在线播放免费观看| 国产青草亚洲香蕉精品久久|