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' ...@@ -13,7 +13,8 @@ pod 'ObjectMapper', '~> 3.0'
#pod 'Segmentio', '~> 2.1' #pod 'Segmentio', '~> 2.1'
pod 'DeckTransition', '~> 1.4.0' pod 'DeckTransition', '~> 1.4.0'
end end
...@@ -23,4 +24,7 @@ post_install do |installer| ...@@ -23,4 +24,7 @@ post_install do |installer|
config.build_settings['SWIFT_VERSION'] = '3.1' config.build_settings['SWIFT_VERSION'] = '3.1'
end end
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: ...@@ -18,6 +18,6 @@ SPEC CHECKSUMS:
Realm: 6f23fd1f178a09342eac21bfa7c2bf4312a7a180 Realm: 6f23fd1f178a09342eac21bfa7c2bf4312a7a180
RealmSwift: 695393add1b8f9d5fa75dd16e6355cf3935f71e2 RealmSwift: 695393add1b8f9d5fa75dd16e6355cf3935f71e2
PODFILE CHECKSUM: 5595b2ebe2214e0d557d3eac7bdc9dbb3b2edf20 PODFILE CHECKSUM: 00681e73744ee4b38807e182fb093bc825facfb8
COCOAPODS: 1.3.1 COCOAPODS: 1.3.1
...@@ -18,6 +18,6 @@ SPEC CHECKSUMS: ...@@ -18,6 +18,6 @@ SPEC CHECKSUMS:
Realm: 6f23fd1f178a09342eac21bfa7c2bf4312a7a180 Realm: 6f23fd1f178a09342eac21bfa7c2bf4312a7a180
RealmSwift: 695393add1b8f9d5fa75dd16e6355cf3935f71e2 RealmSwift: 695393add1b8f9d5fa75dd16e6355cf3935f71e2
PODFILE CHECKSUM: 5595b2ebe2214e0d557d3eac7bdc9dbb3b2edf20 PODFILE CHECKSUM: 00681e73744ee4b38807e182fb093bc825facfb8
COCOAPODS: 1.3.1 COCOAPODS: 1.3.1
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
927C80DA1EB02566009079AD /* SettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927C80D91EB02566009079AD /* SettingsTableViewController.swift */; }; 927C80DA1EB02566009079AD /* SettingsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927C80D91EB02566009079AD /* SettingsTableViewController.swift */; };
927C80DC1EB18B89009079AD /* FiltersTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927C80DB1EB18B89009079AD /* FiltersTableViewController.swift */; }; 927C80DC1EB18B89009079AD /* FiltersTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 927C80DB1EB18B89009079AD /* FiltersTableViewController.swift */; };
92EA81971FB7D1B500B1F6E3 /* PaddedUILabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92EA81961FB7D1B500B1F6E3 /* PaddedUILabel.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 */; }; CD3C97491DC18AB300A84434 /* SRCTNetworkController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD3C97481DC18AB300A84434 /* SRCTNetworkController.swift */; };
CD466DD21DC12E1200E44DF5 /* MainTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD466DD11DC12E1200E44DF5 /* MainTableViewController.swift */; }; CD466DD21DC12E1200E44DF5 /* MainTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD466DD11DC12E1200E44DF5 /* MainTableViewController.swift */; };
CD763A7A1DE24EF100ADFD6B /* examplejson.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD763A791DE24EF100ADFD6B /* examplejson.swift */; }; CD763A7A1DE24EF100ADFD6B /* examplejson.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD763A791DE24EF100ADFD6B /* examplejson.swift */; };
...@@ -58,6 +60,8 @@ ...@@ -58,6 +60,8 @@
927C80D91EB02566009079AD /* SettingsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsTableViewController.swift; sourceTree = "<group>"; }; 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>"; }; 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; }; 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>"; }; 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>"; }; 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>"; }; CD763A791DE24EF100ADFD6B /* examplejson.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = examplejson.swift; path = "Object Model/examplejson.swift"; sourceTree = "<group>"; };
...@@ -158,6 +162,8 @@ ...@@ -158,6 +162,8 @@
CD81F5231DC0334600009FBD /* Assets.xcassets */, CD81F5231DC0334600009FBD /* Assets.xcassets */,
CD81F5251DC0334600009FBD /* LaunchScreen.storyboard */, CD81F5251DC0334600009FBD /* LaunchScreen.storyboard */,
CD81F5281DC0334600009FBD /* Info.plist */, CD81F5281DC0334600009FBD /* Info.plist */,
92F681571FC1353700393DF4 /* Pods-WhatsOpen-acknowledgements.plist */,
92F681591FC137CF00393DF4 /* Settings.bundle */,
); );
path = WhatsOpen; path = WhatsOpen;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -278,7 +284,9 @@ ...@@ -278,7 +284,9 @@
files = ( files = (
CD81F5271DC0334600009FBD /* LaunchScreen.storyboard in Resources */, CD81F5271DC0334600009FBD /* LaunchScreen.storyboard in Resources */,
CD81F5241DC0334600009FBD /* Assets.xcassets in Resources */, CD81F5241DC0334600009FBD /* Assets.xcassets in Resources */,
92F6815A1FC137CF00393DF4 /* Settings.bundle in Resources */,
CD81F5221DC0334600009FBD /* Main.storyboard in Resources */, CD81F5221DC0334600009FBD /* Main.storyboard in Resources */,
92F681581FC1353700393DF4 /* Pods-WhatsOpen-acknowledgements.plist in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -420,7 +428,7 @@ ...@@ -420,7 +428,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.iameyad.WhatsOpenTests; PRODUCT_BUNDLE_IDENTIFIER = com.iameyad.WhatsOpenTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0; SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WhatsOpen.app/WhatsOpen"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WhatsOpen.app/WhatsOpen";
}; };
name = Debug; name = Debug;
...@@ -437,7 +445,7 @@ ...@@ -437,7 +445,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.iameyad.WhatsOpenTests; PRODUCT_BUNDLE_IDENTIFIER = com.iameyad.WhatsOpenTests;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0; SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WhatsOpen.app/WhatsOpen"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WhatsOpen.app/WhatsOpen";
}; };
name = Release; name = Release;
......
...@@ -242,21 +242,12 @@ ...@@ -242,21 +242,12 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<prototypes> <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"/> <rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <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"/> <rect key="frame" x="0.0" y="0.0" width="341" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <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> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
</prototypes> </prototypes>
...@@ -295,21 +286,12 @@ ...@@ -295,21 +286,12 @@
<constraint firstAttribute="height" constant="448" id="Uxj-Pv-2Wp"/> <constraint firstAttribute="height" constant="448" id="Uxj-Pv-2Wp"/>
</constraints> </constraints>
<prototypes> <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"/> <rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <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"/> <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/> <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> </tableViewCellContentView>
</tableViewCell> </tableViewCell>
</prototypes> </prototypes>
......
...@@ -26,6 +26,7 @@ class SettingTableViewCell: UITableViewCell { ...@@ -26,6 +26,7 @@ class SettingTableViewCell: UITableViewCell {
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
// Initialization code // Initialization code
} }
override func setSelected(_ selected: Bool, animated: Bool) { 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. */ 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 ...@@ -41,6 +41,7 @@ class AboutScreenViewController: UIViewController, UITableViewDelegate, UITableV
"Eyad Hasan", "Eyad Hasan",
"Zach Knox", "Zach Knox",
"Patrick Murray", "Patrick Murray",
"Zac Wood",
"Jason Yeomans" "Jason Yeomans"
] ]
...@@ -53,7 +54,6 @@ class AboutScreenViewController: UIViewController, UITableViewDelegate, UITableV ...@@ -53,7 +54,6 @@ class AboutScreenViewController: UIViewController, UITableViewDelegate, UITableV
default: default:
return 0 return 0
} }
return contributors.count
} }
func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
......
...@@ -10,7 +10,7 @@ import UIKit ...@@ -10,7 +10,7 @@ import UIKit
import SafariServices import SafariServices
import MessageUI import MessageUI
class SettingsTableViewController: UITableViewController { class SettingsTableViewController: UITableViewController, MFMailComposeViewControllerDelegate {
override var preferredStatusBarStyle: UIStatusBarStyle { override var preferredStatusBarStyle: UIStatusBarStyle {
return .default return .default
...@@ -22,6 +22,9 @@ class SettingsTableViewController: UITableViewController { ...@@ -22,6 +22,9 @@ class SettingsTableViewController: UITableViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
tableView.estimatedRowHeight = 44.0
tableView.rowHeight = UITableViewAutomaticDimension
// Uncomment the following line to preserve selection between presentations // Uncomment the following line to preserve selection between presentations
// self.clearsSelectionOnViewWillAppear = false // self.clearsSelectionOnViewWillAppear = false
...@@ -95,8 +98,20 @@ class SettingsTableViewController: UITableViewController { ...@@ -95,8 +98,20 @@ class SettingsTableViewController: UITableViewController {
self.showDetailViewController(SFSafariViewController(url: settingcell.linkURL!), sender: settingcell) self.showDetailViewController(SFSafariViewController(url: settingcell.linkURL!), sender: settingcell)
} }
else if settingcell.textLabel?.text == "Are Our Hours Wrong?" { 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") let mailvc = initMail(subject: "What's Open - Your Hours are Wrong", to: "srct@gmu.edu")
self.showDetailViewController(mailvc, sender: cell) 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" { else if settingcell.textLabel!.text == "About What's Open" {
let avc = self.storyboard?.instantiateViewController(withIdentifier: "about") let avc = self.storyboard?.instantiateViewController(withIdentifier: "about")
...@@ -107,6 +122,25 @@ class SettingsTableViewController: UITableViewController { ...@@ -107,6 +122,25 @@ class SettingsTableViewController: UITableViewController {
return return
} }
} }
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 to support conditional editing of the table view.
......
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