아미(아름다운미소)

버튼으로 SWRevealViewController를 관리하는 방법 본문

랭귀지/SWIFT

버튼으로 SWRevealViewController를 관리하는 방법

유키공 2018. 6. 10. 11:02

How to manage SWRevealViewController with button

let revealViewController = self.revealViewController()
var settingsButton = UIButton(type: .custom)
settingsButton.setImage(UIImage(named: "settings_icon")!, for: .normal)
settingsButton.addTarget(revealViewController, action: #selector(SWRevealViewController.revealToggle(_:)), for: .touchUpInside)
View.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
Comments