Skip to content

Commit

Permalink
Launch screen changed back to genereric screen
Browse files Browse the repository at this point in the history
  • Loading branch information
haydeng21 committed Aug 21, 2017
1 parent 885c5ba commit 58b9297
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 129 deletions.
Binary file modified final-project/.DS_Store
Binary file not shown.
Binary file not shown.
14 changes: 8 additions & 6 deletions final-project/final-project/AllTheGuidesModel.swift

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions final-project/final-project/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.

Thread.sleep(forTimeInterval: 10.0)

IQKeyboardManager.sharedManager().enable = true

UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName : UIColor.white, NSFontAttributeName: UIFont(name: "Chalkboard SE", size: 20) as Any]
Expand Down
4 changes: 2 additions & 2 deletions final-project/final-project/AvailableLocationsModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AvailableLocations {
location(cityCommaCountry: "Cabo, Mexico", coordinate: CLLocationCoordinate2D(latitude: 22.887201, longitude: -109.905038)),
// SE Asia
location(cityCommaCountry: "Bangkok, Thailand", coordinate: CLLocationCoordinate2D(latitude: 13.756331, longitude: 100.501765)),
location(cityCommaCountry: "Chiang Mai, Thailand", coordinate: CLLocationCoordinate2D(latitude: 18.786626, longitude: 98.983727)),
/*location(cityCommaCountry: "Chiang Mai, Thailand", coordinate: CLLocationCoordinate2D(latitude: 18.786626, longitude: 98.983727)),
location(cityCommaCountry: "Pai, Thailand", coordinate: CLLocationCoordinate2D(latitude: 19.358219, longitude: 98.440486)),
location(cityCommaCountry: "Ko Phi Phi, Thailand", coordinate: CLLocationCoordinate2D(latitude: 7.740738, longitude: 98.778410)),
location(cityCommaCountry: "Ko Pha Ngan, Thailand", coordinate: CLLocationCoordinate2D(latitude: 9.747876, longitude: 100.023308)),
Expand All @@ -47,7 +47,7 @@ class AvailableLocations {
location(cityCommaCountry: "Halong Bay, Vietnam", coordinate: CLLocationCoordinate2D(latitude: 20.957823, longitude: 107.064514)),
location(cityCommaCountry: "Hue, Vietnam", coordinate: CLLocationCoordinate2D(latitude: 16.449800, longitude: 107.562350)),
location(cityCommaCountry: "Hoi An, Vietnam", coordinate: CLLocationCoordinate2D(latitude: 15.880058, longitude: 108.338047)),
location(cityCommaCountry: "Ho Chi Minh, Vietnam", coordinate: CLLocationCoordinate2D(latitude: 10.823099, longitude: 106.629664)),
location(cityCommaCountry: "Ho Chi Minh, Vietnam", coordinate: CLLocationCoordinate2D(latitude: 10.823099, longitude: 106.629664)),*/
location(cityCommaCountry: "Hong Kong, China", coordinate: CLLocationCoordinate2D(latitude: 22.283835, longitude: 114.173355)),
location(cityCommaCountry: "El Nido, Phillipines", coordinate: CLLocationCoordinate2D(latitude: 11.209709, longitude: 119.462254)),
// Africa
Expand Down
75 changes: 19 additions & 56 deletions final-project/final-project/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12118" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
Expand All @@ -22,77 +22,40 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Jacquelyn, welcome to Travel Map!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="loe-bo-1Dv">
<rect key="frame" x="16" y="158" width="343" height="32"/>
<fontDescription key="fontDescription" name="ChalkboardSE-Regular" family="Chalkboard SE" pointSize="22"/>
<color key="textColor" red="0.99991279840000002" green="1" blue="0.99988144639999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Made with love" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PkC-yV-Rfi">
<rect key="frame" x="122" y="564" width="131" height="26"/>
<constraints>
<constraint firstAttribute="width" constant="131" id="WwF-MI-ZqE"/>
</constraints>
<fontDescription key="fontDescription" name="ChalkboardSE-Regular" family="Chalkboard SE" pointSize="18"/>
<color key="textColor" red="0.96070033310000003" green="0.96083813910000004" blue="0.96067017320000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="- Hayden " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dv1-qA-mcK">
<rect key="frame" x="150" y="598" width="77" height="25"/>
<fontDescription key="fontDescription" name="ChalkboardSE-Regular" family="Chalkboard SE" pointSize="17"/>
<color key="textColor" red="0.99991279840000002" green="1" blue="0.99988144639999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Happy_Birthday" translatesAutoresizingMaskIntoConstraints="NO" id="ANW-R4-IXP">
<rect key="frame" x="16" y="41" width="343" height="90"/>
<constraints>
<constraint firstAttribute="height" constant="90" id="mBA-mK-2Zm"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="present" translatesAutoresizingMaskIntoConstraints="NO" id="qsm-0e-elr">
<rect key="frame" x="117" y="395" width="141" height="141"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="travelmap" translatesAutoresizingMaskIntoConstraints="NO" id="ggp-NY-4Hu">
<rect key="frame" x="107" y="129" width="160" height="160"/>
<constraints>
<constraint firstAttribute="width" constant="141" id="3hK-Ko-oOt"/>
<constraint firstAttribute="height" constant="141" id="YX0-XM-hQY"/>
<constraint firstAttribute="height" constant="160" id="0o1-dL-DQe"/>
<constraint firstAttribute="width" constant="160" id="PbF-7w-bOa"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="My birthday present to you!" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="I33-hB-g7N">
<rect key="frame" x="50" y="332" width="277" height="45"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Welcome to Travel Map!" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bat-2D-rsU">
<rect key="frame" x="55" y="368" width="265" height="91"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="xfJ-CD-mMd"/>
<constraint firstAttribute="height" constant="91" id="jCY-bF-cvi"/>
</constraints>
<fontDescription key="fontDescription" name="ChalkboardSE-Regular" family="Chalkboard SE" pointSize="21"/>
<color key="textColor" red="0.99991279840000002" green="1" blue="0.99988144639999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" name="ChalkboardSE-Regular" family="Chalkboard SE" pointSize="24"/>
<color key="textColor" red="0.32971346378326416" green="0.75398510694503784" blue="0.9233662486076355" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.31250062579999999" green="0.43002137540000002" blue="0.79375606779999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="ANW-R4-IXP" secondAttribute="trailing" id="2Ks-nv-su4"/>
<constraint firstItem="dv1-qA-mcK" firstAttribute="top" secondItem="PkC-yV-Rfi" secondAttribute="bottom" constant="8" id="8bJ-CY-wNL"/>
<constraint firstItem="qsm-0e-elr" firstAttribute="top" secondItem="I33-hB-g7N" secondAttribute="bottom" constant="18" id="8id-O8-C9L"/>
<constraint firstItem="I33-hB-g7N" firstAttribute="centerX" secondItem="dv1-qA-mcK" secondAttribute="centerX" id="Fpl-ut-HI3"/>
<constraint firstAttribute="leadingMargin" secondItem="ANW-R4-IXP" secondAttribute="leading" id="I7P-f6-Lhr"/>
<constraint firstItem="xb3-aO-Qok" firstAttribute="top" secondItem="dv1-qA-mcK" secondAttribute="bottom" constant="44" id="Khu-s2-8eq"/>
<constraint firstItem="loe-bo-1Dv" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="UEP-FI-DfW"/>
<constraint firstItem="dv1-qA-mcK" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" constant="1" id="Vko-Ph-aap"/>
<constraint firstItem="I33-hB-g7N" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" constant="34" id="Wtd-J5-Z1f"/>
<constraint firstItem="qsm-0e-elr" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="fxJ-4G-4aM"/>
<constraint firstItem="ANW-R4-IXP" firstAttribute="top" secondItem="Llm-lL-Icb" secondAttribute="bottom" constant="21" id="i7M-qw-kR2"/>
<constraint firstItem="ANW-R4-IXP" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="jW4-Cm-Rbq"/>
<constraint firstItem="PkC-yV-Rfi" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="r6a-a5-I0T"/>
<constraint firstItem="loe-bo-1Dv" firstAttribute="top" secondItem="ANW-R4-IXP" secondAttribute="bottom" constant="27" id="rec-ge-n5h"/>
<constraint firstItem="PkC-yV-Rfi" firstAttribute="top" secondItem="qsm-0e-elr" secondAttribute="bottom" constant="28" id="v6b-xN-CjB"/>
<constraint firstItem="ggp-NY-4Hu" firstAttribute="top" secondItem="Llm-lL-Icb" secondAttribute="bottom" constant="109" id="NDR-Bz-aGF"/>
<constraint firstItem="ggp-NY-4Hu" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="PR7-5r-0qf"/>
<constraint firstItem="bat-2D-rsU" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="h2N-zj-emT"/>
<constraint firstItem="bat-2D-rsU" firstAttribute="top" secondItem="ggp-NY-4Hu" secondAttribute="bottom" constant="79" id="jge-vV-fWq"/>
<constraint firstItem="bat-2D-rsU" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leadingMargin" constant="39" id="x8v-rN-mdE"/>
<constraint firstAttribute="trailingMargin" secondItem="bat-2D-rsU" secondAttribute="trailing" constant="39" id="xwo-US-wci"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="52" y="374.66266866566718"/>
<point key="canvasLocation" x="34.399999999999999" y="368.36581709145429"/>
</scene>
</scenes>
<resources>
<image name="Happy_Birthday" width="8000" height="1136"/>
<image name="present" width="160" height="160"/>
<image name="travelmap" width="166" height="166"/>
</resources>
</document>
18 changes: 1 addition & 17 deletions final-project/final-project/GuideEditorViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ class GuideEditorViewController: UIViewController, UIPickerViewDelegate, UIPicke

self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Done", style: .done, target: self, action: #selector(self.handleAction(_:)))

//NotificationCenter.default.addObserver(self, selector: #selector(GuideEditorViewController.keyboardWillShow), name: NSNotification.Name.UIKeyboardWillShow, object: nil)
//NotificationCenter.default.addObserver(self, selector: #selector(GuideEditorViewController.keyboardWillHide), name: NSNotification.Name.UIKeyboardWillHide, object: nil)

}

