Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f166123

Browse files
add weak
1 parent 2705836 commit f166123

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/ZYCommonUtil/CustomNavViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Foundation
88
import UIKit
99
import SnapKit
1010

11-
public protocol NavBarViewDelegate {
11+
public protocol NavBarViewDelegate: UIViewController {
1212
func clickNavBar(type: Int)
1313
}
1414

@@ -18,7 +18,7 @@ open class NavBarView: UIView {
1818
open var rightBtn: UIButton!
1919
open var right2Btn: UIButton!
2020
open var line: UIView!
21-
open var delegate: NavBarViewDelegate?
21+
weak open var delegate: NavBarViewDelegate?
2222

2323
override init(frame: CGRect) {
2424
super.init(frame: frame)

0 commit comments

Comments
 (0)