Commit cfff30eb authored by Davide De Rosa's avatar Davide De Rosa
Browse files

Merge branch '114-add-swipe-gesture-to-menu' into 'develop'

Resolve "Add swipe gesture to menu"
parents 623210fa 38b10247
......@@ -83,6 +83,10 @@ class DashboardViewController: AutolayoutViewController {
toggleConnection.addTarget(self, action: #selector(toggleMoved(_:)), for: .valueChanged)
buttonChangeRegion.accessibilityIdentifier = "uitests.main.pick_region";
SideMenuManager.default.menuLeftNavigationController = storyboard!.instantiateViewController(withIdentifier: "SideMenuNavigationController") as? UISideMenuNavigationController
SideMenuManager.default.menuAddPanGestureToPresent(toView: self.navigationController!.navigationBar)
SideMenuManager.default.menuAddScreenEdgePanGesturesToPresent(toView: self.navigationController!.view)
let nc = NotificationCenter.default
nc.addObserver(self, selector: #selector(accountDidLogout(notification:)), name: .PIAAccountDidLogout, object: nil)
......
......@@ -105,6 +105,8 @@ class MenuViewController: AutolayoutViewController {
override func viewDidLoad() {
super.viewDidLoad()
modalPresentationCapturesStatusBarAppearance = true
imvAvatar.image = Asset.imageRobot.image
labelVersion.text = Macros.localizedVersionFullString()
......@@ -385,8 +387,8 @@ extension MenuViewController: UITableViewDataSource, UITableViewDelegate {
} else {
let sectionItems = allItems[indexPath.section - 1]
let item = sectionItems[indexPath.row]
tableView.deselectRow(at: indexPath, animated: true)
guard (item != .logout) else {
tableView.deselectRow(at: indexPath, animated: true)
logOut()
return
}
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="boO-X9-UIe">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="boO-X9-UIe">
<device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
......@@ -1352,7 +1352,7 @@
<!--Side Menu Navigation Controller-->
<scene sceneID="Xf0-2s-sV4">
<objects>
<navigationController navigationBarHidden="YES" id="kH0-rw-uGL" customClass="UISideMenuNavigationController" customModule="SideMenu" sceneMemberID="viewController">
<navigationController storyboardIdentifier="SideMenuNavigationController" navigationBarHidden="YES" id="kH0-rw-uGL" customClass="UISideMenuNavigationController" customModule="SideMenu" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="vQq-KR-4e0">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment