{"id":21373655,"url":"https://github.com/yongyuandouneng/YNPageScrollViewController","last_synced_at":"2025-07-13T08:30:30.454Z","repository":{"id":56929572,"uuid":"64148947","full_name":"yongyuandouneng/YNPageScrollViewController","owner":"yongyuandouneng","description":"一个强大的PageScrollViewController滑动库。菜单多种样式选择，支持悬浮样式、导航条样式、顶部样式。旧版半塘首页Demo、简书个人文章Demo.","archived":false,"fork":false,"pushed_at":"2018-06-27T04:25:38.000Z","size":11294,"stargazers_count":173,"open_issues_count":3,"forks_count":34,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-08T15:51:13.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yongyuandouneng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-25T16:05:01.000Z","updated_at":"2025-05-19T01:14:59.000Z","dependencies_parsed_at":"2022-08-21T06:20:59.919Z","dependency_job_id":null,"html_url":"https://github.com/yongyuandouneng/YNPageScrollViewController","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/yongyuandouneng/YNPageScrollViewController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yongyuandouneng%2FYNPageScrollViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yongyuandouneng%2FYNPageScrollViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yongyuandouneng%2FYNPageScrollViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yongyuandouneng%2FYNPageScrollViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yongyuandouneng","download_url":"https://codeload.github.com/yongyuandouneng/YNPageScrollViewController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yongyuandouneng%2FYNPageScrollViewController/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264479160,"owners_count":23615066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T08:29:26.661Z","updated_at":"2025-07-13T08:30:29.275Z","avatar_url":"https://github.com/yongyuandouneng.png","language":"Objective-C","funding_links":[],"categories":["iOS"],"sub_categories":["PageView"],"readme":"# YNPageScrollViewController\n\n### 请查看重构版\n[YNPageViewController](https://github.com/yongyuandouneng/YNPageViewController)\n### 请查看重构版\n[YNPageViewController](https://github.com/yongyuandouneng/YNPageViewController)\n### 请查看重构版\n[YNPageViewController](https://github.com/yongyuandouneng/YNPageViewController)\n\n\n### 先上效果图\n---\n\n\u003cimg src=\"https://github.com/yongyuandouneng/YNPageScrollViewController/blob/master/GifAndImage/myProject.gif\"\u003e\n\u003cimg src=\"https://github.com/yongyuandouneng/YNPageScrollViewController/blob/master/GifAndImage/Demo.gif\"\u003e\n\n第一张是集成在项目后的gif，喜欢就start鼓励一下，您在使用过程中有任何问题、出现任何(BUG、Crash)，请加QQ群538133294或联系我的扣扣1003580893.\n\n### 优点\n---\n* 控制器缓存、控制器生命周期无破坏、性能高\n* 菜单样式多样化、易拓展、易集成、易维护\n\n### 支持Pod:\n---\npod 'YNPageScrollViewController'\n\n如果发现pod search YNPageScrollViewController 搜索出来的不是最新版本，需要在终端执行cd转换文件路径命令退回到desktop，然后执行pod setup命令更新本地spec缓存（可能需要几分钟），然后再搜索就可以了\n\n### 版本更新:\n---\n1.0.2：\n     修改悬浮式假数据高度、提供线条距离底部、宽度配置、修改其他BUG、修改了缓存机制、新增三个用来操作title和vc的Api。\n\n\n### 怎么样使用？\n---\n\n一、统一使用配置信息类YNPageScrollViewMenuConfigration 创建YNPageScrollViewController控制器。控制器可以采用继承/直接使用/作为子类方式。\n```objective-c\n\n//简书Demo\n- (YNJianShuDemoViewController *)getJianShuDemoViewController{\n\n        //配置信息\n        YNPageScrollViewMenuConfigration *configration = [[YNPageScrollViewMenuConfigration alloc]init];\n        configration.scrollViewBackgroundColor = [UIColor redColor];\n        configration.itemLeftAndRightMargin = 30;\n        configration.lineColor = [UIColor orangeColor];\n        configration.lineHeight = 2;\n        configration.itemMaxScale = 1.2;\n        configration.pageScrollViewMenuStyle = YNPageScrollViewMenuStyleSuspension;\n        configration.scrollViewBackgroundColor = [UIColor whiteColor];\n        configration.selectedItemColor = [UIColor redColor];\n        //设置平分不滚动   默认会居中\n        configration.aligmentModeCenter = NO;\n        configration.scrollMenu = NO;\n        configration.showGradientColor = NO;//取消渐变\n        configration.showNavigation = YES;\n        configration.showTabbar = YES;//设置显示tabbar\n\n        //创建控制器\n        YNJianShuDemoViewController *vc = [YNJianShuDemoViewController pageScrollViewControllerWithControllers:[self getViewController] titles:@[@\"最新收录\",@\"最新评论\",@\"热门\",@\"更多\",@\"第一个界面\",@\"第二个界面\",@\"第三个界面\",@\"第四个界面\"] Configration:configration];\n        //头部视图\n        UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 150)];\n        imageView.image = [UIImage imageNamed:@\"QYPPMyContributeListHead\"];\n        imageView.userInteractionEnabled = YES;\n        [imageView addGestureRecognizer:[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(imageViewTap)]];\n\n        //footer用来当做内容高度\n        UIView *footerView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 0)];\n        footerView.backgroundColor = [UIColor groupTableViewBackgroundColor];\n        vc.placeHoderView = footerView;\n\n        vc.dataSource = self;\n        vc.headerView = imageView;\n\n        return vc;\n}\n```\n\n(1) 悬浮样式\n    \n    1.配置样式为YNPageScrollViewMenuStyleSuspension.\n    \n    2.悬浮样式创建时候如果需要headerView则需要在外面统一提供headerView，footerView也要提供用来充当里面的内容高度。具体请看上面的OC代码。\n    \n    3.还需要设置数据源提供三个数据源的方法。\n    \n    4.目前只支持里面的内容是UITableView或UITableViewController，并且不能有FooterView.\n    \n    5.在[self.tableView reloadData]后,需要调用刷新footerView的方法以计算需要填充的内容高度。[self.ynPageScrollViewController reloadPlaceHoderViewFrame];\n    \n    6.具体请看上面的简书Demo代码.\n\n(2) 导航条样\u0026顶部样式\n    \n    1. 设置样式为YNPageScrollViewMenuStyleNavigation(导航条)、样式YNPageScrollViewMenuStyleTop(顶部).\n    \n    2. 实现数据源的一个方法返回ScrollView数据\n    \n    3. 内容支持UITableView、UITableViewController、UICollectionViewController\n    \n    4. 具体看Demo代码.\n    \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyongyuandouneng%2FYNPageScrollViewController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyongyuandouneng%2FYNPageScrollViewController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyongyuandouneng%2FYNPageScrollViewController/lists"}