Code Monkey home page Code Monkey logo

normalheaderangpageview's Introduction

一 、介绍 NormalHeaderAngPageView

简单的头部视图和分段视图控制器的联动效果

image

二、实现方法 代码极其简单操作流畅,主视图用tableView搭建,只需要继承MainTouchTableTableView即可。 分页的tableview等需要继承父类ParentClassScrollViewController 三、主要说明 本次更新采用代理传值改变控制主控制器的滚动状态

作者这里使用一款github较多人使用的 WMPageController 地址https://github.com/wangmchn/WMPageController

本项目这里用到了代理所以更改了WMPageController原作者的#import "WMPageController.m"中的初始化方法

原作者

  • (UIViewController *)initializeViewControllerAtIndex:(NSInteger)index { if ([self.dataSource respondsToSelector:@selector(pageController:viewControllerAtIndex:)]) { return [self.dataSource pageController:self viewControllerAtIndex:index]; } return [[self.viewControllerClasses[index] alloc] init]; }

这里修改为 /* 素素修改 */

  • (UIViewController *)initializeViewControllerAtIndex:(NSInteger)index { if ([self.dataSource respondsToSelector:@selector(pageController:viewControllerAtIndex:)]) { return [self.dataSource pageController:self viewControllerAtIndex:index]; } return (UIViewController *)self.viewControllerClasses[index]; }

言语苍白 具体实现请看代码。

normalheaderangpageview's People

Contributors

annama1992 avatar maxiaofei123 avatar

Watchers

qipengxiang 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.