# andreamazz/ampoptip architecture

> Architecture diagram of the GitHub repository andreamazz/ampoptip, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andreamazz/ampoptip
- Repository: https://github.com/andreamazz/ampoptip

## Overview

AMPopTip is an iOS popover library: an app configures and shows a PopTip, which positions and draws a directional bubble, presents it with animation, and supports updates and dismissal. The README also documents text, custom UIKit views, SwiftUI views, masks, gesture callbacks, and animation customization; these capabilities are implemented through the main PopTip API. Relationships involving unsampled portions of that file are omitted rather than inferred.

Main entry points: [`Source/PopTip.swift`](https://github.com/andreamazz/ampoptip/blob/main/Source/PopTip.swift) (PopTip lifecycle), [`Source/PopTip+Transitions.swift`](https://github.com/andreamazz/ampoptip/blob/main/Source/PopTip%2BTransitions.swift) (Entrance and exit), [`Source/PopTip+Draw.swift`](https://github.com/andreamazz/ampoptip/blob/main/Source/PopTip%2BDraw.swift) (Bubble drawing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Popover API"]
  node_poptip["PopTip lifecycle<br/>[PopTip.swift]"]
end

subgraph group_visuals["Rendering and motion"]
  node_bubble["Bubble drawing<br/>[PopTip+Draw.swift]"]
  node_transitions["Entrance and exit"]
end

subgraph group_platform["iOS presentation"]
  node_uikit["UIKit views"]
  node_swiftui["SwiftUI content"]
end

node_app(("iOS app"))

node_app -->|"shows or updates"| node_poptip
node_poptip -->|"builds path"| node_bubble
node_poptip -.->|"runs animation"| node_transitions
node_transitions -->|"animates views"| node_uikit
node_app -->|"provides content"| node_swiftui
node_poptip -->|"hosts content"| node_swiftui

click node_poptip "https://github.com/andreamazz/ampoptip/blob/main/Source/PopTip.swift"
click node_bubble "https://github.com/andreamazz/ampoptip/blob/main/Source/PopTip%2BDraw.swift"
click node_transitions "https://github.com/andreamazz/ampoptip/blob/main/Source/PopTip%2BTransitions.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_poptip toneBlue
class node_bubble,node_transitions toneAmber
class node_uikit,node_swiftui toneMint
class node_app toneIndigo
```

## Components

### Popover API

- [PopTip lifecycle](https://github.com/andreamazz/ampoptip/blob/main/Source/PopTip.swift): `Source/PopTip.swift`

### Rendering and motion

- [Bubble drawing](https://github.com/andreamazz/ampoptip/blob/main/Source/PopTip%2BDraw.swift): `Source/PopTip+Draw.swift`
- [Entrance and exit](https://github.com/andreamazz/ampoptip/blob/main/Source/PopTip%2BTransitions.swift): `Source/PopTip+Transitions.swift`

### iOS presentation

- **UIKit views**
- **SwiftUI content**

### Other components

- **iOS app**

## Connections

- iOS app → PopTip lifecycle: shows or updates (evidence: `README.md`)
- PopTip lifecycle → Bubble drawing: builds path (evidence: `Source/PopTip.swift`)
- PopTip lifecycle → Entrance and exit: runs animation (evidence: `Source/PopTip+Transitions.swift`)
- Entrance and exit → UIKit views: animates views (evidence: `Source/PopTip+Transitions.swift`)
- iOS app → SwiftUI content: provides content (evidence: `README.md`)
- PopTip lifecycle → SwiftUI content: hosts content (evidence: `README.md`)
