<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

    The iPhone SDK provides an easy-to-code standard for creating consistent user interfaces. The UITableView class is used in many iPhone applications. Most applications that present information to you in rows that you can tap to slide a new page over to see details use a UITableView to do the magic. Once you have a UITableView setup, you can easily add the little accessory arrow icons to the right side of the table cells by following the steps in this Tech-Recipe.


    At this point, you need to have a working UITableView-based application. If you aren’t at this point, you’ll need to take a few steps back and check with the official Apple iPhone SDK documentation.

    The simplest case is adding an accessory icon to the right of all cells in the table. To do this, edit the source file of the table view you want to change and add the following method:

    - (UITableViewCellAccessoryType)tableView:(UITableView *)tv accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath
    {
       return UITableViewCellAccessoryDetailDisclosureButton;
    }

    Yeah, that’s a keyboard-full, but it’s not that bad. Because your table view class is the delegate of your actual table view, implementing this method of the UITableViewController class will automatically affect the cells in your table. No other changes are needed to make this work. Very cool.

    If you don’t want to show the accessory image for every cell in the table, you’ll need to implement some logic in this method that takes the NSIndexPath parameter (which tells you which row in which section is being asked about) and responds appropriately.

    There are three standard accessory images that can be used by this method. Each image is shown below with the matching UITableViewCellAccessoryType (the example uses shows a Disclosure indicator image because it returns UITableViewCellAccessoryDisclosureIndicator.

    Disclosure indicator

    UITableViewCellAccessoryDisclosureIndicator
    Used to indicate that tapping the cell will slide in a new table view one level down in the hierarchy.


    Detail disclosure button

    UITableViewCellAccessoryDetailDisclosureButton
    This button indicates that tapping the cell will reveal a detail view of that item.


    Checkmark

    UITableViewCellAccessoryCheckmark
    Indicates that a row has been selected by the user.


    Nothing

    UITableViewCellAccessoryNone
    This is the default value for the cell accessory indicating that no accessory should be shown.

    This isn’t a brain surgery level Tech-Recipe and this information is, of course, covered in the official documentation, but I keep forgetting the method name and knew it would be easier to lookup here than in the docs. I hope someone else finds it helpful, too.

    posted on 2010-10-07 20:21 seal 閱讀(502) 評論(0)  編輯  收藏 所屬分類: iPhone
    主站蜘蛛池模板: 亚洲Av熟妇高潮30p| 中文字幕不卡亚洲| 亚洲自偷自拍另类图片二区| 99麻豆久久久国产精品免费 | 亚洲国产a级视频| 国产精品亚洲二区在线| 成人爱做日本视频免费| 特级毛片A级毛片100免费播放| 国产一区视频在线免费观看 | 亚洲情a成黄在线观看| 在线播放国产不卡免费视频| 亚洲欧洲日产国码一级毛片| 中国内地毛片免费高清| 亚洲国产老鸭窝一区二区三区| 精品国产麻豆免费人成网站| 亚洲成人免费网址| 日韩吃奶摸下AA片免费观看 | 亚洲人成自拍网站在线观看| 免费永久在线观看黄网站| 日韩毛片在线免费观看| 亚洲日韩精品一区二区三区无码 | 亚洲成A∨人片天堂网无码| 久久高潮一级毛片免费| 亚洲av色福利天堂| 我要看WWW免费看插插视频| 免费人人潮人人爽一区二区| 亚洲春色在线视频| 猫咪社区免费资源在线观看| 免费人成动漫在线播放r18| 久久精品国产亚洲网站| 成年美女黄网站18禁免费| 一级毛片大全免费播放| 久久久久亚洲AV成人片| 在线免费视频一区| 免费一区二区无码东京热| 亚洲午夜未满十八勿入| 国产极品粉嫩泬免费观看| 四虎影视成人永久免费观看视频 | 亚洲黄色在线观看| 国产伦一区二区三区免费| 嫩草在线视频www免费观看|