Unverified Commit 48ec2b0c authored by Zach Knox's avatar Zach Knox
Browse files

Merge branch 'superfluousness' into issue25-addingSearchFeature

parents 0b9af0b0 c54dbd62
......@@ -13,7 +13,8 @@ pod 'ObjectMapper', '~> 3.0'
#pod 'Segmentio', '~> 2.1'
pod 'DeckTransition', '~> 1.4.0'
pod 'DeckTransition', '~> 1.4.0'
end
......@@ -23,4 +24,7 @@ post_install do |installer|
config.build_settings['SWIFT_VERSION'] = '3.1'
end
end
end
require 'fileutils'
FileUtils.cp_r('Pods/Target Support Files/Pods-WhatsOpen/Pods-WhatsOpen-Acknowledgements.plist', 'WhatsOpen/Settings.bundle/Acknowledgements.plist', :remove_destination => true)
end
......@@ -18,6 +18,6 @@ SPEC CHECKSUMS:
Realm: 6f23fd1f178a09342eac21bfa7c2bf4312a7a180
RealmSwift: 695393add1b8f9d5fa75dd16e6355cf3935f71e2
PODFILE CHECKSUM: 5595b2ebe2214e0d557d3eac7bdc9dbb3b2edf20
PODFILE CHECKSUM: 00681e73744ee4b38807e182fb093bc825facfb8
COCOAPODS: 1.3.1
......@@ -18,6 +18,6 @@ SPEC CHECKSUMS:
Realm: 6f23fd1f178a09342eac21bfa7c2bf4312a7a180
RealmSwift: 695393add1b8f9d5fa75dd16e6355cf3935f71e2
PODFILE CHECKSUM: 5595b2ebe2214e0d557d3eac7bdc9dbb3b2edf20
PODFILE CHECKSUM: 00681e73744ee4b38807e182fb093bc825facfb8
COCOAPODS: 1.3.1
......@@ -20,6 +20,8 @@
927C80DA1EB02566009079AD /* SettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927C80D91EB02566009079AD /* SettingsTableViewController.swift */; };
927C80DC1EB18B89009079AD /* FiltersTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927C80DB1EB18B89009079AD /* FiltersTableViewController.swift */; };
92EA81971FB7D1B500B1F6E3 /* PaddedUILabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92EA81961FB7D1B500B1F6E3 /* PaddedUILabel.swift */; };
92F681581FC1353700393DF4 /* Pods-WhatsOpen-acknowledgements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 92F681571FC1353700393DF4 /* Pods-WhatsOpen-acknowledgements.plist */; };
92F6815A1FC137CF00393DF4 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 92F681591FC137CF00393DF4 /* Settings.bundle */; };
CD3C97491DC18AB300A84434 /* SRCTNetworkController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3C97481DC18AB300A84434 /* SRCTNetworkController.swift */; };
CD466DD21DC12E1200E44DF5 /* MainTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD466DD11DC12E1200E44DF5 /* MainTableViewController.swift */; };
CD763A7A1DE24EF100ADFD6B /* examplejson.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD763A791DE24EF100ADFD6B /* examplejson.swift */; };
......@@ -58,6 +60,8 @@
927C80D91EB02566009079AD /* SettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewController.swift; sourceTree = "<group>"; };
927C80DB1EB18B89009079AD /* FiltersTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FiltersTableViewController.swift; sourceTree = "<group>"; };
92EA81961FB7D1B500B1F6E3 /* PaddedUILabel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = PaddedUILabel.swift; path = WhatsOpen/PaddedUILabel.swift; sourceTree = SOURCE_ROOT; };
92F681571FC1353700393DF4 /* Pods-WhatsOpen-acknowledgements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Pods-WhatsOpen-acknowledgements.plist"; path = "Pods/Target Support Files/Pods-WhatsOpen/Pods-WhatsOpen-acknowledgements.plist"; sourceTree = SOURCE_ROOT; };
92F681591FC137CF00393DF4 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = "<group>"; };
CD3C97481DC18AB300A84434 /* SRCTNetworkController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SRCTNetworkController.swift; sourceTree = "<group>"; };
CD466DD11DC12E1200E44DF5 /* MainTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainTableViewController.swift; sourceTree = "<group>"; };
CD763A791DE24EF100ADFD6B /* examplejson.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = examplejson.swift; path = "Object Model/examplejson.swift"; sourceTree = "<group>"; };
......@@ -158,6 +162,8 @@
CD81F5231DC0334600009FBD /* Assets.xcassets */,
CD81F5251DC0334600009FBD /* LaunchScreen.storyboard */,
CD81F5281DC0334600009FBD /* Info.plist */,
92F681571FC1353700393DF4 /* Pods-WhatsOpen-acknowledgements.plist */,
92F681591FC137CF00393DF4 /* Settings.bundle */,
);
path = WhatsOpen;
sourceTree = "<group>";
......@@ -278,7 +284,9 @@
files = (
CD81F5271DC0334600009FBD /* LaunchScreen.storyboard in Resources */,
CD81F5241DC0334600009FBD /* Assets.xcassets in Resources */,
92F6815A1FC137CF00393DF4 /* Settings.bundle in Resources */,
CD81F5221DC0334600009FBD /* Main.storyboard in Resources */,
92F681581FC1353700393DF4 /* Pods-WhatsOpen-acknowledgements.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -420,7 +428,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.iameyad.WhatsOpenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WhatsOpen.app/WhatsOpen";
};
name = Debug;
......@@ -437,7 +445,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.iameyad.WhatsOpenTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WhatsOpen.app/WhatsOpen";
};
name = Release;
......
......@@ -242,21 +242,12 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="Setting" textLabel="YYL-gW-pTv" style="IBUITableViewCellStyleDefault" id="uHy-SO-4Zr" customClass="SettingTableViewCell" customModule="WhatsOpen" customModuleProvider="target">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="Setting" id="MpR-m9-gxz" customClass="SettingTableViewCell" customModule="WhatsOpen" customModuleProvider="target">
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="uHy-SO-4Zr" id="fwy-U7-SfD">
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="MpR-m9-gxz" id="02L-z7-axi">
<rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="YYL-gW-pTv">
<rect key="frame" x="16" y="0.0" width="324" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
......@@ -295,21 +286,12 @@
<constraint firstAttribute="height" constant="448" id="Uxj-Pv-2Wp"/>
</constraints>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="Contributor" textLabel="F8Q-2j-FvC" style="IBUITableViewCellStyleDefault" id="vNs-gw-3rv" customClass="SettingTableViewCell" customModule="WhatsOpen" customModuleProvider="target">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="Contributor" id="DZv-0b-0Ge" customClass="SettingTableViewCell" customModule="WhatsOpen" customModuleProvider="target">
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="vNs-gw-3rv" id="SMa-15-IiV">
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="DZv-0b-0Ge" id="RZ6-f8-U0c">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="F8Q-2j-FvC">
<rect key="frame" x="15" y="0.0" width="345" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
......
......@@ -26,6 +26,7 @@ class SettingTableViewCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
......
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>Acknowledgements</string>
<key>File</key>
<string>Acknowledgements</string>
</dict>
</array>
</dict>
</plist>
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......@@ -41,6 +41,7 @@ class AboutScreenViewController: UIViewController, UITableViewDelegate, UITableV
"Eyad Hasan",
"Zach Knox",
"Patrick Murray",
"Zac Wood",
"Jason Yeomans"
]
......@@ -53,7 +54,6 @@ class AboutScreenViewController: UIViewController, UITableViewDelegate, UITableV
default:
return 0
}
return contributors.count
}
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
......
......@@ -10,7 +10,7 @@ import UIKit
import SafariServices
import MessageUI
class SettingsTableViewController: UITableViewController {
class SettingsTableViewController: UITableViewController, MFMailComposeViewControllerDelegate {
override var preferredStatusBarStyle: UIStatusBarStyle {
return .default
......@@ -23,6 +23,9 @@ class SettingsTableViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
tableView.estimatedRowHeight = 44.0
tableView.rowHeight = UITableViewAutomaticDimension
// Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false
......@@ -95,8 +98,20 @@ class SettingsTableViewController: UITableViewController {
self.showDetailViewController(SFSafariViewController(url: settingcell.linkURL!), sender: settingcell)
}
else if settingcell.textLabel?.text == "Are Our Hours Wrong?" {
let mailvc = settingcell.initMail(subject: "What's Open - Your Hours are Wrong", to: "srct@gmu.edu")
self.showDetailViewController(mailvc, sender: cell)
let mailvc = initMail(subject: "What's Open - Your Hours are Wrong", to: "srct@gmu.edu")
if !MFMailComposeViewController.canSendMail() {
/*
let alert = UIAlertController(title: "Mail Not Available", message: "Make sure your mail account is properly set up.", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Default action"), style: .`default`, handler: { _ in
NSLog("The \"OK\" alert occured.")
}))
present(alert, animated: true)
*/
// Do literally nothing
}
else {
present(mailvc, animated: true)
}
}
else if settingcell.textLabel!.text == "About What's Open" {
let avc = self.storyboard?.instantiateViewController(withIdentifier: "about")
......@@ -108,6 +123,25 @@ class SettingsTableViewController: UITableViewController {
}
}
func initMail(subject: String, to: String) -> MFMailComposeViewController {
let mailto = MFMailComposeViewController()
mailto.mailComposeDelegate = self
mailto.setSubject(subject)
mailto.setToRecipients([to])
let df = DateFormatter()
let now = Date()
mailto.setMessageBody("\n\n"+df.string(from: now), isHTML: false)
return mailto
}
func mailComposeController(_ controller: MFMailComposeViewController,
didFinishWith result: MFMailComposeResult, error: Error?) {
// Check the result or perform other tasks.
// Dismiss the mail compose view controller.
controller.dismiss(animated: true, completion: nil)
}
/*
// Override to support conditional editing of the table view.
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
......
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