Giter Site home page Giter Site logo

scrollmenubar's Introduction

scrollMenuBar

A top scroll menu bar

类似网易顶部分类滑条。滚动到中间过一点右边时,自动调整位置。  用法:

  ScrollMenuView *menuView = [[ScrollMenuView alloc]init];
  menuView.frame = CGRectMake(0, 0, WIDTH, 44);
  menuView.delegate=self;
  [self.view addSubview:menuView];
  NSArray *items = @[@"头条",@"时尚榜",@"头条",@"时尚榜",@"头条",@"时尚榜"];
  [menuView addItems:items titleColor:[UIColor whiteColor] SelectedColor:[UIColor redColor]];

image

新样式:选中时的字体稍微大一点:

ScrollMenuView *menuView = [[ScrollMenuView alloc]init];
menuView.frame = CGRectMake(0, 64, WIDTH, 44);
menuView.delegate=self;
[self.view addSubview:menuView];
NSArray *items = @[@"精选",@"鞋子",@"上装",@"裤装",];
[menuView addItems:items titleColor:[UIColor grayColor] SelectedColor:[UIColor blackColor]];


ScrollMenuView *menuView1 = [[ScrollMenuView alloc]init];
menuView1.frame = CGRectMake(0, 230, WIDTH, 44);
menuView1.delegate=self;
[self.view addSubview:menuView1];
NSArray *items1 = @[@"精选",@"鞋子",@"上装",@"裤装",@"头条",@"配饰",@"视频",@"折扣",@"潮牌",@"促销"];

[menuView1 addItems:items1 titleColor:[UIColor grayColor] SelectedColor:[UIColor blackColor]];

image

scrollmenubar's People

Stargazers

 avatar shenfu1991 avatar

Watchers

James Cloos avatar shenfu1991 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.