Commit af0eae13 by Mobile Roshka

Agreago ListaFav, Vendedor y Buscador

parent dead08ca
......@@ -16,6 +16,16 @@
BB5A72032466114400B51D4E /* APIError.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5A72022466114400B51D4E /* APIError.swift */; };
BB5A72052466117C00B51D4E /* APISessionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5A72042466117C00B51D4E /* APISessionManager.swift */; };
BB5A7209246A1AFC00B51D4E /* FeatureCollection.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5A7208246A1AFC00B51D4E /* FeatureCollection.swift */; };
BB5A720B246CBC0600B51D4E /* CustomMarkerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5A720A246CBC0600B51D4E /* CustomMarkerView.swift */; };
BB5A7238246DEFF500B51D4E /* ScreenForDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5A7237246DEFF400B51D4E /* ScreenForDetailsViewController.swift */; };
BB5A723A2471336A00B51D4E /* screenThreInfomationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5A72392471336A00B51D4E /* screenThreInfomationViewController.swift */; };
BB5A726C2473279B00B51D4E /* ProductosPY.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = BB5A726A2473279B00B51D4E /* ProductosPY.xcdatamodeld */; };
BB5A727224732B3B00B51D4E /* Favorito.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5A727124732B3B00B51D4E /* Favorito.swift */; };
BB5A727424734E7800B51D4E /* ScreenFiveFavoritesViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5A727324734E7800B51D4E /* ScreenFiveFavoritesViewController.swift */; };
BB5A727624734FB600B51D4E /* FavoriteCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB5A727524734FB600B51D4E /* FavoriteCell.swift */; };
BB8DBE3824738BC6006891EF /* FavToVendorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB8DBE3724738BC6006891EF /* FavToVendorViewController.swift */; };
BB8DBE3A2473B1E7006891EF /* DistanceVendorsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB8DBE392473B1E7006891EF /* DistanceVendorsCell.swift */; };
BB8DBE3C2473BAFD006891EF /* FeatureWithDistance.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB8DBE3B2473BAFD006891EF /* FeatureWithDistance.swift */; };
BBDA25AB2463193100819183 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBDA25AA2463193100819183 /* AppDelegate.swift */; };
BBDA25AD2463193100819183 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBDA25AC2463193100819183 /* SceneDelegate.swift */; };
BBDA25AF2463193100819183 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBDA25AE2463193100819183 /* ViewController.swift */; };
......@@ -35,6 +45,16 @@
BB5A72022466114400B51D4E /* APIError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIError.swift; sourceTree = "<group>"; };
BB5A72042466117C00B51D4E /* APISessionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APISessionManager.swift; sourceTree = "<group>"; };
BB5A7208246A1AFC00B51D4E /* FeatureCollection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeatureCollection.swift; sourceTree = "<group>"; };
BB5A720A246CBC0600B51D4E /* CustomMarkerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomMarkerView.swift; sourceTree = "<group>"; };
BB5A7237246DEFF400B51D4E /* ScreenForDetailsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenForDetailsViewController.swift; sourceTree = "<group>"; };
BB5A72392471336A00B51D4E /* screenThreInfomationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = screenThreInfomationViewController.swift; sourceTree = "<group>"; };
BB5A726B2473279B00B51D4E /* ProductosPY.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = ProductosPY.xcdatamodel; sourceTree = "<group>"; };
BB5A727124732B3B00B51D4E /* Favorito.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Favorito.swift; sourceTree = "<group>"; };
BB5A727324734E7800B51D4E /* ScreenFiveFavoritesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScreenFiveFavoritesViewController.swift; sourceTree = "<group>"; };
BB5A727524734FB600B51D4E /* FavoriteCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoriteCell.swift; sourceTree = "<group>"; };
BB8DBE3724738BC6006891EF /* FavToVendorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavToVendorViewController.swift; sourceTree = "<group>"; };
BB8DBE392473B1E7006891EF /* DistanceVendorsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DistanceVendorsCell.swift; sourceTree = "<group>"; };
BB8DBE3B2473BAFD006891EF /* FeatureWithDistance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeatureWithDistance.swift; sourceTree = "<group>"; };
BBDA25A72463193100819183 /* ProductosPY.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ProductosPY.app; sourceTree = BUILT_PRODUCTS_DIR; };
BBDA25AA2463193100819183 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
BBDA25AC2463193100819183 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
......@@ -87,6 +107,9 @@
isa = PBXGroup;
children = (
BB5A71F72465A25000B51D4E /* PageView.swift */,
BB5A720A246CBC0600B51D4E /* CustomMarkerView.swift */,
BB5A727524734FB600B51D4E /* FavoriteCell.swift */,
BB8DBE392473B1E7006891EF /* DistanceVendorsCell.swift */,
);
path = entities;
sourceTree = "<group>";
......@@ -96,6 +119,7 @@
children = (
BB5A71FA2465A5EC00B51D4E /* Constants.swift */,
BB5A7208246A1AFC00B51D4E /* FeatureCollection.swift */,
BB8DBE3B2473BAFD006891EF /* FeatureWithDistance.swift */,
);
path = structs;
sourceTree = "<group>";
......@@ -105,6 +129,10 @@
children = (
BBDA25AE2463193100819183 /* ViewController.swift */,
BB5A71FD2465C7D800B51D4E /* ScreenTwoViewController.swift */,
BB5A7237246DEFF400B51D4E /* ScreenForDetailsViewController.swift */,
BB5A72392471336A00B51D4E /* screenThreInfomationViewController.swift */,
BB5A727324734E7800B51D4E /* ScreenFiveFavoritesViewController.swift */,
BB8DBE3724738BC6006891EF /* FavToVendorViewController.swift */,
);
path = ViewControllers;
sourceTree = "<group>";
......@@ -119,6 +147,14 @@
path = utilities;
sourceTree = "<group>";
};
BB5A723E2473226900B51D4E /* entitiesCoreData */ = {
isa = PBXGroup;
children = (
BB5A727124732B3B00B51D4E /* Favorito.swift */,
);
path = entitiesCoreData;
sourceTree = "<group>";
};
BBDA259E2463193100819183 = {
isa = PBXGroup;
children = (
......@@ -140,6 +176,7 @@
BBDA25A92463193100819183 /* ProductosPY */ = {
isa = PBXGroup;
children = (
BB5A723E2473226900B51D4E /* entitiesCoreData */,
BB5A71FF24660D8600B51D4E /* utilities */,
BB5A71FC2465C7AC00B51D4E /* ViewControllers */,
BB5A71F92465A5C400B51D4E /* structs */,
......@@ -151,6 +188,7 @@
BBDA25B32463194600819183 /* Assets.xcassets */,
BBDA25B52463194600819183 /* LaunchScreen.storyboard */,
BBDA25B82463194600819183 /* Info.plist */,
BB5A726A2473279B00B51D4E /* ProductosPY.xcdatamodeld */,
);
path = ProductosPY;
sourceTree = "<group>";
......@@ -290,15 +328,25 @@
buildActionMask = 2147483647;
files = (
BB5A71FB2465A5EC00B51D4E /* Constants.swift in Sources */,
BB8DBE3824738BC6006891EF /* FavToVendorViewController.swift in Sources */,
BBDA25AF2463193100819183 /* ViewController.swift in Sources */,
BB5A72052466117C00B51D4E /* APISessionManager.swift in Sources */,
BB5A7238246DEFF500B51D4E /* ScreenForDetailsViewController.swift in Sources */,
BB5A7209246A1AFC00B51D4E /* FeatureCollection.swift in Sources */,
BB5A720B246CBC0600B51D4E /* CustomMarkerView.swift in Sources */,
BB5A726C2473279B00B51D4E /* ProductosPY.xcdatamodeld in Sources */,
BB5A71F82465A25000B51D4E /* PageView.swift in Sources */,
BB5A7201246610BE00B51D4E /* HTTPClient.swift in Sources */,
BB5A71FE2465C7D800B51D4E /* ScreenTwoViewController.swift in Sources */,
BB8DBE3C2473BAFD006891EF /* FeatureWithDistance.swift in Sources */,
BB5A72032466114400B51D4E /* APIError.swift in Sources */,
BBDA25AB2463193100819183 /* AppDelegate.swift in Sources */,
BB5A723A2471336A00B51D4E /* screenThreInfomationViewController.swift in Sources */,
BBDA25AD2463193100819183 /* SceneDelegate.swift in Sources */,
BB5A727424734E7800B51D4E /* ScreenFiveFavoritesViewController.swift in Sources */,
BB5A727224732B3B00B51D4E /* Favorito.swift in Sources */,
BB8DBE3A2473B1E7006891EF /* DistanceVendorsCell.swift in Sources */,
BB5A727624734FB600B51D4E /* FavoriteCell.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -496,6 +544,19 @@
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCVersionGroup section */
BB5A726A2473279B00B51D4E /* ProductosPY.xcdatamodeld */ = {
isa = XCVersionGroup;
children = (
BB5A726B2473279B00B51D4E /* ProductosPY.xcdatamodel */,
);
currentVersion = BB5A726B2473279B00B51D4E /* ProductosPY.xcdatamodel */;
path = ProductosPY.xcdatamodeld;
sourceTree = "<group>";
versionGroupType = wrapper.xcdatamodel;
};
/* End XCVersionGroup section */
};
rootObject = BBDA259F2463193100819183 /* Project object */;
}
......@@ -9,13 +9,16 @@
import UIKit
import GoogleMaps
import GooglePlaces
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
if !UserDefaults.standard.bool(forKey: "Walkthrough") {
UserDefaults.standard.set(false, forKey: "Walkthrough")
}
GMSServices.provideAPIKey("AIzaSyCDCQFseYL7K7okR_YL7lmh2SCRct9YiiM")
GMSPlacesClient.provideAPIKey("AIzaSyCDCQFseYL7K7okR_YL7lmh2SCRct9YiiM")
return true
......@@ -34,7 +37,50 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
// MARK: - Core Data stack
lazy var persistentContainer: NSPersistentContainer = {
/*
The persistent container for the application. This implementation
creates and returns a container, having loaded the store for the
application to it. This property is optional since there are legitimate
error conditions that could cause the creation of the store to fail.
*/
let container = NSPersistentContainer(name: "ProductosPY")
container.loadPersistentStores(completionHandler: { (storeDescription, error) in
if let error = error as NSError? {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
/*
Typical reasons for an error here include:
* The parent directory does not exist, cannot be created, or disallows writing.
* The persistent store is not accessible, due to permissions or data protection when the device is locked.
* The device is out of space.
* The store could not be migrated to the current model version.
Check the error message to determine what the actual problem was.
*/
fatalError("Unresolved error \(error), \(error.userInfo)")
}
})
return container
}()
// MARK: - Core Data Saving support
func saveContext () {
let context = persistentContainer.viewContext
if context.hasChanges {
do {
try context.save()
} catch {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
let nserror = error as NSError
fatalError("Unresolved error \(nserror), \(nserror.userInfo)")
}
}
}
}
......@@ -11,7 +11,7 @@
<scene sceneID="tne-QT-ifu">
<objects>
<viewController wantsFullScreenLayout="YES" id="BYZ-38-t0r" customClass="ViewController" customModule="ProductosPY" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<view key="view" hidden="YES" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
......@@ -53,6 +53,7 @@
</view>
<connections>
<outlet property="pageController" destination="aHh-9F-fny" id="oJt-nW-nyn"/>
<outlet property="principalView" destination="8bC-Xf-vdC" id="bhn-Rg-d2l"/>
<outlet property="scrollView" destination="GP3-oi-Obk" id="rdJ-5S-rrv"/>
<outlet property="startButton" destination="qNb-yh-X0g" id="e6r-mQ-Euy"/>
<segue destination="FrI-c0-r9v" kind="show" identifier="screenTwoSegue" id="rZI-SI-1cm"/>
......@@ -62,6 +63,104 @@
</objects>
<point key="canvasLocation" x="1042.0289855072465" y="138.61607142857142"/>
</scene>
<!--Screen Thre Infomation View Controller-->
<scene sceneID="3mP-9w-cEo">
<objects>
<viewController id="7mb-0g-tTA" customClass="screenThreInfomationViewController" customModule="ProductosPY" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="a2V-0r-6CO">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logoBig" translatesAutoresizingMaskIntoConstraints="NO" id="2lY-20-Gpb">
<rect key="frame" x="131" y="50" width="152" height="200"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ProductosPY" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UcU-XW-ue4">
<rect key="frame" x="50" y="260" width="314" height="29"/>
<fontDescription key="fontDescription" type="system" weight="light" pointSize="24"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gcL-JB-BWj">
<rect key="frame" x="150.66666666666666" y="309" width="112.99999999999997" height="30"/>
<state key="normal" title="Términos de uso"/>
<connections>
<action selector="terminosUsoAction:" destination="7mb-0g-tTA" eventType="touchUpInside" id="fdf-hJ-GZz"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7HR-2m-wQY">
<rect key="frame" x="106" y="359" width="202" height="33"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="Registrate como vendedor"/>
<connections>
<action selector="registrarVendedorAction:" destination="7mb-0g-tTA" eventType="touchUpInside" id="RcM-Pi-6Te"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Esta APP fue desarrollada por Carlos Vargas" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HbX-1B-3oN">
<rect key="frame" x="50" y="412" width="314" height="40.666666666666686"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Roshka S. A." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hgo-b0-4OT">
<rect key="frame" x="159" y="639" width="96" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="El código de esta aplicación está disponible bajo la licencia GPLV3" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xzd-Vj-Xuc">
<rect key="frame" x="40" y="700" width="334" height="28.666666666666629"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zjs-ZF-SNP">
<rect key="frame" x="121" y="738.66666666666663" width="172" height="29"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<state key="normal" title="Revisá el código en Github"/>
<connections>
<action selector="mostrarRepoAction:" destination="7mb-0g-tTA" eventType="touchUpInside" id="DVL-aF-Cc5"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="7HR-2m-wQY" firstAttribute="top" secondItem="gcL-JB-BWj" secondAttribute="bottom" constant="20" id="3bd-6s-jiy"/>
<constraint firstItem="f9M-J5-fel" firstAttribute="trailing" secondItem="xzd-Vj-Xuc" secondAttribute="trailing" constant="40" id="4Bz-HM-oOr"/>
<constraint firstItem="f9M-J5-fel" firstAttribute="trailing" secondItem="HbX-1B-3oN" secondAttribute="trailing" constant="50" id="87Y-Mo-sjQ"/>
<constraint firstItem="xzd-Vj-Xuc" firstAttribute="centerX" secondItem="f9M-J5-fel" secondAttribute="centerX" id="C0F-cA-yNJ"/>
<constraint firstItem="hgo-b0-4OT" firstAttribute="centerX" secondItem="f9M-J5-fel" secondAttribute="centerX" id="Dl4-Z3-LVx"/>
<constraint firstItem="7HR-2m-wQY" firstAttribute="centerX" secondItem="f9M-J5-fel" secondAttribute="centerX" id="Dq7-Wr-3i6"/>
<constraint firstItem="UcU-XW-ue4" firstAttribute="leading" secondItem="f9M-J5-fel" secondAttribute="leading" constant="50" id="EdJ-Rz-WId"/>
<constraint firstItem="HbX-1B-3oN" firstAttribute="top" secondItem="7HR-2m-wQY" secondAttribute="bottom" constant="20" id="F4N-rv-vtu"/>
<constraint firstItem="xzd-Vj-Xuc" firstAttribute="top" secondItem="hgo-b0-4OT" secondAttribute="bottom" constant="40" id="H7h-uV-Wac"/>
<constraint firstItem="zjs-ZF-SNP" firstAttribute="centerX" secondItem="f9M-J5-fel" secondAttribute="centerX" id="LH8-Zd-WmX"/>
<constraint firstItem="2lY-20-Gpb" firstAttribute="top" secondItem="f9M-J5-fel" secondAttribute="top" constant="50" id="S5Z-3G-8Dk"/>
<constraint firstItem="HbX-1B-3oN" firstAttribute="centerX" secondItem="f9M-J5-fel" secondAttribute="centerX" id="U3z-xR-BOV"/>
<constraint firstItem="gcL-JB-BWj" firstAttribute="top" secondItem="UcU-XW-ue4" secondAttribute="bottom" constant="20" id="dN1-QV-fmJ"/>
<constraint firstItem="2lY-20-Gpb" firstAttribute="centerX" secondItem="f9M-J5-fel" secondAttribute="centerX" id="eAU-wv-Cqf"/>
<constraint firstItem="UcU-XW-ue4" firstAttribute="top" secondItem="2lY-20-Gpb" secondAttribute="bottom" constant="10" id="egi-bW-iiE"/>
<constraint firstItem="zjs-ZF-SNP" firstAttribute="top" secondItem="xzd-Vj-Xuc" secondAttribute="bottom" constant="10" id="gim-ID-aOQ"/>
<constraint firstItem="xzd-Vj-Xuc" firstAttribute="leading" secondItem="f9M-J5-fel" secondAttribute="leading" constant="40" id="kYZ-0f-yVF"/>
<constraint firstItem="gcL-JB-BWj" firstAttribute="centerX" secondItem="f9M-J5-fel" secondAttribute="centerX" id="lyH-ly-BCO"/>
<constraint firstItem="f9M-J5-fel" firstAttribute="trailing" secondItem="UcU-XW-ue4" secondAttribute="trailing" constant="50" id="sUR-Ey-EdL"/>
<constraint firstItem="f9M-J5-fel" firstAttribute="bottom" secondItem="zjs-ZF-SNP" secondAttribute="bottom" constant="40.333333333333371" id="y7v-BO-wYr"/>
<constraint firstItem="HbX-1B-3oN" firstAttribute="leading" secondItem="f9M-J5-fel" secondAttribute="leading" constant="50" id="zpI-Nm-bph"/>
</constraints>
<viewLayoutGuide key="safeArea" id="f9M-J5-fel"/>
</view>
<navigationItem key="navigationItem" id="4Vp-No-GoR"/>
<connections>
<outlet property="licenciaLabel" destination="xzd-Vj-Xuc" id="8Ml-3d-z0d"/>
<outlet property="registrarVendedorButton" destination="7HR-2m-wQY" id="EIZ-gp-tsA"/>
<outlet property="repoButton" destination="zjs-ZF-SNP" id="7CT-MH-jus"/>
<outlet property="terminosUsoButton" destination="gcL-JB-BWj" id="PR9-by-j0I"/>
<outlet property="titleLabel" destination="UcU-XW-ue4" id="dv4-XL-bBL"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="luY-mx-qsR" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2684" y="-486"/>
</scene>
<!--Screen Two View Controller-->
<scene sceneID="GK5-Vt-tJ6">
<objects>
......@@ -79,17 +178,24 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<searchBar contentMode="redraw" translatesAutoresizingMaskIntoConstraints="NO" id="U67-QB-Pgr">
<searchBar contentMode="redraw" searchBarStyle="minimal" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U67-QB-Pgr">
<rect key="frame" x="0.0" y="84" width="414" height="56"/>
<color key="barTintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<textInputTraits key="textInputTraits"/>
</searchBar>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lGy-Hs-aq6">
<rect key="frame" x="372" y="35" width="22" height="22"/>
<state key="normal" image="favButton"/>
<connections>
<action selector="favoritesAction:" destination="FrI-c0-r9v" eventType="touchUpInside" id="f73-aB-oiB"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="umJ-cn-0Vc">
<rect key="frame" x="328" y="35" width="24" height="24"/>
<state key="normal" image="infoButton"/>
<connections>
<action selector="informationAppAction:" destination="FrI-c0-r9v" eventType="touchUpInside" id="rna-ku-bbL"/>
</connections>
</button>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logoSmall" translatesAutoresizingMaskIntoConstraints="NO" id="uy2-gi-fxR">
<rect key="frame" x="10" y="40" width="30" height="35"/>
......@@ -116,7 +222,86 @@
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Sf-9f-8lH" customClass="GMSMapView">
<rect key="frame" x="0.0" y="140" width="414" height="756"/>
<subviews>
<tableView hidden="YES" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="XYL-Ea-Svi">
<rect key="frame" x="10" y="0.0" width="394" height="200"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="height" constant="200" id="i5N-is-ek0"/>
</constraints>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="DistanceVendorCell" rowHeight="100" id="Ztf-3H-mnY" customClass="DistanceVendorsCell" customModule="ProductosPY" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="394" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Ztf-3H-mnY" id="3TE-fW-KzG">
<rect key="frame" x="0.0" y="0.0" width="394" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="awl-GD-9Fv">
<rect key="frame" x="0.0" y="0.0" width="90" height="100"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.2" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EkA-zK-9bs">
<rect key="frame" x="19.666666666666668" y="10" width="50.666666666666657" height="42"/>
<fontDescription key="fontDescription" type="system" pointSize="35"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="km" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="27H-iR-ZYq">
<rect key="frame" x="33.333333333333336" y="59" width="23.333333333333336" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="27H-iR-ZYq" firstAttribute="centerX" secondItem="awl-GD-9Fv" secondAttribute="centerX" id="GM7-tO-1YA"/>
<constraint firstAttribute="bottom" secondItem="27H-iR-ZYq" secondAttribute="bottom" constant="20" id="IgH-NM-iME"/>
<constraint firstItem="EkA-zK-9bs" firstAttribute="centerX" secondItem="awl-GD-9Fv" secondAttribute="centerX" id="KzX-lD-lLR"/>
<constraint firstItem="EkA-zK-9bs" firstAttribute="top" secondItem="awl-GD-9Fv" secondAttribute="top" constant="10" id="Za0-Vs-z5V"/>
<constraint firstAttribute="width" constant="90" id="cGU-TX-WbK"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="D4s-NH-h9e">
<rect key="frame" x="120" y="10" width="254" height="24"/>
<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" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OuN-m1-oDO">
<rect key="frame" x="120" y="44" width="254" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="OuN-m1-oDO" firstAttribute="top" secondItem="D4s-NH-h9e" secondAttribute="bottom" constant="10" id="6l4-yr-xHE"/>
<constraint firstAttribute="bottom" secondItem="awl-GD-9Fv" secondAttribute="bottom" id="6nL-Gg-Xzw"/>
<constraint firstItem="D4s-NH-h9e" firstAttribute="top" secondItem="3TE-fW-KzG" secondAttribute="top" constant="10" id="Fto-kJ-vSk"/>
<constraint firstItem="D4s-NH-h9e" firstAttribute="leading" secondItem="awl-GD-9Fv" secondAttribute="trailing" constant="30" id="JdC-Eo-33V"/>
<constraint firstAttribute="trailing" secondItem="OuN-m1-oDO" secondAttribute="trailing" constant="20" id="NaQ-3Y-rLg"/>
<constraint firstItem="awl-GD-9Fv" firstAttribute="leading" secondItem="3TE-fW-KzG" secondAttribute="leading" id="eN0-6z-K3G"/>
<constraint firstAttribute="trailing" secondItem="D4s-NH-h9e" secondAttribute="trailing" constant="20" id="gqU-zG-koA"/>
<constraint firstItem="OuN-m1-oDO" firstAttribute="leading" secondItem="awl-GD-9Fv" secondAttribute="trailing" constant="30" id="gyj-aJ-kP4"/>
<constraint firstItem="awl-GD-9Fv" firstAttribute="top" secondItem="3TE-fW-KzG" secondAttribute="top" id="omi-Bw-XCI"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="comentarioLabel" destination="OuN-m1-oDO" id="KzN-cX-WqY"/>
<outlet property="distanceLabel" destination="EkA-zK-9bs" id="oCQ-kT-fe8"/>
<outlet property="nombreLabel" destination="D4s-NH-h9e" id="lsm-rm-259"/>
</connections>
</tableViewCell>
</prototypes>
</tableView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="XYL-Ea-Svi" firstAttribute="leading" secondItem="8Sf-9f-8lH" secondAttribute="leading" constant="10" id="0PF-Po-YVZ"/>
<constraint firstAttribute="trailing" secondItem="XYL-Ea-Svi" secondAttribute="trailing" constant="10" id="6U6-1a-Wiw"/>
<constraint firstItem="XYL-Ea-Svi" firstAttribute="top" secondItem="8Sf-9f-8lH" secondAttribute="top" id="yPw-CX-45M"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
......@@ -133,17 +318,465 @@
</view>
<navigationItem key="navigationItem" id="3UV-dS-6Uk"/>
<connections>
<outlet property="gMapsView" destination="8Sf-9f-8lH" id="Rn5-kT-m4w"/>
<outlet property="mapView" destination="8Sf-9f-8lH" id="8B0-on-OxU"/>
<outlet property="searchBarView" destination="U67-QB-Pgr" id="FyF-3w-tZq"/>
<outlet property="tableView" destination="XYL-Ea-Svi" id="Hmf-kU-Luy"/>
<segue destination="BBj-Xn-BVA" kind="show" identifier="screenForDetailSegue" id="25F-o3-VDt"/>
<segue destination="7mb-0g-tTA" kind="show" identifier="screenThreInfomationSegue" id="pQA-RA-5JX"/>
<segue destination="Svh-hj-EjK" kind="show" identifier="screenFiveFavoritesSigue" id="78l-4d-EHT"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="qdd-Xi-vbZ" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1827.5362318840582" y="138.61607142857142"/>
</scene>
<!--Screen For Details View Controller-->
<scene sceneID="nb1-v7-DDq">
<objects>
<viewController id="BBj-Xn-BVA" customClass="ScreenForDetailsViewController" customModule="ProductosPY" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="g5y-AB-5v4">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="skm-xi-CSm">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Umy-bn-p8f">
<rect key="frame" x="0.0" y="0.0" width="414" height="420"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YaK-Lt-kRu">
<rect key="frame" x="0.0" y="0.0" width="414" height="120"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qpo-FI-hPx">
<rect key="frame" x="30" y="49.999999999999993" width="354" height="28.666666666666664"/>
<fontDescription key="fontDescription" type="system" pointSize="24"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="qpo-FI-hPx" firstAttribute="top" secondItem="YaK-Lt-kRu" secondAttribute="top" constant="50" id="J7h-E0-koH"/>
<constraint firstAttribute="trailing" secondItem="qpo-FI-hPx" secondAttribute="trailing" constant="30" id="Ldl-TN-vT8"/>
<constraint firstAttribute="height" constant="120" id="URm-Jc-5rk"/>
<constraint firstItem="qpo-FI-hPx" firstAttribute="leading" secondItem="YaK-Lt-kRu" secondAttribute="leading" constant="30" id="tNq-eD-KnW"/>
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="w09-T6-Dgz">
<rect key="frame" x="0.0" y="120" width="414" height="300"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tGS-lY-fkv">
<rect key="frame" x="30" y="20" width="354" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="tGS-lY-fkv" firstAttribute="top" secondItem="w09-T6-Dgz" secondAttribute="top" constant="20" id="5EC-7N-zpB"/>
<constraint firstItem="tGS-lY-fkv" firstAttribute="leading" secondItem="w09-T6-Dgz" secondAttribute="leading" constant="30" id="6Xg-Wf-em3"/>
<constraint firstAttribute="trailing" secondItem="tGS-lY-fkv" secondAttribute="trailing" constant="30" id="H3r-zV-HXm"/>
<constraint firstAttribute="height" constant="300" id="JRJ-gd-EaE"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oup-9p-aQB">
<rect key="frame" x="0.0" y="120" width="414" height="300"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ngj-Da-whF">
<rect key="frame" x="30" y="50" width="354" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="SOS-d2-izk"/>
</constraints>
<state key="normal" title="Button">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="contactPhoneNumberAction:" destination="BBj-Xn-BVA" eventType="touchUpInside" id="RQS-Kg-zQV"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9mi-BH-Scc">
<rect key="frame" x="30" y="120" width="354" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="c2f-Vc-OgF"/>
</constraints>
<state key="normal" title="Button">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="howToGetAction:" destination="BBj-Xn-BVA" eventType="touchUpInside" id="MTt-BL-UFV"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Um-Hi-lYe">
<rect key="frame" x="192.66666666666666" y="220" width="29" height="29"/>
<state key="normal" image="favDeselected"/>
<connections>
<action selector="addFavAction:" destination="BBj-Xn-BVA" eventType="touchUpInside" id="Jp7-iL-ceT"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Agregar como favorito" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3bV-BC-K74">
<rect key="frame" x="135.33333333333337" y="259" width="143.66666666666663" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="ngj-Da-whF" firstAttribute="top" secondItem="oup-9p-aQB" secondAttribute="top" constant="50" id="2jm-Ma-HRT"/>
<constraint firstItem="1Um-Hi-lYe" firstAttribute="top" secondItem="9mi-BH-Scc" secondAttribute="bottom" constant="50" id="Aso-jn-57r"/>
<constraint firstItem="3bV-BC-K74" firstAttribute="top" secondItem="1Um-Hi-lYe" secondAttribute="bottom" constant="10" id="BWI-8a-aBK"/>
<constraint firstItem="3bV-BC-K74" firstAttribute="centerX" secondItem="oup-9p-aQB" secondAttribute="centerX" id="Duj-dc-3Ui"/>
<constraint firstItem="ngj-Da-whF" firstAttribute="leading" secondItem="oup-9p-aQB" secondAttribute="leading" constant="30" id="Em2-hC-x6h"/>
<constraint firstItem="1Um-Hi-lYe" firstAttribute="centerX" secondItem="oup-9p-aQB" secondAttribute="centerX" id="Gxa-hJ-Tcg"/>
<constraint firstAttribute="trailing" secondItem="ngj-Da-whF" secondAttribute="trailing" constant="30" id="YJp-zz-Vxs"/>
<constraint firstAttribute="height" constant="300" id="acE-Uv-TbY"/>
<constraint firstItem="9mi-BH-Scc" firstAttribute="leading" secondItem="oup-9p-aQB" secondAttribute="leading" constant="30" id="oIm-sd-JhM"/>
<constraint firstAttribute="trailing" secondItem="9mi-BH-Scc" secondAttribute="trailing" constant="30" id="wZt-z5-Nba"/>
<constraint firstItem="9mi-BH-Scc" firstAttribute="top" secondItem="ngj-Da-whF" secondAttribute="bottom" constant="20" id="wpm-M1-hnw"/>
</constraints>
</view>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstItem="Umy-bn-p8f" firstAttribute="bottom" secondItem="BNp-CC-vj1" secondAttribute="bottom" id="6Cc-oV-qnF"/>
<constraint firstItem="Umy-bn-p8f" firstAttribute="leading" secondItem="BNp-CC-vj1" secondAttribute="leading" id="IvB-pV-Msx"/>
<constraint firstItem="Umy-bn-p8f" firstAttribute="width" secondItem="xPq-AL-6YT" secondAttribute="width" id="KGs-KB-qSq"/>
<constraint firstItem="Umy-bn-p8f" firstAttribute="trailing" secondItem="BNp-CC-vj1" secondAttribute="trailing" id="MhE-Yd-xxE"/>
<constraint firstItem="Umy-bn-p8f" firstAttribute="top" secondItem="BNp-CC-vj1" secondAttribute="top" id="bhM-gu-hIf"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="BNp-CC-vj1"/>
<viewLayoutGuide key="frameLayoutGuide" id="xPq-AL-6YT"/>
</scrollView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="skm-xi-CSm" firstAttribute="leading" secondItem="6WB-5I-mYo" secondAttribute="leading" id="CGU-rg-9KR"/>
<constraint firstItem="skm-xi-CSm" firstAttribute="trailing" secondItem="6WB-5I-mYo" secondAttribute="trailing" id="Rvd-Ws-OIs"/>
<constraint firstAttribute="bottom" secondItem="skm-xi-CSm" secondAttribute="bottom" id="dPB-dR-9m1"/>
<constraint firstItem="skm-xi-CSm" firstAttribute="top" secondItem="6WB-5I-mYo" secondAttribute="top" id="edB-ra-hXa"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6WB-5I-mYo"/>
</view>
<toolbarItems/>
<navigationItem key="navigationItem" id="czi-DV-V5Z"/>
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
<connections>
<outlet property="addFavButton" destination="1Um-Hi-lYe" id="xDK-yE-8BB"/>
<outlet property="contactPhoneNumberButton" destination="ngj-Da-whF" id="xd0-PF-br3"/>
<outlet property="favoritoLabel" destination="3bV-BC-K74" id="eEe-qL-S4J"/>
<outlet property="howToGetButton" destination="9mi-BH-Scc" id="DRO-9E-BA4"/>
<outlet property="vendorCommentaryLabel" destination="tGS-lY-fkv" id="IUL-KX-pkH"/>
<outlet property="vendorCommentaryView" destination="w09-T6-Dgz" id="qBq-pX-xrY"/>
<outlet property="vendorNameLabel" destination="qpo-FI-hPx" id="y6V-bp-Ukw"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="gb2-B7-bQo" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2806" y="171"/>
</scene>
<!--Screen Five Favorites View Controller-->
<scene sceneID="ErX-0O-5UD">
<objects>
<viewController id="Svh-hj-EjK" customClass="ScreenFiveFavoritesViewController" customModule="ProductosPY" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="iyd-Ec-opF">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KNq-LH-yW9">
<rect key="frame" x="50" y="329" width="314" height="150"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hBm-uH-uoK">
<rect key="frame" x="30" y="20" width="254" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="648-dh-8ZG"/>
</constraints>
<state key="normal" title="Mostrar más">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="muestraVendedorAction:" destination="Svh-hj-EjK" eventType="touchUpInside" id="9mY-YB-Cxf"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tf0-19-fRs">
<rect key="frame" x="30" y="80" width="254" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="dKR-E9-LPf"/>
</constraints>
<state key="normal" title="Eliminar">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="eliminaVandedorAction:" destination="Svh-hj-EjK" eventType="touchUpInside" id="9XQ-5r-iWv"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemGreenColor" red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="tf0-19-fRs" secondAttribute="bottom" constant="20" id="8VH-vg-KvA"/>
<constraint firstAttribute="trailing" secondItem="hBm-uH-uoK" secondAttribute="trailing" constant="30" id="S9E-bx-iPS"/>
<constraint firstItem="tf0-19-fRs" firstAttribute="leading" secondItem="KNq-LH-yW9" secondAttribute="leading" constant="30" id="U22-5q-PMi"/>
<constraint firstItem="hBm-uH-uoK" firstAttribute="top" secondItem="KNq-LH-yW9" secondAttribute="top" constant="20" id="Xr3-Ab-tXk"/>
<constraint firstAttribute="trailing" secondItem="tf0-19-fRs" secondAttribute="trailing" constant="30" id="cbA-vM-VEc"/>
<constraint firstItem="hBm-uH-uoK" firstAttribute="leading" secondItem="KNq-LH-yW9" secondAttribute="leading" constant="30" id="ddv-QS-3t2"/>
<constraint firstAttribute="height" constant="150" id="fu4-pA-U9X"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="64h-HX-zt0">
<rect key="frame" x="0.0" y="0.0" width="414" height="50"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Mis Favoritos" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ake-SL-u06">
<rect key="frame" x="138.66666666666666" y="11.999999999999998" width="136.99999999999997" height="26.333333333333329"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="22"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="favButton" translatesAutoresizingMaskIntoConstraints="NO" id="5Uv-sp-7RL">
<rect key="frame" x="373" y="15" width="20" height="20"/>
</imageView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="5Uv-sp-7RL" secondAttribute="trailing" constant="21" id="IN4-Tr-Zp4"/>
<constraint firstItem="ake-SL-u06" firstAttribute="centerX" secondItem="64h-HX-zt0" secondAttribute="centerX" id="Sye-Qb-R8M"/>
<constraint firstItem="5Uv-sp-7RL" firstAttribute="top" secondItem="64h-HX-zt0" secondAttribute="top" constant="15" id="f2I-b9-YUQ"/>
<constraint firstItem="ake-SL-u06" firstAttribute="centerY" secondItem="64h-HX-zt0" secondAttribute="centerY" id="lLv-QW-VXp"/>
<constraint firstAttribute="height" constant="50" id="xQQ-SE-zD1"/>
</constraints>
</view>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="VOF-km-udH">
<rect key="frame" x="0.0" y="50" width="414" height="758"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="favoritoCell" rowHeight="150" id="hik-eN-4DM" customClass="FavoriteCell" customModule="ProductosPY" customModuleProvider="target">
<rect key="frame" x="0.0" y="28" width="414" height="150"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="hik-eN-4DM" id="GmT-HX-v0m">
<rect key="frame" x="0.0" y="0.0" width="414" height="150"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F3J-Sv-Pyk">
<rect key="frame" x="20" y="20" width="374" height="110"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rnE-5Y-dSk">
<rect key="frame" x="20" y="20" width="334" height="21"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0yx-yE-O3J">
<rect key="frame" x="20" y="49" width="334" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="0yx-yE-O3J" firstAttribute="top" secondItem="rnE-5Y-dSk" secondAttribute="bottom" constant="8" id="0It-4L-ahX"/>
<constraint firstAttribute="trailing" secondItem="0yx-yE-O3J" secondAttribute="trailing" constant="20" id="Jd3-5r-trX"/>
<constraint firstItem="rnE-5Y-dSk" firstAttribute="top" secondItem="F3J-Sv-Pyk" secondAttribute="top" constant="20" id="S55-k4-YFh"/>
<constraint firstItem="rnE-5Y-dSk" firstAttribute="leading" secondItem="F3J-Sv-Pyk" secondAttribute="leading" constant="20" id="g6m-C3-gh8"/>
<constraint firstAttribute="trailing" secondItem="rnE-5Y-dSk" secondAttribute="trailing" constant="20" id="qzB-vT-ROJ"/>
<constraint firstItem="0yx-yE-O3J" firstAttribute="leading" secondItem="F3J-Sv-Pyk" secondAttribute="leading" constant="20" id="w71-0p-T2b"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="F3J-Sv-Pyk" secondAttribute="trailing" constant="20" id="Lkg-cK-gZJ"/>
<constraint firstAttribute="bottom" secondItem="F3J-Sv-Pyk" secondAttribute="bottom" constant="20" id="c2O-oN-6dP"/>
<constraint firstItem="F3J-Sv-Pyk" firstAttribute="leading" secondItem="GmT-HX-v0m" secondAttribute="leading" constant="20" id="gib-o5-Hgo"/>
<constraint firstItem="F3J-Sv-Pyk" firstAttribute="top" secondItem="GmT-HX-v0m" secondAttribute="top" constant="20" id="yak-Iv-zZ8"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="cellView" destination="F3J-Sv-Pyk" id="kW4-rT-TV0"/>
<outlet property="comentarioLabel" destination="0yx-yE-O3J" id="1GR-Ha-SiR"/>
<outlet property="titleLabel" destination="rnE-5Y-dSk" id="J8P-UT-M5w"/>
</connections>
</tableViewCell>
</prototypes>
</tableView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="zeW-6y-8Wj" firstAttribute="trailing" secondItem="VOF-km-udH" secondAttribute="trailing" id="5uW-DL-Qyf"/>
<constraint firstItem="64h-HX-zt0" firstAttribute="top" secondItem="iyd-Ec-opF" secondAttribute="top" id="C25-SA-hEP"/>
<constraint firstItem="KNq-LH-yW9" firstAttribute="centerX" secondItem="zeW-6y-8Wj" secondAttribute="centerX" id="Gwr-ib-Ppn"/>
<constraint firstItem="zeW-6y-8Wj" firstAttribute="bottom" secondItem="VOF-km-udH" secondAttribute="bottom" id="dn7-5C-h1V"/>
<constraint firstItem="64h-HX-zt0" firstAttribute="leading" secondItem="zeW-6y-8Wj" secondAttribute="leading" id="eZy-z0-aP2"/>
<constraint firstItem="VOF-km-udH" firstAttribute="leading" secondItem="zeW-6y-8Wj" secondAttribute="leading" id="gJs-Ak-Lwx"/>
<constraint firstItem="zeW-6y-8Wj" firstAttribute="trailing" secondItem="64h-HX-zt0" secondAttribute="trailing" id="iKv-Ei-q2H"/>
<constraint firstItem="zeW-6y-8Wj" firstAttribute="trailing" secondItem="KNq-LH-yW9" secondAttribute="trailing" constant="50" id="mz5-Ae-W2M"/>
<constraint firstItem="KNq-LH-yW9" firstAttribute="centerY" secondItem="zeW-6y-8Wj" secondAttribute="centerY" id="qA2-yf-aXz"/>
<constraint firstItem="KNq-LH-yW9" firstAttribute="leading" secondItem="zeW-6y-8Wj" secondAttribute="leading" constant="50" id="rxe-Hz-tUi"/>
<constraint firstItem="VOF-km-udH" firstAttribute="top" secondItem="64h-HX-zt0" secondAttribute="bottom" id="yQF-Bh-tgN"/>
</constraints>
<viewLayoutGuide key="safeArea" id="zeW-6y-8Wj"/>
</view>
<navigationItem key="navigationItem" id="9Xv-vQ-gal"/>
<connections>
<outlet property="alertView" destination="KNq-LH-yW9" id="Yyb-p2-6e7"/>
<outlet property="eliminarButton" destination="tf0-19-fRs" id="boL-m5-mCG"/>
<outlet property="favoriteTableView" destination="VOF-km-udH" id="zqG-Hd-mC4"/>
<outlet property="mostrarMasButton" destination="hBm-uH-uoK" id="LL4-Td-9q0"/>
<outlet property="titleLabel" destination="ake-SL-u06" id="3dz-hM-o3v"/>
<segue destination="93H-3c-Ahx" kind="show" identifier="favToVendorSegue" id="pP6-gL-3CT"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="nzr-l3-IRo" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2682.608695652174" y="878.57142857142856"/>
</scene>
<!--Fav To Vendor View Controller-->
<scene sceneID="0Wi-qD-IlO">
<objects>
<viewController id="93H-3c-Ahx" customClass="FavToVendorViewController" customModule="ProductosPY" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="IlQ-Q7-nP6">
<rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Sho-HH-lpU">
<rect key="frame" x="0.0" y="27" width="414" height="842"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="f1I-sW-5FL">
<rect key="frame" x="0.0" y="0.0" width="414" height="420"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mlg-p4-utN">
<rect key="frame" x="0.0" y="0.0" width="414" height="120"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lAL-u1-Ddg">
<rect key="frame" x="30" y="49.999999999999993" width="354" height="28.666666666666664"/>
<fontDescription key="fontDescription" type="system" pointSize="24"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="lAL-u1-Ddg" firstAttribute="top" secondItem="Mlg-p4-utN" secondAttribute="top" constant="50" id="BI2-g6-gB6"/>
<constraint firstItem="lAL-u1-Ddg" firstAttribute="leading" secondItem="Mlg-p4-utN" secondAttribute="leading" constant="30" id="FF7-X1-rer"/>
<constraint firstAttribute="trailing" secondItem="lAL-u1-Ddg" secondAttribute="trailing" constant="30" id="Pdm-e7-viH"/>
<constraint firstAttribute="height" constant="120" id="qX5-Nl-g0Z"/>
</constraints>
</view>
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mMP-dK-DYE">
<rect key="frame" x="0.0" y="120" width="414" height="300"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rNl-UG-fue">
<rect key="frame" x="30" y="20" width="354" height="20.333333333333329"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="rNl-UG-fue" firstAttribute="top" secondItem="mMP-dK-DYE" secondAttribute="top" constant="20" id="Tnd-M4-sJX"/>
<constraint firstAttribute="height" constant="300" id="VUI-vd-KXY"/>
<constraint firstItem="rNl-UG-fue" firstAttribute="leading" secondItem="mMP-dK-DYE" secondAttribute="leading" constant="30" id="rRr-ZR-oe8"/>
<constraint firstAttribute="trailing" secondItem="rNl-UG-fue" secondAttribute="trailing" constant="30" id="wwt-ej-QfQ"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ax0-Ne-2Ho">
<rect key="frame" x="0.0" y="120" width="414" height="300"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xwK-Uu-tf4">
<rect key="frame" x="30" y="50" width="354" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="XVs-We-7g5"/>
</constraints>
<state key="normal" title="Button">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="contactPhoneNumberAction:" destination="BBj-Xn-BVA" eventType="touchUpInside" id="Y8f-Q0-isd"/>
<action selector="contactPhoneNumberAction:" destination="93H-3c-Ahx" eventType="touchUpInside" id="iIU-g9-ZBW"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="P7J-pG-iAR">
<rect key="frame" x="30" y="120" width="354" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="Ebe-1B-Mjf"/>
</constraints>
<state key="normal" title="Button">
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state>
<connections>
<action selector="howToGetAction:" destination="93H-3c-Ahx" eventType="touchUpInside" id="7cV-LX-cn5"/>
<action selector="howToGetAction:" destination="BBj-Xn-BVA" eventType="touchUpInside" id="Lts-R9-yBE"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Dej-12-eB9">
<rect key="frame" x="192.66666666666666" y="220" width="29" height="29"/>
<state key="normal" image="favDeselected"/>
<connections>
<action selector="addFavAction:" destination="93H-3c-Ahx" eventType="touchUpInside" id="bJf-G4-0oX"/>
<action selector="addFavAction:" destination="BBj-Xn-BVA" eventType="touchUpInside" id="dNR-nX-HCV"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Agregar como favorito" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="36q-za-DNf">
<rect key="frame" x="135.33333333333337" y="259" width="143.66666666666663" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="36q-za-DNf" firstAttribute="top" secondItem="Dej-12-eB9" secondAttribute="bottom" constant="10" id="6PC-Fg-OjM"/>
<constraint firstAttribute="trailing" secondItem="P7J-pG-iAR" secondAttribute="trailing" constant="30" id="9bh-Gd-AbW"/>
<constraint firstAttribute="height" constant="300" id="FLA-gV-jGm"/>
<constraint firstItem="P7J-pG-iAR" firstAttribute="leading" secondItem="ax0-Ne-2Ho" secondAttribute="leading" constant="30" id="FXo-x4-rlQ"/>
<constraint firstItem="P7J-pG-iAR" firstAttribute="top" secondItem="xwK-Uu-tf4" secondAttribute="bottom" constant="20" id="Kxq-3j-aI5"/>
<constraint firstItem="xwK-Uu-tf4" firstAttribute="top" secondItem="ax0-Ne-2Ho" secondAttribute="top" constant="50" id="OZe-hf-4mY"/>
<constraint firstItem="36q-za-DNf" firstAttribute="centerX" secondItem="ax0-Ne-2Ho" secondAttribute="centerX" id="PGm-6O-vu2"/>
<constraint firstItem="xwK-Uu-tf4" firstAttribute="leading" secondItem="ax0-Ne-2Ho" secondAttribute="leading" constant="30" id="Slg-Ma-AyR"/>
<constraint firstItem="Dej-12-eB9" firstAttribute="centerX" secondItem="ax0-Ne-2Ho" secondAttribute="centerX" id="ZCG-k0-Qeu"/>
<constraint firstAttribute="trailing" secondItem="xwK-Uu-tf4" secondAttribute="trailing" constant="30" id="lGt-NU-tim"/>
<constraint firstItem="Dej-12-eB9" firstAttribute="top" secondItem="P7J-pG-iAR" secondAttribute="bottom" constant="50" id="rTi-Ja-AmP"/>
</constraints>
</view>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstItem="f1I-sW-5FL" firstAttribute="bottom" secondItem="9gz-fy-Ekp" secondAttribute="bottom" id="H0l-M8-4mG"/>
<constraint firstItem="f1I-sW-5FL" firstAttribute="width" secondItem="85g-AY-a97" secondAttribute="width" id="PRg-fz-2ji"/>
<constraint firstItem="f1I-sW-5FL" firstAttribute="leading" secondItem="9gz-fy-Ekp" secondAttribute="leading" id="WW5-zW-ePC"/>
<constraint firstItem="f1I-sW-5FL" firstAttribute="trailing" secondItem="9gz-fy-Ekp" secondAttribute="trailing" id="XPJ-3M-jHa"/>
<constraint firstItem="f1I-sW-5FL" firstAttribute="top" secondItem="9gz-fy-Ekp" secondAttribute="top" id="rr1-SX-fcu"/>
</constraints>
<viewLayoutGuide key="contentLayoutGuide" id="9gz-fy-Ekp"/>
<viewLayoutGuide key="frameLayoutGuide" id="85g-AY-a97"/>
</scrollView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="Sho-HH-lpU" secondAttribute="bottom" id="Oxl-Na-9Fw"/>
<constraint firstItem="Sho-HH-lpU" firstAttribute="leading" secondItem="mqF-qd-eZ4" secondAttribute="leading" id="fmf-WA-eyY"/>
<constraint firstItem="Sho-HH-lpU" firstAttribute="top" secondItem="mqF-qd-eZ4" secondAttribute="top" id="kIh-3X-U1m"/>
<constraint firstItem="Sho-HH-lpU" firstAttribute="trailing" secondItem="mqF-qd-eZ4" secondAttribute="trailing" id="ptA-Jh-346"/>
</constraints>
<viewLayoutGuide key="safeArea" id="mqF-qd-eZ4"/>
</view>
<navigationItem key="navigationItem" id="pps-E7-VUw"/>
<connections>
<outlet property="addFavButton" destination="Dej-12-eB9" id="guB-hO-LsT"/>
<outlet property="contactPhoneNumberButton" destination="xwK-Uu-tf4" id="s3Q-UV-1Qc"/>
<outlet property="favoritoLabel" destination="36q-za-DNf" id="rjl-YR-rX8"/>
<outlet property="howToGetButton" destination="P7J-pG-iAR" id="Acy-Lv-REM"/>
<outlet property="vendorCommentaryLabel" destination="rNl-UG-fue" id="lHn-Zb-aVu"/>
<outlet property="vendorCommentaryView" destination="mMP-dK-DYE" id="ATU-wL-f4a"/>
<outlet property="vendorNameLabel" destination="lAL-u1-Ddg" id="xAF-yb-O4z"/>
<segue destination="ktO-EJ-yQB" kind="unwind" identifier="yourIdHere" unwindAction="unwindToViewControllerAWithSegue:" id="5Me-HD-ra3"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ocp-ut-2jD" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
<exit id="ktO-EJ-yQB" userLabel="Exit" sceneMemberID="exit"/>
</objects>
<point key="canvasLocation" x="3816" y="879"/>
</scene>
</scenes>
<resources>
<image name="favButton" width="22" height="22"/>
<image name="favDeselected" width="29" height="29"/>
<image name="infoButton" width="24" height="24"/>
<image name="logoBig" width="76" height="100"/>
<image name="logoSmall" width="27" height="35"/>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="15400" systemVersion="19E287" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="FeatureData" representedClassName=".FeatureData" syncable="YES">
<attribute name="comentarios" optional="YES" attributeType="String"/>
<attribute name="contacto" optional="YES" attributeType="String"/>
<attribute name="latitude" optional="YES" attributeType="String"/>
<attribute name="longitude" optional="YES" attributeType="String"/>
<attribute name="nombre" optional="YES" attributeType="String"/>
</entity>
<elements>
<element name="FeatureData" positionX="-54" positionY="9" width="128" height="118"/>
</elements>
</model>
\ No newline at end of file
......@@ -2,7 +2,12 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>googlechromes</string>
<string>comgooglemaps</string>
</array>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Nos permite usar su ubicacion actual?</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Nos permite usar su ubicacion actual?</string>
......
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="15400" systemVersion="19E287" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
<entity name="Favorito" representedClassName=".Favorito" syncable="YES">
<attribute name="comentario" attributeType="String"/>
<attribute name="contacto" attributeType="String"/>
<attribute name="latitude" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
<attribute name="longitude" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
<attribute name="nombre" attributeType="String"/>
</entity>
<elements>
<element name="Favorito" positionX="-45" positionY="0" width="128" height="118"/>
</elements>
</model>
\ No newline at end of file
//
// FavToVendorViewController.swift
// ProductosPY
//
// Created by Mobile Roshka on 5/18/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import UIKit
import CoreData
class FavToVendorViewController: UIViewController {
@IBOutlet weak var favoritoLabel: UILabel!
@IBOutlet weak var contactPhoneNumberButton: UIButton!
@IBOutlet weak var howToGetButton: UIButton!
@IBOutlet weak var addFavButton: UIButton!
@IBOutlet weak var vendorCommentaryView: UIView!
@IBOutlet weak var vendorNameLabel: UILabel!
@IBOutlet weak var vendorCommentaryLabel: UILabel!
var isData:Bool = false
var feature:Favorito? = nil
var currentCoordinates:String = ""
override func viewDidLoad() {
super.viewDidLoad()
//print("El feature es \(feature!)")
setupViews()
print("Hay dato: \(isData)")
}
func setupViews() {
vendorNameLabel.textColor = Constants.fontTitleColorVendor
vendorNameLabel.text = feature?.nombre
containCommmentary()
contactPhoneNumberButton.backgroundColor = Constants.backgroundColorButton
contactPhoneNumberButton.layer.cornerRadius = 20
contactPhoneNumberButton.setTitle("CONTACTAR", for: .normal)
//contactPhoneNumberButton.setTitleColor(UIColor.white, for: .normal)
howToGetButton.backgroundColor = Constants.backgroundColorButton
howToGetButton.layer.cornerRadius = 15
howToGetButton.setTitle("COMO LLEGAR", for: .normal)
if checkData() {
addFavButton.setImage(UIImage(named: "favSelected"), for: .normal)
favoritoLabel.text = "Quitar de favorito"
}
}
func checkData() -> Bool{
let results = fetchData()
for result in results {
if result.nombre == feature?.nombre && result.contacto == feature?.contacto {
isData = true
return true
}
}
isData = false
return false
}
func fetchData() ->[Favorito] {
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let context = appDelegate.persistentContainer.viewContext
let fetchRequest = NSFetchRequest<Favorito>(entityName: "Favorito")
do {
let results = try context.fetch(fetchRequest)
return results
} catch {
print("No existe el dato")
}
return []
}
@IBAction func contactPhoneNumberAction(_ sender: Any) {
if let url = URL(string: "tel://\(feature?.contacto)"),UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
@IBAction func howToGetAction(_ sender: Any) {
let latDouble = feature?.latitude
let longDouble = feature?.longitude
// Primero pregunta si esta instalada la App DE GOOGLE MAPS
if let url = URL(string: "comgooglemaps://?saddr=\(currentCoordinates)&daddr=\(latDouble!),\(longDouble!)&directionsmode=driving"),UIApplication.shared.canOpenURL(url) {
print("comgoogle maps worked")
if #available(iOS 10, *) {
UIApplication.shared.open(url, options: [:], completionHandler:nil)
} else {
UIApplication.shared.openURL(url)
}
} else {
// Sino procede a abrir el navegador
if let url = URL(string: "https://www.google.com/maps/dir/?saddr=\(currentCoordinates)&daddr=\(latDouble!),\(longDouble!)&directionsmode=driving"),UIApplication.shared.canOpenURL(url) {
print("google com maps worked")
if #available(iOS 10, *) {
UIApplication.shared.open(url, options: [:], completionHandler:nil)
} else {
UIApplication.shared.openURL(url)
}
} else {
print("error hermano la cagaste")
}
}
}
@IBAction func addFavAction(_ sender: Any) {
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let context = appDelegate.persistentContainer.viewContext
let results = fetchData()
if isData {
// Si existe el vendedor dentro del data Core se tiene que eliminar
for i in 0..<results.count {
if feature?.nombre == results[i].nombre && feature?.contacto == results[i].contacto {
context.delete(results[i])
do{
try context.save()
print("\(results[i]) borrado")
//alert(message: "Se ha quitado de favoritos", title: "Aviso")
self.performSegue(withIdentifier: "yourIdHere", sender: self)
addFavButton.setImage(UIImage(named: "favDeselected"), for: .normal)
favoritoLabel.text = "Agregar como favorito"
}catch{
print("error al borrar \(error)")
}
}
}
} else {
// Si no existe el vendedor dentro del data core Se tiene que guardar
guard let entityDescription = NSEntityDescription.entity(forEntityName: "Favorito", in: context) else { return }
let newFavorito = Favorito(entity: entityDescription, insertInto: context)
newFavorito.nombre = (feature?.nombre)!
newFavorito.comentario = (feature?.comentario)!
newFavorito.contacto = (feature?.contacto)!
newFavorito.latitude = feature!.latitude
newFavorito.longitude = feature!.longitude
do {
try context.save()
alert(message: "Se ha agregado a favoritos", title: "Aviso")
addFavButton.setImage(UIImage(named: "favSelected"), for: .normal)
favoritoLabel.text = "Quitar de favorito"
print(newFavorito)
} catch {
print("Error al guardar")
}
}
}
func containCommmentary() {
if feature?.comentario != "" {
vendorCommentaryView.isHidden = false
vendorCommentaryLabel.text = feature?.comentario
}
}
}
extension FavToVendorViewController {
func alert(message: String, title: String) {
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
let OKAction = UIAlertAction(title: "OK", style: .default, handler: nil)
alertController.addAction(OKAction)
self.present(alertController, animated: true, completion: nil)
}
}
//
// ScreenFiveFavoritesViewController.swift
// ProductosPY
//
// Created by Mobile Roshka on 5/18/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import UIKit
import Foundation
import CoreData
class ScreenFiveFavoritesViewController: UIViewController {
@IBOutlet weak var alertView: UIView!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var favoriteTableView: UITableView!
@IBOutlet weak var mostrarMasButton: UIButton!
@IBOutlet weak var eliminarButton: UIButton!
var currentCoordinates:String = ""
var favoritos = [Favorito]()
var favSelected = Favorito()
override func viewDidLoad() {
super.viewDidLoad()
initAlertView()
initTableView()
titleLabel.textColor = Constants.fontTitleColorVendor
}
func initAlertView() {
alertView.backgroundColor = UIColor.white
alertView.layer.cornerRadius = 10
alertView.layer.shadowColor = UIColor.black.cgColor
alertView.layer.shadowOffset = .zero
alertView.layer.shadowOpacity = 0.2
alertView.layer.shadowRadius = 10.0
alertView.layer.shadowPath = UIBezierPath(rect: alertView.bounds).cgPath
alertView.layer.shouldRasterize = true
mostrarMasButton.backgroundColor = Constants.backgroundColorButton
eliminarButton.backgroundColor = UIColor(red: 0.72, green: 0.00, blue: 0.00, alpha: 1.00)
}
@IBAction func muestraVendedorAction(_ sender: Any) {
initTableView()
performSegue(withIdentifier: "favToVendorSegue", sender: favSelected)
}
@IBAction func eliminaVandedorAction(_ sender: Any) {
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let context = appDelegate.persistentContainer.viewContext
let results = fetchData()
for i in 0..<results.count {
if favSelected.nombre == results[i].nombre && favSelected.contacto == results[i].contacto {
context.delete(results[i])
do{
try context.save()
initTableView()
}catch{
print("error al borrar \(error)")
}
}
}
}
func initTableView() {
favoritos = fetchData()
alertView.isHidden = true
favoriteTableView.isHidden = false
favoriteTableView.delegate = self
favoriteTableView.dataSource = self
favoriteTableView.reloadData()
favoriteTableView.tableFooterView = UIView(frame: .zero)
favoriteTableView.separatorColor = UIColor.clear
}
}
extension ScreenFiveFavoritesViewController: UITableViewDataSource, UITableViewDelegate {
func customCellConstuctor(cell: FavoriteCell) -> FavoriteCell {
let myCellFav = cell
myCellFav.cellView.backgroundColor = UIColor.white
myCellFav.cellView.layer.cornerRadius = 10
myCellFav.cellView.layer.shadowColor = UIColor.black.cgColor
myCellFav.cellView.layer.shadowOffset = .zero
myCellFav.cellView.layer.shadowOpacity = 0.2
myCellFav.cellView.layer.shadowRadius = 10.0
myCellFav.cellView.layer.shadowPath = UIBezierPath(rect: myCellFav.cellView.bounds).cgPath
myCellFav.cellView.layer.shouldRasterize = true
myCellFav.comentarioLabel.textColor = Constants.fontSubTextColor
myCellFav.titleLabel.textColor = Constants.fontTitleColorVendor
return myCellFav
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let myCellFav = tableView.dequeueReusableCell(withIdentifier: "favoritoCell", for: indexPath) as! FavoriteCell
let myCellFavCustom = customCellConstuctor(cell: myCellFav)
myCellFavCustom.titleLabel.text = favoritos[indexPath.row].nombre
myCellFavCustom.comentarioLabel.text = favoritos[indexPath.row].comentario
return myCellFav
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return favoritos.count
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 150.0
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let id = segue.identifier
{
if id == "favToVendorSegue"
{
let feature:Favorito = sender as! Favorito
let screenFavToVendor = segue.destination as! FavToVendorViewController
screenFavToVendor.feature = feature
screenFavToVendor.currentCoordinates = currentCoordinates
}
}
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
view.bringSubviewToFront(alertView)
alertView.isHidden = false
tableView.isHidden = true
favSelected = favoritos[indexPath.row]
}
}
extension ScreenFiveFavoritesViewController {
func fetchData() ->[Favorito] {
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let context = appDelegate.persistentContainer.viewContext
let fetchRequest = NSFetchRequest<Favorito>(entityName: "Favorito")
do {
let results = try context.fetch(fetchRequest)
return results
} catch {
print("Error al traer los datos del DataCore")
}
return []
}
@IBAction func unwindToViewControllerA(segue: UIStoryboardSegue) {
DispatchQueue.global(qos: .userInitiated).async {
DispatchQueue.main.async {
print("Entro aca")
self.initTableView()
self.alert(message: "Se ha quitado de de favoritos", title: "Aviso")
}
}
}
}
extension ScreenFiveFavoritesViewController {
func alert(message: String, title: String) {
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
let OKAction = UIAlertAction(title: "OK", style: .default, handler: nil)
alertController.addAction(OKAction)
self.present(alertController, animated: true, completion: nil)
}
}
//
// ScreenForDetailsViewController.swift
// ProductosPY
//
// Created by Mobile Roshka on 5/14/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import UIKit
import CoreData
class ScreenForDetailsViewController: UIViewController {
@IBOutlet weak var favoritoLabel: UILabel!
@IBOutlet weak var contactPhoneNumberButton: UIButton!
@IBOutlet weak var howToGetButton: UIButton!
@IBOutlet weak var addFavButton: UIButton!
@IBOutlet weak var vendorCommentaryView: UIView!
@IBOutlet weak var vendorNameLabel: UILabel!
@IBOutlet weak var vendorCommentaryLabel: UILabel!
var isData:Bool = false
var feature:Feature? = nil
var currentCoordinates:String = ""
override func viewDidLoad() {
super.viewDidLoad()
//print("El feature es \(feature!)")
setupViews()
print("Hay dato: \(isData)")
}
func setupViews() {
vendorNameLabel.textColor = Constants.fontTitleColorVendor
vendorNameLabel.text = feature?.properties.nombre
containCommmentary()
contactPhoneNumberButton.backgroundColor = Constants.backgroundColorButton
contactPhoneNumberButton.layer.cornerRadius = 20
contactPhoneNumberButton.setTitle("CONTACTAR", for: .normal)
//contactPhoneNumberButton.setTitleColor(UIColor.white, for: .normal)
howToGetButton.backgroundColor = Constants.backgroundColorButton
howToGetButton.layer.cornerRadius = 15
howToGetButton.setTitle("COMO LLEGAR", for: .normal)
if checkData() {
addFavButton.setImage(UIImage(named: "favSelected"), for: .normal)
favoritoLabel.text = "Quitar de favorito"
}
}
func checkData() -> Bool{
let results = fetchData()
for result in results {
if result.nombre == feature?.properties.nombre && result.contacto == feature?.properties.contacto {
isData = true
return true
}
}
isData = false
return false
}
func fetchData() ->[Favorito] {
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let context = appDelegate.persistentContainer.viewContext
let fetchRequest = NSFetchRequest<Favorito>(entityName: "Favorito")
do {
let results = try context.fetch(fetchRequest)
return results
} catch {
print("No existe el dato")
}
return []
}
@IBAction func contactPhoneNumberAction(_ sender: Any) {
if let url = URL(string: "tel://\(feature?.properties.contacto)"),UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
@IBAction func howToGetAction(_ sender: Any) {
let latDouble = Double((feature?.geometry.coordinates[1])!)
let longDouble = Double((feature?.geometry.coordinates[0])!)
// Primero pregunta si esta instalada la App DE GOOGLE MAPS
if let url = URL(string: "comgooglemaps://?saddr=\(currentCoordinates)&daddr=\(latDouble),\(longDouble)&directionsmode=driving"),UIApplication.shared.canOpenURL(url) {
print("comgoogle maps worked")
if #available(iOS 10, *) {
UIApplication.shared.open(url, options: [:], completionHandler:nil)
} else {
UIApplication.shared.openURL(url)
}
} else {
// Sino procede a abrir el navegador
if let url = URL(string: "https://www.google.com/maps/dir/?saddr=\(currentCoordinates)&daddr=\(latDouble),\(longDouble)&directionsmode=driving"),UIApplication.shared.canOpenURL(url) {
print("google com maps worked")
if #available(iOS 10, *) {
UIApplication.shared.open(url, options: [:], completionHandler:nil)
} else {
UIApplication.shared.openURL(url)
}
} else {
print("error hermano la cagaste")
}
}
}
@IBAction func addFavAction(_ sender: Any) {
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let context = appDelegate.persistentContainer.viewContext
let results = fetchData()
if isData {
// Si existe el vendedor dentro del data Core se tiene que eliminar
for i in 0..<results.count {
if feature?.properties.nombre == results[i].nombre && feature?.properties.contacto == results[i].contacto {
context.delete(results[i])
do{
try context.save()
print("\(results[i]) borrado")
alert(message: "Se ha quitado de favoritos", title: "Aviso")
addFavButton.setImage(UIImage(named: "favDeselected"), for: .normal)
favoritoLabel.text = "Agregar como favorito"
}catch{
print("error al borrar \(error)")
}
}
}
} else {
// Si no existe el vendedor dentro del data core Se tiene que guardar
guard let entityDescription = NSEntityDescription.entity(forEntityName: "Favorito", in: context) else { return }
let newFavorito = Favorito(entity: entityDescription, insertInto: context)
newFavorito.nombre = (feature?.properties.nombre)!
newFavorito.comentario = (feature?.properties.comentarios)!
newFavorito.contacto = (feature?.properties.contacto)!
newFavorito.latitude = (feature?.geometry.coordinates[1])!
newFavorito.longitude = (feature?.geometry.coordinates[0])!
do {
try context.save()
alert(message: "Se ha agregado a favoritos", title: "Aviso")
addFavButton.setImage(UIImage(named: "favSelected"), for: .normal)
favoritoLabel.text = "Quitar de favorito"
print(newFavorito)
} catch {
print("Error al guardar")
}
}
}
func containCommmentary() {
if feature?.properties.comentarios != "" {
vendorCommentaryView.isHidden = false
vendorCommentaryLabel.text = feature?.properties.comentarios
}
}
}
extension ScreenForDetailsViewController {
func alert(message: String, title: String) {
let alertController = UIAlertController(title: title, message: message, preferredStyle: .alert)
let OKAction = UIAlertAction(title: "OK", style: .default, handler: nil)
alertController.addAction(OKAction)
self.present(alertController, animated: true, completion: nil)
}
}
......@@ -13,58 +13,273 @@ import GoogleMapsUtils
class ScreenTwoViewController: UIViewController {
@IBOutlet weak var gMapsView: GMSMapView!
let locationManager = CLLocationManager()
@IBOutlet weak var searchBarView: UISearchBar!
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var mapView: GMSMapView!
var locationManager: CLLocationManager!
var currentLocation: CLLocation?
var currentCoordinates:String = ""
//var placesClient: GMSPlacesClient!
var zoomLevel: Float = 15.0
var featureCollection = FeatureCollection(type: "Type", features: [])
var featureWithDistance = [FeatureWithDistance]()
override func viewWillAppear(_ animated: Bool) {
locationManager = CLLocationManager()
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.requestAlwaysAuthorization()
locationManager.startUpdatingLocation()
locationManager.delegate = self
}
var myLat:Double = 0
var myLong:Double = 0
override func viewDidLoad() {
super.viewDidLoad()
initMapView()
tableView.delegate = self
tableView.dataSource = self
tableView.tableFooterView = UIView(frame: .zero)
searchBarView.showsCancelButton = true
searchBarView.delegate = self
getData()
getCurrentLocation()
print(myLat)
print(myLong)
let camera = GMSCameraPosition(latitude: myLat, longitude: myLong, zoom: 20.0)
gMapsView.settings.compassButton = true
gMapsView.isMyLocationEnabled = true
gMapsView.settings.myLocationButton = true
gMapsView.camera = camera
// LLamma a servicio que saque del ejemplo de Vlads
HTTPClient.request(endpoint: "https://productospy.org/api/vendors", method: .get, encoding: .json, parameters: nil, headers: nil, onSuccess: {(c:FeatureCollection)->Void in
print("Lo que recibo es: \(c)")
}, onFailure: {(e:APIError)->Void in
print("El error es \(e.message!)")
})
}
func initMapView() {
// Se instancia el mapa
let camera = GMSCameraPosition.camera(withLatitude: 54.12, longitude: 150.12, zoom: self.zoomLevel)
mapView.camera = camera
mapView.settings.myLocationButton = true
mapView.isMyLocationEnabled = true
mapView.isHidden = true
mapView.bringSubviewToFront(tableView)
//tableView.isHidden = false
mapView.delegate = self
}
func getData() {
let url = "https://productospy.org/api/vendors"
HTTPClient.request(endpoint: url, method: .get, encoding: .json, parameters: nil, headers: nil, onSuccess: {(c:FeatureCollection)->Void in
print("Ya trajo el data")
self.featureCollection = c
self.addFeatureCollectionInTheMap()
}, onFailure: {(e:APIError)->Void in
print("El error es \(e.message!)")
})
}
func addFeatureCollectionInTheMap() {
featureWithDistance = []
var position = CLLocationCoordinate2D()
var c = 0
let icon = UIImage(named: "markerNormal")
for feature in featureCollection.features {
let marker = GMSMarker()
if let latitude = feature.geometry.coordinates[1] {
position.latitude = latitude
} else {
position.latitude = 0.0
}
if let longitude = feature.geometry.coordinates[0] {
position.longitude = longitude
} else {
position.latitude = 0.0
}
if !position.longitude.isZero && !position.latitude.isZero {
let finalLocation = CLLocation(latitude: position.latitude, longitude: position.longitude)
let distance = currentLocation?.distance(from: finalLocation)
let km = distance!/1000
marker.position = position
marker.title = String(c)
marker.icon = icon
marker.map = mapView
featureWithDistance.append(FeatureWithDistance(feature: feature, distance: Double(round(100*(km))/100), id: String(c)))
}
c += 1
}
print(c)
}
func hideKeyoard() {
let Tap:UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(dissmissKeyboard))
view.addGestureRecognizer(Tap)
}
@objc func dissmissKeyboard() {
view.endEditing(true)
searchBarView.endEditing(true)
}
@IBAction func informationAppAction(_ sender: Any) {
performSegue(withIdentifier: "screenThreInfomationSegue", sender: nil)
}
func getCurrentLocation() {
// Ask for Authorisation from the User.
self.locationManager.requestAlwaysAuthorization()
@IBAction func favoritesAction(_ sender: Any) {
performSegue(withIdentifier: "screenFiveFavoritesSigue", sender: nil)
}
}
// Delegates to handle events for the location manager.
extension ScreenTwoViewController: CLLocationManagerDelegate {
// Handle incoming location events.
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
let location: CLLocation = locations.last!
print("Location: \(location)")
currentLocation = location
currentCoordinates = "\(location.coordinate.latitude),\(location.coordinate.longitude)"
let camera = GMSCameraPosition.camera(withLatitude: location.coordinate.latitude,
longitude: location.coordinate.longitude,
zoom: zoomLevel)
if mapView.isHidden {
mapView.isHidden = false
mapView.camera = camera
} else {
mapView.animate(to: camera)
}
}
// Handle authorization for the location manager.
func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
switch status {
case .restricted:
print("Location access was restricted.")
case .denied:
print("User denied access to location.")
// Display the map using the default location.
mapView.isHidden = false
case .notDetermined:
print("Location status not determined.")
case .authorizedAlways: fallthrough
case .authorizedWhenInUse:
print("Location status is OK.")
@unknown default:
fatalError()
}
}
// For use in foreground
self.locationManager.requestWhenInUseAuthorization()
// Handle location manager errors.
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
locationManager.stopUpdatingLocation()
print("Error: \(error)")
}
}
if CLLocationManager.locationServicesEnabled() {
locationManager.delegate = self
locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters
locationManager.startUpdatingLocation()
extension ScreenTwoViewController: GMSMapViewDelegate {
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let id = segue.identifier
{
if id == "screenForDetailSegue"
{
let feature:Feature = sender as! Feature
let screenForDetail = segue.destination as! ScreenForDetailsViewController
screenForDetail.feature = feature
screenForDetail.currentCoordinates = currentCoordinates
} else if id == "screenFiveFavoritesSigue" {
let screenFiveFavorites = segue.destination as! ScreenFiveFavoritesViewController
screenFiveFavorites.currentCoordinates = currentCoordinates
}
}
}
func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool {
print("tap marcador \(marker.title)")
if let pk = marker.title {
let index = Int(pk)
performSegue(withIdentifier: "screenForDetailSegue", sender: self.featureCollection.features[index!])
} else {
print("Error al recibir la pk")
}
return true
}
}
extension ScreenTwoViewController: UITableViewDataSource, UITableViewDelegate {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return featureWithDistance.count
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 100.0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let myDistanceVendorsCell = tableView.dequeueReusableCell(withIdentifier: "DistanceVendorCell", for: indexPath) as! DistanceVendorsCell
myDistanceVendorsCell.nombreLabel.textColor = Constants.fontTitleColorVendor
myDistanceVendorsCell.comentarioLabel.textColor = Constants.fontSubTextColor
myDistanceVendorsCell.distanceLabel.text = String(featureWithDistance[indexPath.row].distance)
myDistanceVendorsCell.nombreLabel.text = featureWithDistance[indexPath.row].feature.properties.nombre
myDistanceVendorsCell.comentarioLabel.text = featureWithDistance[indexPath.row].feature.properties.comentarios
return myDistanceVendorsCell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
mapView.clear()
searchBarView.endEditing(true)
searchBarView.searchTextField.text = featureWithDistance[indexPath.row].feature.properties.nombre
searchBarView.reloadInputViews()
tableView.isHidden = true
var position = CLLocationCoordinate2D()
let icon = UIImage(named: "markerNormal")
let marker = GMSMarker()
position.latitude = featureWithDistance[indexPath.row].feature.geometry.coordinates[1]!
position.longitude = featureWithDistance[indexPath.row].feature.geometry.coordinates[0]!
marker.position = position
marker.title = featureWithDistance[indexPath.row].id
marker.icon = icon
marker.map = mapView
let camera = GMSCameraPosition.camera(withLatitude: position.latitude, longitude: position.longitude, zoom: self.zoomLevel)
mapView.camera = camera
}
}
extension ScreenTwoViewController: UISearchBarDelegate {
func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
if searchText.isEmpty == false {
featureWithDistance = searchFeatureWithDistance(searchText: searchText)
tableView.isHidden = false
tableView.reloadData()
} else {
//aparte
searchBar.endEditing(true)
searchBarView.endEditing(true)
tableView.isHidden = true
getData()
tableView.reloadData()
}
}
extension ScreenTwoViewController: CLLocationManagerDelegate {
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
guard let locValue: CLLocationCoordinate2D = manager.location?.coordinate else { return }
print("locations = \(locValue.latitude) \(locValue.longitude)")
myLat = locValue.latitude
myLong = locValue.longitude
func searchFeatureWithDistance(searchText: String)-> [FeatureWithDistance] {
var featureWithDistanceFilter:[FeatureWithDistance] = []
for feature in featureWithDistance {
if feature.feature.properties.comentarios.uppercased().contains(searchText.uppercased()) || feature.feature.properties.nombre.uppercased().contains(searchText.uppercased()) {
featureWithDistanceFilter.append(feature)
}
}
featureWithDistanceFilter = featureWithDistanceFilter.sorted(by:{
$0.distance < $1.distance
})
return featureWithDistanceFilter
}
func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
searchBar.endEditing(true)
searchBarView.endEditing(true)
}
func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
searchBar.endEditing(true)
searchBarView.endEditing(true)
}
}
......@@ -56,46 +56,49 @@ class ViewController: UIViewController {
}
}
@IBOutlet var principalView: UIView!
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var pageController: UIPageControl!
@IBOutlet weak var startButton: UIButton!
let locationManager = CLLocationManager()
var locationManager: CLLocationManager!
override func viewDidAppear(_ animated: Bool) {
if UserDefaults.standard.bool(forKey: "Walkthrough") {
performSegue(withIdentifier: "screenTwoSegue", sender: nil)
} else {
principalView.isHidden = false
}
}
override func viewDidLoad() {
super.viewDidLoad()
getCurrentLocation()
startButton.backgroundColor = Constants.backgroundColorButton
startButton.setTitle("Empezar", for: .normal)
startButton.setTitleColor(UIColor.white, for: .normal)
startButton.layer.cornerRadius = 15
view.bringSubviewToFront(pageController)
// Se llama la funcion que configura el Scroll View
configScrollView(pages: pages)
pageController.pageIndicatorTintColor = Constants.pointPageColor
// Numero de pagina
pageController.numberOfPages = pages.count
// Pagina que va iniciar el pageController
pageController.currentPage = 0
initCurrentLocation()
startButton.backgroundColor = Constants.backgroundColorButton
startButton.setTitle("Empezar", for: .normal)
startButton.setTitleColor(UIColor.white, for: .normal)
startButton.layer.cornerRadius = 15
view.bringSubviewToFront(pageController)
// Se llama la funcion que configura el Scroll View
configScrollView(pages: pages)
pageController.pageIndicatorTintColor = Constants.pointPageColor
// Numero de pagina
pageController.numberOfPages = pages.count
// Pagina que va iniciar el pageController
pageController.currentPage = 0
}
func getCurrentLocation() {
// Ask for Authorisation from the User.
self.locationManager.requestAlwaysAuthorization()
// For use in foreground
self.locationManager.requestWhenInUseAuthorization()
if CLLocationManager.locationServicesEnabled() {
locationManager.delegate = self
locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters
locationManager.startUpdatingLocation()
}
func initCurrentLocation() {
locationManager = CLLocationManager()
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.requestAlwaysAuthorization()
locationManager.startUpdatingLocation()
locationManager.delegate = self
}
// Este prosedimiento configura el scrollView segun las paginas creadas mas arriba
// Recibe como parametro una lista de paginas que luego son agregadas a lo ancho del scrollView para asi poder scrollear de forma horizontal
func configScrollView(pages: [PageView]) {
......@@ -110,6 +113,7 @@ class ViewController: UIViewController {
@IBAction func startActionButton(_ sender: Any) {
UserDefaults.standard.set(true, forKey: "Walkthrough")
performSegue(withIdentifier: "screenTwoSegue", sender: nil)
}
......@@ -127,10 +131,30 @@ extension ViewController: UIScrollViewDelegate {
}
}
// Delegates to handle events for the location manager.
extension ViewController: CLLocationManagerDelegate {
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
guard let locValue: CLLocationCoordinate2D = manager.location?.coordinate else { return }
print("locations = \(locValue.latitude) \(locValue.longitude)")
// Handle authorization for the location manager.
func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
switch status {
case .restricted:
print("Location access was restricted.")
case .denied:
print("User denied access to location.")
case .notDetermined:
print("Location status not determined.")
case .authorizedAlways: fallthrough
case .authorizedWhenInUse:
print("Location status is OK.")
@unknown default:
fatalError()
}
}
// Handle location manager errors.
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
locationManager.stopUpdatingLocation()
print("Error: \(error)")
}
}
//
// screenThreInfomationViewController.swift
// ProductosPY
//
// Created by Mobile Roshka on 5/17/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import UIKit
class screenThreInfomationViewController: UIViewController {
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var terminosUsoButton: UIButton!
@IBOutlet weak var repoButton: UIButton!
@IBOutlet weak var licenciaLabel: UILabel!
@IBOutlet weak var registrarVendedorButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
@IBAction func terminosUsoAction(_ sender: Any) {
guard let url = URL(string: "https://productospy.org/disclaimer") else { return }
UIApplication.shared.open(url)
}
@IBAction func registrarVendedorAction(_ sender: Any) {
guard let url = URL(string: "https://productospy.org/vendor") else { return }
UIApplication.shared.open(url)
}
@IBAction func mostrarRepoAction(_ sender: Any) {
guard let url = URL(string: "https://phoebe.roshka.com/gitlab/cvargas/ProductosPY") else { return }
UIApplication.shared.open(url)
}
}
//
// CustomMarkerView.swift
// ProductosPY
// googlMapTutuorial2
//
// Created by Mobile Roshka on 5/13/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
// Created by Muskan on 12/17/17.
// Copyright © 2017 akhil. All rights reserved.
//
import Foundation
import UIKit
class CustomMarkerView: UIView {
var img: UIImage!
var borderColor: UIColor!
init(frame: CGRect, image: UIImage, borderColor: UIColor, tag: Int) {
super.init(frame: frame)
self.img=image
self.borderColor=borderColor
self.tag = tag
setupViews()
}
func setupViews() {
let imgView = UIImageView(image: img)
imgView.frame=CGRect(x: 0, y: 0, width: 50, height: 50)
imgView.layer.cornerRadius = 25
imgView.layer.borderColor=borderColor?.cgColor
imgView.layer.borderWidth=4
imgView.clipsToBounds=true
let lbl=UILabel(frame: CGRect(x: 0, y: 45, width: 50, height: 10))
lbl.text = "▾"
lbl.font=UIFont.systemFont(ofSize: 24)
lbl.textColor = borderColor
lbl.textAlignment = .center
self.addSubview(imgView)
self.addSubview(lbl)
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
//
// DistanceVendorsCell.swift
// ProductosPY
//
// Created by Mobile Roshka on 5/18/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import UIKit
class DistanceVendorsCell: UITableViewCell {
@IBOutlet weak var nombreLabel: UILabel!
@IBOutlet weak var comentarioLabel: UILabel!
@IBOutlet weak var distanceLabel: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
//
// FavoriteCell.swift
// ProductosPY
//
// Created by Mobile Roshka on 5/18/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import Foundation
import UIKit
class FavoriteCell: UITableViewCell {
@IBOutlet weak var cellView: UIView!
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var comentarioLabel: UILabel!
}
//
// Favorito.swift
// ProductosPY
//
// Created by Mobile Roshka on 5/18/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import UIKit
import CoreData
class Favorito: NSManagedObject {
@NSManaged var comentario:String
@NSManaged var contacto:String
@NSManaged var latitude:Double
@NSManaged var longitude:Double
@NSManaged var nombre:String
}
......@@ -14,4 +14,6 @@ struct Constants {
static let backgroundColorButton = UIColor(red: 0.08, green: 0.35, blue: 0.82, alpha: 1.00)
static let pointCurrentPageColor = UIColor(red: 0.20, green: 0.80, blue: 1.00, alpha: 1.00)
static let pointPageColor = UIColor(red: 0.85, green: 0.85, blue: 0.85, alpha: 1.00)
static let fontTitleColorVendor = UIColor(red: 0.00, green: 0.24, blue: 0.67, alpha: 1.00)
static let fontSubTextColor = UIColor(red: 0.71, green: 0.71, blue: 0.71, alpha: 1.00)
}
......@@ -5,28 +5,29 @@
// Created by Mobile Roshka on 5/11/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import Foundation
// MARK: - FeatureCollection
struct FeatureCollection: Codable {
let type: String?
let type: String
let features: [Feature]
}
// MARK: - Feature
struct Feature: Codable {
let type: String?
let type: FeatureType
let geometry: Geometry
let properties: Properties
}
// MARK: - Geometry
struct Geometry: Codable {
let coordinates: [Decimal]
let type: GeometryType
let coordinates: [Double?]
}
enum GeometryType: String, Codable {
case point = "Point"
}
// MARK: - Properties
......@@ -37,12 +38,57 @@ struct Properties: Codable {
// MARK: - Producto
struct Producto: Codable {
let productName, productType: String
}
let productName: ProductName
let productType: ProductType
extension Geometry {
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
coordinates = [Decimal(try container.decode(Double.self, forKey: .coordinates))]
enum CodingKeys: String, CodingKey {
case productName = "product_name"
case productType = "product_type"
}
}
enum ProductName: String, Codable {
case agua = "Agua"
case alcoholEnGel = "Alcohol en gel"
case alcoholRectificado = "Alcohol rectificado"
case canastaBásica = "Canasta básica"
case cocidoQuemado = "Cocido quemado"
case comidaDulceOSalada = "Comida dulce o salada"
case costureroA = "Costurero/a"
case frutas = "Frutas"
case guantes = "Guantes"
case hipocloritoDeSodio = "Hipoclorito de sodio"
case jabónDeCoco = "Jabón de coco"
case negocioFerreteríaFarmaciaDespensaEtc = "Negocio (Ferretería, farmacia, despensa, etc)"
case papel = "Papel"
case ropaVestimenta = "Ropa, vestimenta"
case servicios = "Servicios"
case tapabocas = "Tapabocas"
case toalla = "Toalla"
case verduras = "Verduras"
}
enum ProductType: String, Codable {
case agua = "agua"
case alcoholRectificado = "alcohol_rectificado"
case canastaBasica = "canasta_basica"
case cocidoQuemado = "cocido_quemado"
case comida = "comida"
case costurera = "costurera"
case frutas = "frutas"
case gelAlcohol = "gel_alcohol"
case guantes = "guantes"
case hipocloritoSodio = "hipoclorito_sodio"
case jabonCoco = "jabon_coco"
case negocio = "negocio"
case papel = "papel"
case ropa = "ropa"
case servicios = "servicios"
case tapabocas = "tapabocas"
case toalla = "toalla"
case verduras = "verduras"
}
enum FeatureType: String, Codable {
case feature = "Feature"
}
//
// FeatureWithDistance.swift
// ProductosPY
//
// Created by Mobile Roshka on 5/18/20.
// Copyright © 2020 Mobile Roshka. All rights reserved.
//
import Foundation
struct FeatureWithDistance {
let feature:Feature
let distance:Double
let id:String
}
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