override func viewWillAppear(_ animated: Bool) {
Expand All @@ -73,21 +72,6 @@ class GuideEditorViewController: UIViewController, UIPickerViewDelegate, UIPicke
self.itemsChanged()
}

/*func keyboardWillShow(notification: NSNotification) {
if let keyboardSize = (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue {
if self.view.frame.origin.y == 0{
self.view.frame.origin.y -= keyboardSize.height
}
}
}*/

/*func keyboardWillHide(notification: NSNotification) {
if let keyboardSize = (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue {
if self.view.frame.origin.y != 0{
self.view.frame.origin.y += keyboardSize.height //- 50
}
}
}*/


@IBOutlet weak var cityPicker: UIPickerView! {
Expand Down
46 changes: 0 additions & 46 deletions final-project/final-project/MyTravelGuidesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,52 +166,6 @@ class MyTravelGuidesTableViewController: UITableViewController, AllTheGuidesMode
navigationController?.pushViewController(detailVC, animated: true)
}


/*
// Override to support conditional editing of the table view.
override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the specified item to be editable.
return true
}
*/

/*
// Override to support editing the table view.
override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCellEditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
// Delete the row from the data source
tableView.deleteRows(at: [indexPath], with: .fade)
} else if editingStyle == .insert {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
*/

/*
// Override to support rearranging the table view.
override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {

}
*/

/*
// Override to support conditional rearranging of the table view.
override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the item to be re-orderable.
return true
}
*/

/*
// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/

}


0 comments on commit 58b9297

Please sign in to comment.