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];

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

  • 相关阅读:
    jQuery-选择器及属性修改
    jQuery 基础理论
    CSS 之 BFC(块级格式化上下文)
    H5--Web Storage
    H5 -WebWorker
    H5 --拖放
    nodejs Multer中间件
    k8s pod
    kubernetes
    优化CUDA数据传输
  • 原文地址:https://www.cnblogs.com/wcLT/p/4728643.html
Copyright © 2011-2022 走看看