checkpoint
This commit is contained in:
parent
ddf3ad28ae
commit
49f29a9e50
@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
505AFEF8229FE1BD004FF0F1 /* settingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505AFEF7229FE1BD004FF0F1 /* settingsViewController.swift */; };
|
505AFEF8229FE1BD004FF0F1 /* settingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505AFEF7229FE1BD004FF0F1 /* settingsViewController.swift */; };
|
||||||
505AFEFC22A154EB004FF0F1 /* TableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505AFEFB22A154EB004FF0F1 /* TableViewCell.swift */; };
|
|
||||||
50A7ADD5229D6A4200D58743 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A7ADD4229D6A4200D58743 /* AppDelegate.swift */; };
|
50A7ADD5229D6A4200D58743 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A7ADD4229D6A4200D58743 /* AppDelegate.swift */; };
|
||||||
50A7ADD7229D6A4200D58743 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A7ADD6229D6A4200D58743 /* ViewController.swift */; };
|
50A7ADD7229D6A4200D58743 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50A7ADD6229D6A4200D58743 /* ViewController.swift */; };
|
||||||
50A7ADDA229D6A4200D58743 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 50A7ADD8229D6A4200D58743 /* Main.storyboard */; };
|
50A7ADDA229D6A4200D58743 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 50A7ADD8229D6A4200D58743 /* Main.storyboard */; };
|
||||||
@ -22,11 +21,11 @@
|
|||||||
50A7AE02229D7B1100D58743 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50A7AE01229D7B1100D58743 /* MapKit.framework */; };
|
50A7AE02229D7B1100D58743 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50A7AE01229D7B1100D58743 /* MapKit.framework */; };
|
||||||
50A9B4E1229E115B00070F61 /* Video.mov in Resources */ = {isa = PBXBuildFile; fileRef = 50A9B4E0229E115B00070F61 /* Video.mov */; };
|
50A9B4E1229E115B00070F61 /* Video.mov in Resources */ = {isa = PBXBuildFile; fileRef = 50A9B4E0229E115B00070F61 /* Video.mov */; };
|
||||||
50C69B1122A16A7100EA99C1 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C69B1022A16A7100EA99C1 /* TableViewController.swift */; };
|
50C69B1122A16A7100EA99C1 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C69B1022A16A7100EA99C1 /* TableViewController.swift */; };
|
||||||
|
50C69B1322A19D8800EA99C1 /* NewTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50C69B1222A19D8800EA99C1 /* NewTableViewCell.swift */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
505AFEF7229FE1BD004FF0F1 /* settingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = settingsViewController.swift; sourceTree = "<group>"; };
|
505AFEF7229FE1BD004FF0F1 /* settingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = settingsViewController.swift; sourceTree = "<group>"; };
|
||||||
505AFEFB22A154EB004FF0F1 /* TableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewCell.swift; sourceTree = "<group>"; };
|
|
||||||
50A7ADD1229D6A4200D58743 /* Guibe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Guibe.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
50A7ADD1229D6A4200D58743 /* Guibe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Guibe.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
50A7ADD4229D6A4200D58743 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
50A7ADD4229D6A4200D58743 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
50A7ADD6229D6A4200D58743 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
50A7ADD6229D6A4200D58743 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
|
||||||
@ -43,6 +42,7 @@
|
|||||||
50A7AE05229D7B1E00D58743 /* Guibe.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Guibe.entitlements; sourceTree = "<group>"; };
|
50A7AE05229D7B1E00D58743 /* Guibe.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Guibe.entitlements; sourceTree = "<group>"; };
|
||||||
50A9B4E0229E115B00070F61 /* Video.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = Video.mov; sourceTree = "<group>"; };
|
50A9B4E0229E115B00070F61 /* Video.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = Video.mov; sourceTree = "<group>"; };
|
||||||
50C69B1022A16A7100EA99C1 /* TableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = "<group>"; };
|
50C69B1022A16A7100EA99C1 /* TableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = "<group>"; };
|
||||||
|
50C69B1222A19D8800EA99C1 /* NewTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTableViewCell.swift; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@ -83,9 +83,9 @@
|
|||||||
50A7ADD6229D6A4200D58743 /* ViewController.swift */,
|
50A7ADD6229D6A4200D58743 /* ViewController.swift */,
|
||||||
50A7ADE6229D6C7100D58743 /* Assets.xcassets */,
|
50A7ADE6229D6C7100D58743 /* Assets.xcassets */,
|
||||||
50A7ADD8229D6A4200D58743 /* Main.storyboard */,
|
50A7ADD8229D6A4200D58743 /* Main.storyboard */,
|
||||||
505AFEFB22A154EB004FF0F1 /* TableViewCell.swift */,
|
|
||||||
50A7ADFE229D768900D58743 /* MainViewController.swift */,
|
50A7ADFE229D768900D58743 /* MainViewController.swift */,
|
||||||
50C69B1022A16A7100EA99C1 /* TableViewController.swift */,
|
50C69B1022A16A7100EA99C1 /* TableViewController.swift */,
|
||||||
|
50C69B1222A19D8800EA99C1 /* NewTableViewCell.swift */,
|
||||||
505AFEF7229FE1BD004FF0F1 /* settingsViewController.swift */,
|
505AFEF7229FE1BD004FF0F1 /* settingsViewController.swift */,
|
||||||
50A7ADFC229D766800D58743 /* 7_ReadyViewController.swift */,
|
50A7ADFC229D766800D58743 /* 7_ReadyViewController.swift */,
|
||||||
50A7ADF4229D75A900D58743 /* 3_StartViewController.swift */,
|
50A7ADF4229D75A900D58743 /* 3_StartViewController.swift */,
|
||||||
@ -195,9 +195,9 @@
|
|||||||
50A7ADF9229D75C100D58743 /* 5_HandChoiceViewController.swift in Sources */,
|
50A7ADF9229D75C100D58743 /* 5_HandChoiceViewController.swift in Sources */,
|
||||||
50A7ADD7229D6A4200D58743 /* ViewController.swift in Sources */,
|
50A7ADD7229D6A4200D58743 /* ViewController.swift in Sources */,
|
||||||
50C69B1122A16A7100EA99C1 /* TableViewController.swift in Sources */,
|
50C69B1122A16A7100EA99C1 /* TableViewController.swift in Sources */,
|
||||||
505AFEFC22A154EB004FF0F1 /* TableViewCell.swift in Sources */,
|
|
||||||
50A7ADF5229D75A900D58743 /* 3_StartViewController.swift in Sources */,
|
50A7ADF5229D75A900D58743 /* 3_StartViewController.swift in Sources */,
|
||||||
50A7ADD5229D6A4200D58743 /* AppDelegate.swift in Sources */,
|
50A7ADD5229D6A4200D58743 /* AppDelegate.swift in Sources */,
|
||||||
|
50C69B1322A19D8800EA99C1 /* NewTableViewCell.swift in Sources */,
|
||||||
50A7ADFF229D768900D58743 /* MainViewController.swift in Sources */,
|
50A7ADFF229D768900D58743 /* MainViewController.swift in Sources */,
|
||||||
50A7ADFB229D75E900D58743 /* 6_SideChoiceViewController.swift in Sources */,
|
50A7ADFB229D75E900D58743 /* 6_SideChoiceViewController.swift in Sources */,
|
||||||
505AFEF8229FE1BD004FF0F1 /* settingsViewController.swift in Sources */,
|
505AFEF8229FE1BD004FF0F1 /* settingsViewController.swift in Sources */,
|
||||||
|
|||||||
@ -314,7 +314,6 @@
|
|||||||
<outlet property="searchBar" destination="dRT-vj-1ew" id="nAa-5O-h0R"/>
|
<outlet property="searchBar" destination="dRT-vj-1ew" id="nAa-5O-h0R"/>
|
||||||
<outlet property="searchBarBg" destination="3Xt-Rr-hs1" id="6bL-cK-ScI"/>
|
<outlet property="searchBarBg" destination="3Xt-Rr-hs1" id="6bL-cK-ScI"/>
|
||||||
<outlet property="searchView" destination="bKl-Ku-mh1" id="d0n-Pl-NrK"/>
|
<outlet property="searchView" destination="bKl-Ku-mh1" id="d0n-Pl-NrK"/>
|
||||||
<outlet property="tableView" destination="402-5S-nhO" id="Olu-VK-Sqm"/>
|
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="a4w-SB-1GS" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="a4w-SB-1GS" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
@ -329,53 +328,64 @@
|
|||||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="70" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="402-5S-nhO">
|
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="100" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="402-5S-nhO">
|
||||||
<rect key="frame" x="0.0" y="305" width="414" height="327"/>
|
<rect key="frame" x="0.0" y="305" width="414" height="591"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
<prototypes>
|
<prototypes>
|
||||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="cell" id="87K-Xo-0a5" customClass="TableViewCell" customModule="Guibe" customModuleProvider="target">
|
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="cell" rowHeight="90" id="87K-Xo-0a5" customClass="NewTableViewCell" customModule="Guibe" customModuleProvider="target">
|
||||||
<rect key="frame" x="0.0" y="28" width="414" height="70"/>
|
<rect key="frame" x="0.0" y="28" width="414" height="90"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="87K-Xo-0a5" id="2HV-Qz-1Wd">
|
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="87K-Xo-0a5" id="2HV-Qz-1Wd" customClass="NewTableViewCell" customModule="Guibe" customModuleProvider="target">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="414" height="69.666666666666671"/>
|
<rect key="frame" x="0.0" y="0.0" width="414" height="89.666666666666671"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dkn-bo-t7u">
|
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9iK-CB-Rc6">
|
||||||
<rect key="frame" x="20" y="24" width="42" height="21"/>
|
<rect key="frame" x="0.0" y="0.0" width="414" height="90"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="goPressed:" destination="87K-Xo-0a5" eventType="touchUpInside" id="fxz-cj-oJk"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Name" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mlZ-q9-9a8">
|
||||||
|
<rect key="frame" x="20" y="11" width="374" height="39"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<fontDescription key="fontDescription" type="boldSystem" pointSize="20"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Phone number" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bBb-Ag-DTw">
|
||||||
|
<rect key="frame" x="20" y="58" width="374" height="21"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
<nil key="textColor"/>
|
<nil key="textColor"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9iK-CB-Rc6">
|
|
||||||
<rect key="frame" x="0.0" y="0.0" width="414" height="70"/>
|
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
|
||||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
|
||||||
<connections>
|
|
||||||
<action selector="goPressed:" destination="87K-Xo-0a5" eventType="touchUpInside" id="SRQ-zj-5qd"/>
|
|
||||||
</connections>
|
|
||||||
</button>
|
|
||||||
</subviews>
|
</subviews>
|
||||||
</tableViewCellContentView>
|
</tableViewCellContentView>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="cellLbl" destination="dkn-bo-t7u" id="7i1-bd-98c"/>
|
<outlet property="primaryLbl" destination="mlZ-q9-9a8" id="Rh6-Gy-EV3"/>
|
||||||
|
<outlet property="secondaryLbl" destination="bBb-Ag-DTw" id="dQc-es-DNn"/>
|
||||||
</connections>
|
</connections>
|
||||||
</tableViewCell>
|
</tableViewCell>
|
||||||
</prototypes>
|
</prototypes>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="dataSource" destination="Ovf-sw-BKp" id="FAs-3b-SXl"/>
|
<outlet property="dataSource" destination="jBr-V0-GbL" id="wBX-eF-5Hf"/>
|
||||||
<outlet property="delegate" destination="Ovf-sw-BKp" id="Roe-ew-ZBn"/>
|
<outlet property="delegate" destination="jBr-V0-GbL" id="JWz-Zv-Onp"/>
|
||||||
</connections>
|
</connections>
|
||||||
</tableView>
|
</tableView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
<viewLayoutGuide key="safeArea" id="WeT-3n-RQD"/>
|
<viewLayoutGuide key="safeArea" id="WeT-3n-RQD"/>
|
||||||
</view>
|
</view>
|
||||||
|
<connections>
|
||||||
|
<outlet property="tableView" destination="402-5S-nhO" id="Qnx-3U-4Gl"/>
|
||||||
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="sgH-Ai-Lho" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="sgH-Ai-Lho" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="883" y="1485"/>
|
<point key="canvasLocation" x="882.60869565217399" y="1484.5982142857142"/>
|
||||||
</scene>
|
</scene>
|
||||||
<!--Settings View Controller-->
|
<!--Settings View Controller-->
|
||||||
<scene sceneID="B3S-T4-83q">
|
<scene sceneID="B3S-T4-83q">
|
||||||
|
|||||||
@ -252,7 +252,6 @@ extension MainViewController: CLLocationManagerDelegate {
|
|||||||
|
|
||||||
extension MainViewController: UISearchBarDelegate {
|
extension MainViewController: UISearchBarDelegate {
|
||||||
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
|
func searchBarSearchButtonClicked(_ searchBar: UISearchBar) {
|
||||||
print("Here2")
|
|
||||||
searchBar.endEditing(true) //HIDES LE KEYBOARD
|
searchBar.endEditing(true) //HIDES LE KEYBOARD
|
||||||
|
|
||||||
let localSearchRequest = MKLocalSearch.Request()
|
let localSearchRequest = MKLocalSearch.Request()
|
||||||
@ -266,8 +265,8 @@ extension MainViewController: UISearchBarDelegate {
|
|||||||
resultsViewController.searchResults = response.mapItems
|
resultsViewController.searchResults = response.mapItems
|
||||||
resultsViewController.modalTransitionStyle = .coverVertical
|
resultsViewController.modalTransitionStyle = .coverVertical
|
||||||
self.present(resultsViewController, animated: true, completion: nil)
|
self.present(resultsViewController, animated: true, completion: nil)
|
||||||
guard let firstMapItem = response.mapItems.first else { return }
|
// guard let firstMapItem = response.mapItems.first else { return }
|
||||||
self.getDirections(to: firstMapItem)
|
// self.getDirections(to: firstMapItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// TableViewCell.swift
|
// NewTableViewCell.swift
|
||||||
// Guibe
|
// Guibe
|
||||||
//
|
//
|
||||||
// Created by Max Hunt on 31/05/2019.
|
// Created by Max Hunt on 31/05/2019.
|
||||||
@ -8,22 +8,25 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
|
|
||||||
protocol tableViewProtocol {
|
protocol tableViewProtocol {
|
||||||
func onClickCell(index: Int)
|
func onClickCell(index: Int)
|
||||||
}
|
}
|
||||||
|
|
||||||
class TableViewCell: UITableViewCell {
|
|
||||||
|
|
||||||
@IBOutlet weak var cellLbl: UILabel!
|
class NewTableViewCell: UITableViewCell {
|
||||||
|
|
||||||
var cellDelegate: tableViewProtocol?
|
@IBOutlet weak var primaryLbl: UILabel!
|
||||||
var index: IndexPath?
|
@IBOutlet weak var secondaryLbl: UILabel!
|
||||||
|
|
||||||
|
|
||||||
@IBAction func goPressed(_ sender: Any) {
|
@IBAction func goPressed(_ sender: Any) {
|
||||||
cellDelegate?.onClickCell(index: (index?.row)!)
|
cellDelegate?.onClickCell(index: (index?.row)!)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var cellDelegate: tableViewProtocol?
|
||||||
|
var index: IndexPath?
|
||||||
|
|
||||||
override func awakeFromNib() {
|
override func awakeFromNib() {
|
||||||
super.awakeFromNib()
|
super.awakeFromNib()
|
||||||
// Initialization code
|
// Initialization code
|
||||||
@ -31,6 +34,8 @@ class TableViewCell: UITableViewCell {
|
|||||||
|
|
||||||
override func setSelected(_ selected: Bool, animated: Bool) {
|
override func setSelected(_ selected: Bool, animated: Bool) {
|
||||||
super.setSelected(selected, animated: animated)
|
super.setSelected(selected, animated: animated)
|
||||||
|
|
||||||
|
// Configure the view for the selected state
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -11,52 +11,55 @@ import MapKit
|
|||||||
|
|
||||||
class TableViewController: UIViewController {
|
class TableViewController: UIViewController {
|
||||||
|
|
||||||
let appDelegate = UIApplication.shared.delegate as! AppDelegate
|
|
||||||
|
|
||||||
var searchResults: [MKMapItem]?
|
var searchResults: [MKMapItem]?
|
||||||
|
|
||||||
|
@IBOutlet weak var tableView: UITableView!
|
||||||
|
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
// let testData = appDelegate.navigationResults
|
// let testData = appDelegate.navigationResults
|
||||||
|
}
|
||||||
// Do any additional setup after loading the view.
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||||
/*
|
// return searchResults?.count ?? 0
|
||||||
// MARK: - Navigation
|
// }
|
||||||
|
//
|
||||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
// func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||||
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
// let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
|
||||||
// Get the new view controller using segue.destination.
|
// let row = indexPath.row
|
||||||
// Pass the selected object to the new view controller.
|
//
|
||||||
}
|
// if let item = searchResults?[row] {
|
||||||
*/
|
// print(item)
|
||||||
|
// cell.textLabel?.text = item.name
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
// return cell
|
||||||
|
// }
|
||||||
|
} // END OF CLASS
|
||||||
|
|
||||||
extension TableViewController: UITableViewDataSource, UITableViewDelegate {
|
extension TableViewController: UITableViewDataSource, UITableViewDelegate {
|
||||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||||
return self.searchResults?.count ?? 0
|
return searchResults?.count ?? 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||||
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as? TableViewCell
|
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! NewTableViewCell
|
||||||
let row = indexPath.row
|
|
||||||
|
|
||||||
if let item = searchResults?[row] {
|
let row = indexPath.row
|
||||||
cell?.cellLbl.text = item.name
|
if let result = searchResults?[row] {
|
||||||
// cell.phoneLabel.text = item.phoneNumber
|
cell.primaryLbl.text = result.name
|
||||||
|
cell.secondaryLbl.text = result.phoneNumber
|
||||||
|
cell.cellDelegate = self
|
||||||
|
cell.index = indexPath
|
||||||
}
|
}
|
||||||
// cell?.cellLbl.text = self.searchResults[indexPath.row]
|
|
||||||
// cell?.cellDelegate = self
|
return cell
|
||||||
// cell?.index = indexPath
|
|
||||||
return cell!
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension TableViewController: tableViewProtocol {
|
extension TableViewController: tableViewProtocol {
|
||||||
func onClickCell(index: Int) {
|
func onClickCell(index: Int) {
|
||||||
debugPrint("Pressed on cell number \(index)")
|
print("Going to navigate to option \(index)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user