---
title: "滑动scrowview 上方菜单选项的下环线随着移动 效果"
author: "caoyudong"
date: "2014-12-30T11:10:47Z"
tags: []
categories: ["移动开发"]
slug: "scrowview"
draft: false
lastmod: "2014-12-30T11:12:51Z"
id: 2171110
url: "https://cydd.iteye.com/blog/2171110"
---

UIView:
-(id)initWithFrame:(CGRect)frame :(id)target :(SEL)sel
{
    self=;
    if (self)
    {
        scrow.delegate=target;
        m_showBar=initWithFrame:CGRectMake(15, 28, 70, 2)];
        ;

    }
    return self;
}

-(void)setShowBarPoint :(CGPoint)barPoint
{
    m_showBar.frame=CGRectMake(15+barPoint.x/3+3, 28, 70, 2);
}


UIViewController:
- (void)viewDidLoad 
{
//第一次启动实例化uiview
}

-(void)scrollViewDidScroll:(UIScrollView *)scrollView  //uiscrowView代理方法
//offset changes
{
    CGPoint rec=scrowView.scrow.contentOffset; //得到scrow的实时动态contentOffSet坐标
    ;
}