Created
November 5, 2021 08:10
-
-
Save GeekTree0101/4d920f6653a260d55bafe263b4ff4dcd to your computer and use it in GitHub Desktop.
jay2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Router: Delegate { | |
func dismissAndPresentWriteForm(_ groupID: Int?) { | |
self.viewController?.present(WriteFormViewController(), animated: true) | |
} | |
} | |
class 제이가만든뷰컨트롤러 { | |
var selectedGroupID: Int? { | |
guard let index = self.itemNodes.firstIndex(where: { $0.isSelected }) else { return nil } | |
return self.groups[safe: index].id | |
} | |
weak var delegate: Delegate! | |
func confirm() { | |
self.dismiss(animated: true, completion: { [weak self] () in | |
guard let self = self else { return } | |
self.delegate.dismissAndPresentWriteForm(self.selectedGroupID) | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment