Skip to main content
Version: 12.10.0

OCDoctorCardView: UI component

The OCDoctorCardView is a customizable card view for displaying Doctor details. It can include a name, speciality, address, distance, and opening times. The appearance of the card can be customized using different background color.

Features

  • User can pass the desired details to show like name, speciality, address, distance, and opening times.
  • In bookMarkAction, user can defined their state action for bookMark

Installation

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

  2. Use the OCDoctorCardView view in your SwiftUI code:

Parameters:

  • doctorInformation : Name, speciality, speciality, address, distance and openingTime of the Doctor
  • doctorCardViewStyle : Set color for Doctor card
  • bookmarkAction : Book action closure for save and remove as favorite
import SwiftUI

struct ContentView: View {

var body: some View {
VStack{

OCDoctorCardView(doctorInformation: DoctorInformation(name: "Dr. Sir M Visveshwarayya",
address: "Bangalore",
distance: "10 km",
openingTime: "Opening times only between 11: 00 AM to 3: 00 PM")) { state in
print(state)
}
.padding()
}
}