{"id":21374007,"url":"https://github.com/WellsYC/YCMenuView","last_synced_at":"2025-07-13T08:32:06.943Z","repository":{"id":56928914,"uuid":"146686261","full_name":"WellsYC/YCMenuView","owner":"WellsYC","description":"a popup menu which can be highly customized.(一个可以根据关联点和关联视图弹出的菜单，类似QQ导航栏右侧菜单。可满足高度自定义需求。)","archived":false,"fork":false,"pushed_at":"2019-09-29T06:01:28.000Z","size":321,"stargazers_count":162,"open_issues_count":10,"forks_count":22,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-18T05:40:15.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/WellsYC.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":"2018-08-30T02:41:56.000Z","updated_at":"2024-05-20T21:15:21.000Z","dependencies_parsed_at":"2022-08-21T05:50:49.868Z","dependency_job_id":null,"html_url":"https://github.com/WellsYC/YCMenuView","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WellsYC%2FYCMenuView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WellsYC%2FYCMenuView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WellsYC%2FYCMenuView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WellsYC%2FYCMenuView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WellsYC","download_url":"https://codeload.github.com/WellsYC/YCMenuView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225868546,"owners_count":17537067,"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:38.289Z","updated_at":"2024-11-22T08:30:05.599Z","avatar_url":"https://github.com/WellsYC.png","language":"Objective-C","readme":"![logo](logo/original-horizontal.png)\n\n# YCMenuView\na popup menu which can be highly customized.(一个可以根据关联点和关联视图弹出的菜单，类似QQ导航栏右侧菜单。可满足高度自定义需求。)\n\n![image](https://github.com/WellsYC/YCMenuView/blob/master/menuView.gif)\n\n\n## Usage\n\n\n**Method:**  using Cocoapods\n\n``pod 'YCMenuView'``\n\nthen\n\n```objective-c\n#import \u003cYCMenuView.h\u003e\n```\n\n**Method2**: moving ``YCMenuViewCompont``folder into your project.\n\n\n## Example\n\n```\n// 例子：以导航栏右侧按钮为关联按钮\n- (IBAction)buttonItemClick:(UIBarButtonItem *)sender {\n\n    // 创建YCMenuAction\n    YCMenuAction *action = [YCMenuAction actionWithTitle:@\"首页\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action1 = [YCMenuAction actionWithTitle:@\"个人\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action2 = [YCMenuAction actionWithTitle:@\"最新\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action3 = [YCMenuAction actionWithTitle:@\"搜索页\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n    YCMenuAction *action4 = [YCMenuAction actionWithTitle:@\"新闻页\" image:image handler:^(YCMenuAction *action) {\n        NSLog(@\"点击了%@\",action.title);\n    }];\n\n    // 按钮（YCMenuAction）的集合\n    self.arr = @[action,action1,action2,action3,action4,action,action1,action2];\n\n    // 创建YCMenuView(根据关联点或者关联视图)\n    YCMenuView *view = [YCMenuView menuWithActions:self.arr width:140 relyonView:sender];\n    \n    // 自定义设置\n    view.menuColor = [UIColor whiteColor];\n    view.separatorColor = [UIColor whiteColor];\n    view.maxDisplayCount = 5;  // 最大展示数量（其他的需要滚动才能看到）\n    view.offset = 0; // 关联点和弹出视图的偏移距离\n    view.textColor = [UIColor whiteColor];\n    view.textFont = [UIFont boldSystemFontOfSize:18];\n    view.menuCellHeight = 60;\n    view.dismissOnselected = YES;\n    view.dismissOnTouchOutside = YES;\n    \n    // 显示\n    [view show];\n}\n```\n\n","funding_links":[],"categories":["OOM-Leaks-Crash"],"sub_categories":["Menu-PopupView"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWellsYC%2FYCMenuView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FWellsYC%2FYCMenuView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FWellsYC%2FYCMenuView/lists"}