Skip to content

Commit

Permalink
Merge pull request #21 from robhor/weak-delegate
Browse files Browse the repository at this point in the history
Change delegates to weak references
  • Loading branch information
xai3 committed Apr 12, 2016
2 parents c54d42a + fe125b7 commit 8baee64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Classes/SpotlightTransitionController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protocol SpotlightTransitionControllerDelegate: class {
class SpotlightTransitionController: NSObject, UIViewControllerAnimatedTransitioning {
var isPresent = false

var delegate: SpotlightTransitionControllerDelegate?
weak var delegate: SpotlightTransitionControllerDelegate?

func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
return 0.25
Expand Down
2 changes: 1 addition & 1 deletion Classes/SpotlightViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import UIKit

public class SpotlightViewController: UIViewController {

public var delegate: SpotlightViewControllerDelegate?
public weak var delegate: SpotlightViewControllerDelegate?

private lazy var transitionController: SpotlightTransitionController = {
let controller = SpotlightTransitionController()
Expand Down

0 comments on commit 8baee64

Please sign in to comment.