zoukankan      html  css  js  c++  java
  • UIScrollerView常见属性

    CGSize contentSize :设置UIScrollView的滚动范围

    CGPoint contentOffset :UIScrollView当前滚动的位置

    UIEdgeInsets contentInset :这个属性可以在四周增加滚动范围

    BOOL bounces 是否有弹簧效果

    BOOL scrollEnabled 是否能滚动

    BOOL showsHorizontalScrollIndicator 是否显示水平方向的滚动条

    BOOL showsVerticalScrollIndicator     是否显示垂直方向的滚动条

    UIScrollViewIndicatorStyle indicatorStyle  设定滚动条的样式

    BOOL dragging 是否正在被拖拽

    BOOL tracking  当touch后还没有拖动的时候值是YES,否则NO

    BOOL decelerating 是否正在减速

    BOOL zooming 是否正在缩放

     
     
     
    滑动速度加快
    这里是手指离开屏幕后的滑动初始值设置, 
    void ScrollView::endRecordSlidAction() 
         
        float orSpeed = MIN(fabs(totalDis)/(_slidTime), AUTOSCROLLMAXSPEED); 
            //startAutoScrollChildrenWithOriginalSpeed(dir, orSpeed, true, -1000); 
        startAutoScrollChildrenWithOriginalSpeed(dir, orSpeed*2, true, -500); //orSpeed是初始速度,-500是加速度 
     
    滚动个tableView时控制速度
     [self.tableView scrollToRowAtIndexPath:indexPath
                              atScrollPosition:UITableViewScrollPositionTop
                                      animated:YES];
    但是滚动的非常快,我想让速度慢一点
      [UIView animateWithDuration:2 animations:^{
          [self.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForItem:20 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO];
        }
      ];
  • 相关阅读:
    properties 插件安装
    FineReport 安装教程
    Red/Black Tree 演示
    java 日期转化
    Tomcat使用Log4j按天生成日志 亲测可行
    服务器初始化
    ubuntu-rc.local
    django-views
    https tcp ssl
    svn
  • 原文地址:https://www.cnblogs.com/walkingzmz/p/5309684.html
Copyright © 2011-2022 走看看