Skip to main content
Version: Next

OCModal

OCModal A modal helps users perform a specific task related to the parent view without leaving the current context. A sheet is displayed as a kind of card that partially hides the underlying content. As long as the modal is open, the underlying content can not be accessed With a click outside the modal or on the (x) close button, the modal is closed

Features

  • Create bottom sheet
  • Different content can be set inside the bottom sheet.
  • Supports accessibility features for improved user experience.

Installation

  1. Copy the OCModal component folder into your Xcode project.

  2. Use the OCModal view in your SwiftUI code:

import SwiftUI

struct ContentView: View {
var body: some View {
VStack {
OCModal(title: "Title", isBottomSheetPresented: $isShowingBottomSheet, content: {
Different content can be placed here.
})
}
}
}