Skip to content

Commit 2a76999

Browse files
committed
Make RideRequestButtonDelegate weak
1 parent 66a2a20 commit 2a76999

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/UberRides/RideRequestButton.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import CoreLocation
2727
import UberCore
2828

2929
/// A protocol used to response to Uber RideRequestButton events
30-
public protocol RideRequestButtonDelegate {
30+
public protocol RideRequestButtonDelegate: AnyObject {
3131
/**
3232
The button finished loading ride information successfully.
3333

@@ -49,7 +49,7 @@ public class RideRequestButton: UberButton {
4949
// MARK: Public Properties
5050

5151
/// Delegate is informed of events that occur with request button.
52-
public var delegate: RideRequestButtonDelegate?
52+
public weak var delegate: RideRequestButtonDelegate?
5353

5454
/// The RideParameters object this button will use to make a request
5555
public var rideParameters: RideParameters

0 commit comments

Comments
 (0)