{"id":15038599,"url":"https://github.com/prasad1120/elegantpopover","last_synced_at":"2025-09-13T16:57:03.813Z","repository":{"id":56909931,"uuid":"277050649","full_name":"prasad1120/ElegantPopover","owner":"prasad1120","description":"Highly customisable popover with multiple borders, borders styles (color and gradient) and arrow styles in iOS.","archived":false,"fork":false,"pushed_at":"2020-07-06T06:15:12.000Z","size":2729,"stargazers_count":16,"open_issues_count":1,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T23:53:32.463Z","etag":null,"topics":["cocoapod","cocoapods","ios","popover","popovers","resume-project","swift","ui","ui-components"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/prasad1120.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":"2020-07-04T06:12:36.000Z","updated_at":"2024-11-04T06:03:39.000Z","dependencies_parsed_at":"2022-08-20T19:50:35.998Z","dependency_job_id":null,"html_url":"https://github.com/prasad1120/ElegantPopover","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/prasad1120%2FElegantPopover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prasad1120%2FElegantPopover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prasad1120%2FElegantPopover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prasad1120%2FElegantPopover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prasad1120","download_url":"https://codeload.github.com/prasad1120/ElegantPopover/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131453,"owners_count":21052819,"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":["cocoapod","cocoapods","ios","popover","popovers","resume-project","swift","ui","ui-components"],"created_at":"2024-09-24T20:39:08.962Z","updated_at":"2025-04-09T23:53:37.643Z","avatar_url":"https://github.com/prasad1120.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/logo.png\" width=\"700\" /\u003e\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca\u003e\n    \u003cimg src=\"https://img.shields.io/github/languages/top/prasad1120/ElegantPopover\" alt=\"Top Language\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://cocoapods.org/pods/ElegantPopover\"\u003e\n    \u003cimg src=\"https://img.shields.io/cocoapods/p/ElegantPopover.svg\" alt=\"Platform\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://cocoapods.org/pods/ElegantPopover\"\u003e\n    \u003cimg src=\"https://img.shields.io/cocoapods/v/ElegantPopover.svg\" alt=\"Version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://cocoapods.org/pods/ElegantPopover\"\u003e\n    \u003cimg src=\"https://img.shields.io/cocoapods/l/ElegantPopover.svg\" alt=\"License\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Elegant Popover\n\nHighly customisable popovers with multiple borders, borders styles (color and gradient) and arrow styles in iOS.\n\n## Features\n- [x] Border with Color or Gradient (Any layer).\n- [x] Multiple Borders for a Popover.\n- [x] Customisable Arrow shape.\n- [x] Solid and Outlined Arrow.\n\n\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_1.png\" height=\"600\" hspace=\"30\"/\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_2.png\" height=\"600\" hspace=\"30\"/\u003e\n\u003c/div\u003e\n\n## Requirements \n- Swift 4\n- iOS 11 and above\n\n## Installation\nElegantPopover is available on [CocoaPods](https://cocoapods.org/pods/ElegantPopover).\n\nAdd this line to your `Podfile`.\n~~~\npod 'ElegantPopover'\n~~~\nRun `pod install`.\n\n## Dependencies\nThis library depends on [ClippingBezier](https://github.com/adamwulf/ClippingBezier) library.\n\n## Usage\n\n```swift\n// In your view controller\nlet arrow = PSArrow(height: 25, base: 35, baseCornerRadius: 0, direction: .up)\nvar design = PSDesign()\ndesign.backGroundColor = UIColor.white\n\n// 'contentView' is the UIView which contains 'Elegant Popover' UILabel\nlet popoverController = ElegantPopoverController(contentView: contentView,\n                                                design: design,\n                                                arrow: arrow,\n                                                sourceView: view,\n                                                sourceRect: CGRect(origin: CGPoint(x: 100, y: 170), size:CGSize.zero))\n    \npresent(popoverController, animated: true)\n```\n\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_3.png\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n## Customisations\n**Note**: The following customisations are to be done before creating an instance of `ElegantPopoverController`\n\n\u003cbr/\u003e\n\n### Gradient border\n```swift\nlet gradient = CAGradientLayer()\ngradient.colors = [UIColor(red: CGFloat(222/255.0),\n                           green: CGFloat(98/255.0),\n                           blue: CGFloat(98/255.0),\n                           alpha: CGFloat(1.0)).cgColor,\n                   UIColor(red: CGFloat(255/255.0),\n                           green: CGFloat(184/255.0),\n                           blue: CGFloat(140/255.0),\n                           alpha: CGFloat(1.0)).cgColor]\ngradient.startPoint = CGPoint(x: 0, y: 0)\ngradient.endPoint = CGPoint(x: 1, y: 1)\n\ndesign.borders = [PSBorder(filling: .layer(gradient), width: 12)]\n```\n\n\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_4.png\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n### Insets of popover\n```swift\ndesign.insets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)\n```\n\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_5.png\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n### Corner radius of popover\n```swift\ndesign.cornerRadius = 15\n```\n\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_6.png\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n### Arrow direction\nCan be set as `.any` for the popover to figure out appropriate direction on its own\n```swift\narrow.direction = .left\n```\n\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_7.png\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n### Customise arrow shape\n```swift\narrow.height = 60\narrow.base = 140\n```\n\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_8.png\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n### Multiple borders\nMultiple borders consisting of either `UIColor` or `CALayer` can be added in any combination\n```swift\ndesign.borders = [PSBorder(filling: .layer(gradient), width: 12),\n                  PSBorder(filling: .pureColor(UIColor(red: CGFloat(255/255.0),\n                                                       green: CGFloat(184/255.0),\n                                                       blue: CGFloat(140/255.0),\n                                                       alpha: CGFloat(1.0))), width: 8)]\n```\n\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_9.png\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n### Solid Arrow\nThe index of border required to take the shape of a solid arrow and not outline it. Indices go from outermost border starting with `0` to innermost. Default value is `nil` which means all the borders will outline the arrow.\n```swift\ndesign.solidArrowBorderIndex = 1\n```\n\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_10.png\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n### Anchor to UIBarButtonItem\n```swift\nlet popoverController = ElegantPopoverController(contentView: contentView,\n                                                design: design,\n                                                arrow: arrow,\n                                                barButtonItem: barButtonItem)\n```\n\nTo adjust the arrow position to barButtonItem\n```swift                                                \narrow.height = 25\narrow.base = 45\n```\n\u003cdiv align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/prasad1120/ElegantPopover/blob/master/Assets/screen_11.png\" width=\"600\" /\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprasad1120%2Felegantpopover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprasad1120%2Felegantpopover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprasad1120%2Felegantpopover/lists"}