Skip to content
Browse files

switched button position in first VC, changed number of wifi results,…

… other tweaks
  • Loading branch information...
1 parent 963018a commit 1613a9119ab445bd6eb6b8aa444dfc50d9245625 @xirianlight xirianlight committed Mar 25, 2013
View
BIN Default-568h@2x.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2 MappingMashupApp/APIManager.h
@@ -30,7 +30,7 @@
@property (strong, nonatomic) id <APIManagerDelegate> delegate;
- (APIManager*)initWithFlickrSearch:(NSString*)search andVenue:(Venue*)venue;
-- (APIManager*)initWithYelpSearch:(NSString*)search andLocation:(CLLocationCoordinate2D)userLocation;
+- (APIManager*)initWithYelpSearch:(NSString*)search andLocation:(CLLocationCoordinate2D)userLocation withMaxResults: (int) maxItems;
- (void)searchYelpThenFlickrForDelegates;
- (void)searchYelpForDelegates;
View
4 MappingMashupApp/APIManager.m
@@ -18,7 +18,7 @@ @implementation APIManager
// Initialize Yelp APIManager w/ custom API call
// Passes in custom search string and user's current location
//
-- (APIManager*)initWithYelpSearch:(NSString*)search andLocation:(CLLocationCoordinate2D)userLocation
+- (APIManager*)initWithYelpSearch:(NSString*)search andLocation:(CLLocationCoordinate2D)userLocation withMaxResults: (int) maxItems
{
//
// float latitude = 41.894032;
@@ -28,7 +28,7 @@ - (APIManager*)initWithYelpSearch:(NSString*)search andLocation:(CLLocationCoord
float longitude = userLocation.longitude;
NSLog(@"%f", longitude);
- int maxItems = 6;
+// maxItems = 6;
float radius = 0.402336;
View
24 MappingMashupApp/FlickrMapViewController.m
@@ -33,6 +33,8 @@ @interface FlickrMapViewController ()
__weak IBOutlet MKMapView *mapView;
__weak IBOutlet UIView *loadingOverlay;
+ //Just to deal with map zoom issue
+ BOOL isZoomedInYet;
}
@@ -46,7 +48,7 @@ @implementation FlickrMapViewController
- (void)viewDidLoad
{
[super viewDidLoad];
-
+ isZoomedInYet = NO;
//God help us, please make the location services work! Puh_LEASE JESUS
//[self startLocationUpdates];
//Moved this here (ross 3.25.13)
@@ -61,9 +63,9 @@ - (void)viewDidLoad
//Add refresh button to Bookmarks viewController --CURRENTLY GOES TO BOOKMARKS, NEED TO WRITE METHOD FOR THIS
- self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refreshButtonPressed)];
+ self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refreshButtonPressed)];
//Add bookmarks button to viewController
- self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks target:self action:@selector(bookmarkButtonPressed)];
+ self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemBookmarks target:self action:@selector(bookmarkButtonPressed)];
//Created method "bookmarkButtonPressed, currently has no action - End edit
@@ -93,8 +95,9 @@ - (void)viewDidLoad
[mapView addOverlay:overlay];
-
- APIManager *mrAPIManager = [[APIManager alloc] initWithYelpSearch:@"free%20wifi" andLocation:mobileMakers];
+ //- (APIManager*)initWithYelpSearch:(NSString*)search andLocation:(CLLocationCoordinate2D)userLocation withMaxResults: (int) maxItems
+
+ APIManager *mrAPIManager = [[APIManager alloc] initWithYelpSearch:@"free%20wifi" andLocation:mobileMakers withMaxResults:6];
//deleagtion begins
mrAPIManager.delegate = self;
@@ -210,8 +213,12 @@ - (void)addPinsToMap:(NSMutableArray*)venuesArray;
MKCoordinateRegion region = {missLocationManager.location.coordinate, span};
//set region to mapview
+ if (isZoomedInYet == NO)
+ {
+
[mapView setRegion:region animated:YES];
-
+ isZoomedInYet = YES;
+}
for (int i = 0; i < venuesArray.count; i++)
@@ -304,8 +311,9 @@ -(MKAnnotationView*)mapView:(MKMapView*)mapView viewForAnnotation:(id<MKAnnotati
//Maybe stop loading scren here?
- [UIView animateWithDuration:2 animations:^(void) {
- loadingOverlay.alpha = 0;}];
+ [UIView animateWithDuration:3.5 delay:2.0 options:nil animations:^(void) { loadingOverlay.alpha = 0;} completion:^(BOOL finished){}];
+// [UIView animateWithDuration:3.5 animations:^(void) {
+// loadingOverlay.alpha = 0;}];
if([annotation isKindOfClass: [MKUserLocation class]])
{
View
2 MappingMashupApp/YelpMapViewController.m
@@ -71,7 +71,7 @@ - (void)viewDidLoad
MKCoordinateRegion originRegion = {originLocationCoordinate, originSpan};
- APIManager *yelpAPIManager = [[APIManager alloc] initWithYelpSearch:@"free%20wifi" andLocation:originLocationCoordinate];
+ APIManager *yelpAPIManager = [[APIManager alloc] initWithYelpSearch:@"free%20wifi" andLocation:originLocationCoordinate withMaxResults:15];
yelpAPIManager.delegate = self;
//Add Bookmarks button
View
2 MappingMashupApp/en.lproj/MainStoryboard.storyboard
@@ -61,7 +61,7 @@
</activityIndicatorView>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Experience your surroundings. Tap something interesting and we'll show you where you can get online" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="GWX-UP-W0P">
<rect key="frame" x="20" y="429" width="285" height="91"/>
- <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+ <autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
View
7 ~
@@ -0,0 +1,7 @@
+Merge branch 'ross'
+
+# Please enter a commit message to explain why this merge is necessary,
+# especially if it merges an updated upstream into a topic branch.
+#
+# Lines starting with '#' will be ignored, and an empty message aborts
+# the commit.

0 comments on commit 1613a91

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