zoukankan      html  css  js  c++  java
  • ios---setContentOffset

      UIView * farmeView=[[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.widthself.view.frame.size.height)];

        UITableView * conTentView=[[UITableView alloc] initWithFrame:CGRectMake(0, 110, self.view.frame.size.widthself.view.frame.size.height) style:UITableViewStyleGrouped ];

        conTentView.dataSource=self;

        conTentView.delegate = self;

        conTentView.separatorStyle=UITableViewCellSeparatorStyleNone;

        conTentView.backgroundColor=[UIColor whiteColor];

        conTentView. sectionIndexTrackingBackgroundColor=[UIColor greenColor];

        conTentView.tableHeaderView=[[UIView alloc] initWithFrame:CGRectMake(0, -10, 1, 1)];

        _table=conTentView;

        [conTentView setContentOffset:CGPointMake(0, 230) animated:YES];

     

         [farmeView addSubview:conTentView];

         [self.view addSubview:farmeView];

    项目需要,记住上次位置,没有的话(初始化),使用默认位置,可以来点动画呦。

  • 相关阅读:
    修改用户密码,权限
    域渗透
    跨域
    目录
    C中的extern和static
    XSS进阶
    SQL injection
    双重指针学习笔记
    文件上传学习笔记
    Hello Python
  • 原文地址:https://www.cnblogs.com/wcLT/p/4728643.html
Copyright © 2011-2022 走看看