Skip to content

Commit

Permalink
Added navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
jogendra committed Mar 31, 2018
1 parent 87b9fcc commit 6dc9eaa
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
7 changes: 7 additions & 0 deletions Phimpme/Controllers/GalleryViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,12 @@ class GalleryViewController: UIViewController {
// Do any additional setup after loading the view, typically from a nib.
}

@IBAction func didTapSettingsMenu(_ sender: Any) {
let settingsStoryboard = UIStoryboard(name: "Main", bundle: nil)
let settingsViewController = settingsStoryboard.instantiateViewController(withIdentifier: "settingsVC")
if let navigation = navigationController {
navigation.pushViewController(settingsViewController, animated: true)
}
}
}

2 changes: 1 addition & 1 deletion Phimpme/Controllers/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SettingsViewController: UITableViewController {
}

override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath)
let cell = tableView.dequeueReusableCell(withIdentifier: ControllerConstants.settingsCellIdentifier, for: indexPath)

return cell
}
Expand Down
1 change: 1 addition & 0 deletions Phimpme/Helpers/ControllerConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import UIKit
class ControllerConstants {

static let accountsCellIdentifier: String = "accountsCell"
static let settingsCellIdentifier: String = "settingsCell"

struct Accounts {
static let facebook: String = "Facebook"
Expand Down
7 changes: 5 additions & 2 deletions Phimpme/Storyboards/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
<rightBarButtonItems>
<barButtonItem image="more" id="5Zu-JE-Muv">
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<action selector="didTapSettingsMenu:" destination="OCr-eo-OQf" id="efj-DE-tqc"/>
</connections>
</barButtonItem>
<barButtonItem image="total-photos" id="7az-Fk-UoF">
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
Expand All @@ -48,14 +51,14 @@
<!--Settings View Controller-->
<scene sceneID="9Da-h7-nOB">
<objects>
<tableViewController id="vJg-oZ-rHb" customClass="SettingsViewController" customModule="Phimpme" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController storyboardIdentifier="settingsVC" useStoryboardIdentifierAsRestorationIdentifier="YES" id="vJg-oZ-rHb" customClass="SettingsViewController" customModule="Phimpme" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="5yt-7z-KEq">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" textLabel="czg-JT-gGw" detailTextLabel="ZET-0d-Zpa" style="IBUITableViewCellStyleSubtitle" id="Xmb-P2-Wl2">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="settingsCell" textLabel="czg-JT-gGw" detailTextLabel="ZET-0d-Zpa" style="IBUITableViewCellStyleSubtitle" id="Xmb-P2-Wl2">
<rect key="frame" x="0.0" y="28" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Xmb-P2-Wl2" id="BXt-2y-a1r">
Expand Down

0 comments on commit 6dc9eaa

Please sign in to comment.