Skip to content
Browse files

added photo view to yelp map view

  • Loading branch information...
1 parent debd090 commit 6b85c10cf5fadb2026e207c3755a03c2b2672074 @cozmoboy cozmoboy committed Mar 25, 2013
Showing with 55 additions and 21 deletions.
  1. +7 −16 MappingMashupApp/YelpMapViewController.m
  2. +48 −5 MappingMashupApp/en.lproj/MainStoryboard.storyboard
View
23 MappingMashupApp/YelpMapViewController.m
@@ -33,6 +33,7 @@ @interface YelpMapViewController ()
// NSMutableArray *venuesArray;
NSMutableArray *photosArray;
+ __weak IBOutlet UIImageView *photoViewerUIImageView;
__weak IBOutlet MKMapView *yelpMapView;
}
@@ -79,22 +80,12 @@ - (void)viewDidLoad
//Note bookmarkButtonPressed method needs to be copied in
- // Allocate objects
- // [possibly allocate the venuesArray later?]
- //Commented line 63 our 3.21.13
- //venuesArray = [[NSMutableArray alloc]init];
- //
- //This view controller SUCCESSFULLY imports the starting lat/long from the Flickr view controller.
- //VenuesArray is nil here (empty pointer)
- //Yelp API manager didn't kick us out of this class to APIManager.m
- //Need to verify that this Yelp search (with no Flickr results) is using the passed lat/long.
- //If you go to this VC by tapping a disclosure button from previous one, it will crash.
- //Segue does work, data makes it over, THEN it crashes
- //Crash appears to confirm on "didreceiveYelpData
- //We end up at lat/long 0/0 when this runs, so look into location services problems
- //
- //Need to make the below a new, separate Yelp search that does NOT touch Flickr anything.
- //
+ NSString *photoFullSizeURLString = [originPhotoThumbnailString stringByReplacingOccurrencesOfString:@"s.jpg" withString:@"n.jpg"];
+ NSURL *photoFullSizeURL = [NSURL URLWithString:photoFullSizeURLString];
+
+ NSData *photoData = [NSData dataWithContentsOfURL:photoFullSizeURL];
+ UIImage *photoFullSize = [UIImage imageWithData:photoData];
+ photoViewerUIImageView.image = photoFullSize;
Annotation *originAnnotation = [[Annotation alloc] initWithCoordinate:originLocationCoordinate title:originPhotoTitle subtitle:@"Your Selected Photo" urlString:originPhotoThumbnailString];
View
53 MappingMashupApp/en.lproj/MainStoryboard.storyboard
@@ -13,16 +13,21 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<mapView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" mapType="standard" id="fse-RH-zXz">
- <rect key="frame" x="0.0" y="0.0" width="320" height="548"/>
+ <rect key="frame" x="0.0" y="-62" width="320" height="374"/>
<connections>
<outlet property="delegate" destination="2" id="43E-w0-dI6"/>
</connections>
</mapView>
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" id="RGB-yg-ZJ4">
+ <rect key="frame" x="0.0" y="309" width="320" height="195"/>
+ <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ </imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" title="WiFi Locations" id="ONv-7V-dEl"/>
<connections>
+ <outlet property="photoViewerUIImageView" destination="RGB-yg-ZJ4" id="f5B-9i-u7Z"/>
<outlet property="yelpMapView" destination="fse-RH-zXz" id="HHQ-eP-hJK"/>
<segue destination="qVE-kj-ncM" kind="push" identifier="toYelpWebPage" id="grn-P3-leO"/>
<segue destination="jTz-JW-Bre" kind="push" identifier="yelpPageToBookmarks" id="IAP-L1-hhl"/>
@@ -89,11 +94,11 @@
<objects>
<viewController id="qVE-kj-ncM" customClass="YelpWebPageBrowser" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="wEa-dC-5Et">
- <rect key="frame" x="0.0" y="64" width="320" height="455"/>
+ <rect key="frame" x="0.0" y="64" width="320" height="504"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<webView contentMode="scaleToFill" id="tBs-TS-l6k">
- <rect key="frame" x="0.0" y="0.0" width="320" height="455"/>
+ <rect key="frame" x="0.0" y="0.0" width="320" height="504"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<gestureRecognizers/>
<connections>
@@ -307,13 +312,51 @@
<image name="loadingPage.png" width="640" height="1136"/>
<image name="webviewpopout_shelf@2x.png" width="640" height="94"/>
</resources>
+ <classes>
+ <class className="BookmarksViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/BookmarksViewController.h"/>
+ <relationships>
+ <relationship kind="outlet" name="tableViewOutlet" candidateClass="UITableView"/>
+ </relationships>
+ </class>
+ <class className="FlickrMapViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/FlickrMapViewController.h"/>
+ <relationships>
+ <relationship kind="outlet" name="loadingOverlay" candidateClass="UIView"/>
+ <relationship kind="outlet" name="mapView" candidateClass="MKMapView"/>
+ </relationships>
+ </class>
+ <class className="HistoryViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/HistoryViewController.h"/>
+ <relationships>
+ <relationship kind="outlet" name="historyTableViewOutlet" candidateClass="UITableView"/>
+ </relationships>
+ </class>
+ <class className="YelpMapViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/YelpMapViewController.h"/>
+ <relationships>
+ <relationship kind="outlet" name="photoViewerUIImageView" candidateClass="UIImageView"/>
+ <relationship kind="outlet" name="yelpMapView" candidateClass="MKMapView"/>
+ </relationships>
+ </class>
+ <class className="YelpWebPageBrowser" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/YelpWebPageBrowser.h"/>
+ <relationships>
+ <relationship kind="action" name="swipeLeftAction:"/>
+ <relationship kind="action" name="swipeRightAction:"/>
+ <relationship kind="outlet" name="popoutView" candidateClass="UIView"/>
+ <relationship kind="outlet" name="popoutViewTextLabel" candidateClass="UILabel"/>
+ <relationship kind="outlet" name="webView" candidateClass="UIWebView"/>
+ </relationships>
+ </class>
+ </classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
- <segue reference="Th0-2G-EcE"/>
- <segue reference="2lD-vN-oPh"/>
+ <segue reference="grn-P3-leO"/>
+ <segue reference="IAP-L1-hhl"/>
</inferredMetricsTieBreakers>
</document>

0 comments on commit 6b85c10

Please sign in to comment.
Something went wrong with that request. Please try again.