Google Maps iOS SDK 1.6.1.6332 subviews not recognizing gesture recognizers

By: Kevin | January 7, 2014

I was recently working on a project that included Google Maps iOS SDK. I was adding custom UIViews to the map and wanted to have other custom animations with different gesture recognizers. I ran into an issue that none of my gesture recognizers were firing, after a day of pounding my head it came down to a pretty simple change.

Below is the sample code provided on the main page of the Google Maps SDK for iOS page. The code below will successfully display a map however for some reason when you use the below snippet adding subviews is a no go!

#import <GoogleMaps/GoogleMaps.h>
#import "DemoViewController.h"

@implementation DemoViewController

- (void)viewDidLoad {
[super viewDidLoad];
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868
longitude:151.2086
zoom:6];

//Notice the "CGRectZero"
GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectZero camera:camera];

GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = camera.target;
marker.snippet = @"Hello World";
marker.animated = YES;

//And this
self.view = mapView;
}

@end

 

With two minor tweaks (noted) I got the behavior I wanted. Just manually change the frame of the map and add the map as a subview of the UIViewControllers view instead of assigning it as the view. Thats it, does the trick!

#import <GoogleMaps/GoogleMaps.h>
#import "DemoViewController.h"

@implementation DemoViewController

- (void)viewDidLoad {
[super viewDidLoad];
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.868
longitude:151.2086
zoom:6];

/*Here I set the frame manually*/
GMSMapView *mapView = [GMSMapView mapWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height) camera:camera];

GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = camera.target;
marker.snippet = @"Hello World";
marker.animated = YES;

/*Now I add the map as a subview*/
[self.view addSubview:self.map];
}
@end

Hope this helps someone else. Cheers!

myXY – the latest of my creations

By: Kevin | August 5, 2013

Welcome myXY users!

Over the past several months I’ve created an idea that’s been brewing in my mind for over a year! 
I love maps always have, always will. There are a lot apps out there but non that accomplished the things I wanted a mapping application to do, so I made my own. 
I hope you enjoy myXY as much as I do. If you have any questions, concerns, or ideas please feel free to leave a comment below and I will get back to you as soon as possible.

Thanks for visiting!
Kev

Hello Cedar Valley Humane Society!

By: Kevin | October 25, 2012

My first iOS app (ARL of IA) has been a great success!! To keep the momentum going, I looked for another project I have hooked up with the Cedar Valley Humane Society (CVHS or CVHumane) in Cedar Rapids, IA.

My cat, Kibby, Adopted from the Cedar Valley Humane Society August 2009.

 Like my first app, I’ve donated my time creating this app for the CVHS. My knowledge continues to grow and this time I decided to take on a new challenge.

My goal for the CVHuane app was to learn something new, while more importantly, making a simple user interface for potential adopters to browser available adoptables for the Cedar Valley Humane Society. The app will work with iOS 5.1 and up, however works best with the most current iOS 6.

Screen shot from my iPhone 5 of the new CVHumane App.

I hope to submit the CVHumane for App Store approval soon!

P.S. Android users hold onto your hats, I’m working on yours next! Keep an eye on my Android Blog for progress updates.

V1.1 now supports more photos!!

By: Kevin | September 30, 2012

Hello all,

An update is coming and this time you’ll be able to scroll through up to four pictures per animal!! Hip hip hooray!!

I’ve added multi-photo support, better error handling if the server is being a jerk, added iOS 6 support so you can now share favorite pets with your Facebook friends, new single share button and a few other under the hood improvements.

I hope you enjoy the new updates!!

Kev

V1.2 More Photos, better error handling

By: Kevin | September 30, 2012

Some of you have experienced the app crashing when launching. This has mostly been out of my control.

Some times the server that hosts all the animal data goes down for maintenance, when it does the app try’s to get animal data an the server doesn’t give it any, therefore the app doesn’t know what to do and explodes (aka crashes).

In version 1.2 I have made strides to keep the app from crashing during this circumstance. Although the main functionality of the app is rendered useless if this happens the app will now stay running and tell you what the problem is.

A more fun item, PICTURES!! I’ve upgraded the app to support up to four photos per animal. Of course not all the animals have multiple photos but the ones that do you can now scroll through them horizontally!

If you have any suggestions please feel free to share them with me!

That’s all for now.

Kev

Server Issue causing ARL of IA iOS not to load animals

By: Kevin | September 11, 2012

UPDATE: 9/11/2012 3:15pm CST- the server appears to have gone back up. App should be working normally now. Happy tails!!!  

Around 11 am (CST) today, 9/11/2012, the server supplying adoptable animal information went down. As such the ARL of IA iOS app opens but does not load any animals. The server issue is being diagnosed and hopefully a fix will be resolved shortly. In the mean time both Android and iOS ARL of IA apps will be unavailable. Sorry for the interruption and thanks for your patience!

Thanks, kev.

ARL of IA iOS App v1.0.1 Fixes Crash

By: Kevin | September 5, 2012
FIXED IT!
 
Sorry for the down time everyone! Due to some unforeseen and uncontrollable software issues the ARL of IA iOS app was out of commission for most of the day on September 3rd and 4th, 2012. 
 
If you haven’t already, go to the App Store and make sure the app up to date.
This app is brand new and completely donated. As such a few kinks were likely to occur at first however I believe I’ve gotten things back in order.
I plan to continue to innovate this app and add features as my knowledge base grows and time allows. 
I hope you find that this app makes it easier to search the pets available for adoption and that you will share the app with those looking for a new companion.
Thanks for supporting the Animal Rescue League of Iowa!!
Kev

ARL of IA iOS App Crashing

By: Kevin | September 3, 2012

Hello all,

Unfortunately the ARL of IA iOS app (Version 1.0) is crashing when you try to open the app. The issue has been identified and corrected. An update will be out soon.

New version 1.0.1 fixes include:
-Fixed issue causing app to crash when the app was launched.
-Fixed false error message stating a “connection error” has occurred.
-Fixed issue causing “

” tags in animal summary.
-Fixed rate app link. Now links you to app store without error, to rate the app.

Sorry for the inconvenience. Keep an eye out for up for the update in the app store.

Thanks for your patience!

ARL of IA iOS App – A Little About The Developer

By: Kevin | July 23, 2012

Hello and welcome. My name is Kevin (Kev) and I decided to start a blog dedicated to a hobby of mine, technology. In particular, iOS programming. I’ve always been interested computers and technology and was once a computer science major…though I switched studies later.

Although the computer science gig didn’t turn into a career for me, I’ve managed to stay in touch with the trends and have enjoyed experimenting as a newbie programmer in iOS. I enjoy a good challenge to keep my wheels turning.   I decided I wanted to take on a project that hadn’t been done yet, or at least very infrequently done. I didn’t want to learn how to program simply to know how to do it. I wanted to make a meaningful, useful app that someone  would directly benefit from. So, as a hobbyist developer, I have donated many hours of my time to create the Animal Rescue League of Iowa (ARL of IA) iOS App. I have taught myself everything from scratch, with help from a book and my friend Google search.

I created the ARL of IA iOS app on my own behalf and contacted The Animal Rescue League of Iowa, giving them the option to use the program I wrote free of charge. Since this app was designed and built by me, Kev, I will continue to do all the maintenance and updates as needed. This blog will serve as the main point of contact for the app. I check this blog often so please leave comments below with troubles, likes, dislikes, etc. I like to hear feedback.

Thanks for taking a minute to look at the Animal Rescue League of Iowa’s iOS app. Now let’s find these homeless animals the families they deserve!

Enjoy! 🙂

Kev

Sent from my iPhone