iOS implementation

iOS

iOS Rides Screen

1242

iOS Rides Screen

iOS example

let ridesList = KarhooUI().screens().rides().buildRidesScreen(completion: { [weak self] result in
	self?.dismiss(animated: true, completion: nil)
    
    guard let action = result.completedValue() else {
    	return
    }

    switch action {
    	case .trackTrip(let trip):
        // user wants to track a trip (open journey screen)
        case .bookNewTrip:
         // user wants to book a new trip (show / navigate back to booking screen)
        case .rebookTrip(let trip):
         // user wants to book a new trip (show / navigate back to booking screen with trip details)
    }
})

self.present(ridesList, animated: true, completion: nil)

Builder variables

VariableDescription