mirror of
https://github.com/samsonjs/SwiftyCam.git
synced 2026-03-30 09:55:51 +00:00
Merge pull request #59 from ryandailey100/master
Fixed retain cycle bug with delegates
This commit is contained in:
commit
be817db1a6
3 changed files with 4 additions and 4 deletions
|
|
@ -20,7 +20,7 @@ import UIKit
|
|||
|
||||
/// Delegate for SwiftyCamButton
|
||||
|
||||
public protocol SwiftyCamButtonDelegate {
|
||||
public protocol SwiftyCamButtonDelegate: class {
|
||||
|
||||
/// Called when UITapGestureRecognizer begins
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ open class SwiftyCamButton: UIButton {
|
|||
|
||||
/// Delegate variable
|
||||
|
||||
public var delegate: SwiftyCamButtonDelegate?
|
||||
public weak var delegate: SwiftyCamButtonDelegate?
|
||||
|
||||
/// Maximum duration variable
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ open class SwiftyCamViewController: UIViewController {
|
|||
|
||||
/// Public Camera Delegate for the Custom View Controller Subclass
|
||||
|
||||
public var cameraDelegate: SwiftyCamViewControllerDelegate?
|
||||
public weak var cameraDelegate: SwiftyCamViewControllerDelegate?
|
||||
|
||||
/// Maxiumum video duration if SwiftyCamButton is used
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import UIKit
|
|||
|
||||
/// Delegate for SwiftyCamViewController
|
||||
|
||||
public protocol SwiftyCamViewControllerDelegate {
|
||||
public protocol SwiftyCamViewControllerDelegate: class {
|
||||
|
||||
/**
|
||||
SwiftyCamViewControllerDelegate function called when the takePhoto() function is called.
|
||||
|
|
|
|||
Loading…
Reference in a new issue