• UI基础


       scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, 460)];
        scrollView.backgroundColor = [UIColor redColor];
        // 是否支持滑动最顶端
    //    scrollView.scrollsToTop = NO;
        scrollView.delegate = self;
        // 设置内容大小
        scrollView.contentSize = CGSizeMake(320, 460*10);
        // 是否反弹
    //    scrollView.bounces = NO;
        // 是否分页
    //    scrollView.pagingEnabled = YES;
        // 是否滚动
    //    scrollView.scrollEnabled = NO;
    //    scrollView.showsHorizontalScrollIndicator = NO;
        // 设置indicator风格
    //    scrollView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
        // 设置内容的边缘和Indicators边缘
    //    scrollView.contentInset = UIEdgeInsetsMake(0, 50, 50, 0);
    //    scrollView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 50, 0, 0);
        // 提示用户,Indicators flash
        [scrollView flashScrollIndicators];
        // 是否同时运动,lock
        scrollView.directionalLockEnabled = YES;
     
    #pragma mark - 
    /*
    // 返回一个放大或者缩小的视图
    - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
    {
         
    }
    // 开始放大或者缩小
    - (void)scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:
    (UIView *)view
    {
         
    }
     
    // 缩放结束时
    - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale
    {
         
    }
      
    // 视图已经放大或缩小
    - (void)scrollViewDidZoom:(UIScrollView *)scrollView
    {
    NSLog(@"scrollViewDidScrollToTop");
    }
     */
     
    // 是否支持滑动至顶部
    - (BOOL)scrollViewShouldScrollToTop:(UIScrollView *)scrollView
    {
        return YES;
    }
     
    // 滑动到顶部时调用该方法
    - (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView
    {
        NSLog(@"scrollViewDidScrollToTop");
    }
     
    // scrollView 已经滑动
    - (void)scrollViewDidScroll:(UIScrollView *)scrollView
    {
        NSLog(@"scrollViewDidScroll");
    }
     
    // scrollView 开始拖动
    - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
    {
        NSLog(@"scrollViewWillBeginDragging");
    }
     
    // scrollView 结束拖动
    - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
    {
        NSLog(@"scrollViewDidEndDragging");
    }
     
    // scrollView 开始减速(以下两个方法注意与以上两个方法加以区别)
    - (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView
    {
        NSLog(@"scrollViewWillBeginDecelerating");
    }
     
    // scrollview 减速停止
    - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
    {
       NSLog(@"scrollViewDidEndDecelerating"); 
    }
  • 相关阅读:
    Linux磁盘空间被未知资源耗尽
    磁盘的分区、格式化、挂载(转)
    sp_MSforeachtable和sp_MSforeachdb
    分布式缓存系统 Memcached 【转载】
    在性能计数的时候使用StopWatch类型
    数据库设计阶段中为何要考虑“反规范化”
    再谈谈数据库镜像之客户端重定向
    当SQL Server排序时遇上了NULL值
    ArrayList的动态扩展
    SSMS 2008的智能感知仅仅针对SQL Server 2008的数据库有效
  • 原文地址:https://www.cnblogs.com/xj76149095/p/5346369.html
Copyright © 2020-2023  润新知