{"id":18270696,"url":"https://github.com/sendoa/QBKOverlayMenuView","last_synced_at":"2025-04-05T01:30:47.660Z","repository":{"id":3419716,"uuid":"4470842","full_name":"sendoa/QBKOverlayMenuView","owner":"sendoa","description":"Menú flotante que trata de imitar el ofrecido por la app Sparrow para iOS","archived":false,"fork":false,"pushed_at":"2012-07-03T14:19:52.000Z","size":254,"stargazers_count":249,"open_issues_count":0,"forks_count":23,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-04T12:22:59.557Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sendoa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-28T13:35:08.000Z","updated_at":"2023-05-15T19:35:24.000Z","dependencies_parsed_at":"2022-08-31T20:32:30.075Z","dependency_job_id":null,"html_url":"https://github.com/sendoa/QBKOverlayMenuView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendoa%2FQBKOverlayMenuView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendoa%2FQBKOverlayMenuView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendoa%2FQBKOverlayMenuView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendoa%2FQBKOverlayMenuView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sendoa","download_url":"https://codeload.github.com/sendoa/QBKOverlayMenuView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276043,"owners_count":20912286,"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-05T11:38:48.888Z","updated_at":"2025-04-05T01:30:47.083Z","avatar_url":"https://github.com/sendoa.png","language":"Objective-C","readme":"# QBKOverlaMenuView\n\nIt's basically an `UIView` object that tries to mimic the behavior of the floating control used by [http://sparrowmailapp.com/iphone.php](Sparrow for iOS). The control appears at the bottom right corner of the screen and it unfolds a menu whenever it's touched.\n\n![Here you have the control working without the animation :-)](https://github.com/sendoa/QBKOverlayMenuView/raw/master/Docs/ejemplo.png)\n\n**Please, take in consideration that I've coded this control as a mrere excercise so the options are not too customizable nor the code is intended to be *final***. It's currently designed to work in *portrait* orientation and it can be positioned either at the bottom or at the top of the screen. You can add an *offset* to avoid overlapping with `UITabBar`, `UINavigationBar` or similar controls.\n\nTo make it work, you only need to include the *.h* file wherever you intend to use the control and instantiate it this way —usually, from a *view controller*:\n\n\tQBKOverlayMenuView *qbkOverlayMenu = [[QBKOverlayMenuView alloc] initWithDelegate:self position:kQBKOverlayMenuViewPositionBottom];\n    [qbkOverlayMenu setParentView:[self view]];\n    \n    [qbkOverlayMenu addButtonWithImage:[UIImage imageNamed:@\"boton1.png\"] index:0];\n    [qbkOverlayMenu addButtonWithImage:[UIImage imageNamed:@\"boton2.png\"] index:1];\n    [qbkOverlayMenu addButtonWithImage:[UIImage imageNamed:@\"boton3.png\"] index:2];\n    [qbkOverlayMenu addButtonWithImage:[UIImage imageNamed:@\"boton4.png\"] index:3];\n\nThe `setParentView:` method indicates the view where QBKOverlayMenuView will be positioned —usually, the main view of the view controller.\n\n## Positioning\n\nThere are two constants available to indicate the positioning of the control:\n\n* `kQBKOverlayMenuViewPositionBottom`: the control positions itself at bottom-right corner of the screen.\n* `kQBKOverlayMenuViewPositionTop`: the control positions itself at top-right corner of the screen.\n\n## Offset\n\nIf you need the control to appear displaced from the bounds of the container view —usually not to overlap  some kind of `UITabBar`, `UINavigationBar`…— you can do this:\n\n\tQBKOverlayMenuViewOffset offset;\n    offset.bottomOffset = 44;\n    offset.topOffset = 44;\n    \n\tQBKOverlayMenuView *qbkOverlayMenu = [[QBKOverlayMenuView alloc] initWithDelegate:self position:kQBKOverlayMenuViewPositionBottom offset:offset];\n\n## Adding buttons\n\nYou just have to make use of the `addButtonWithImage:index:` method. Then, when the button is touched, the message `overlayMenuView:didActivateAdditionalButtonWithIndex:` will be sent with the `index` of the touched button to the delegate specified in the *init* method.\n\n\t- (void)overlayMenuView:(QBKOverlayMenuView *)overlayMenuView didActivateAdditionalButtonWithIndex:(NSInteger)index\n\t{\n    \tNSLog(@\"Button touched with index: %d\", index);\n\t}\n\n## Graphics\n\nI've attached the graphics I created trying to mimic the aspect of those used by Sparrow. I've only created one additional icon instead of the whole set that Sparrow offers.","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsendoa%2FQBKOverlayMenuView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsendoa%2FQBKOverlayMenuView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsendoa%2FQBKOverlayMenuView/lists"}