Chapter 7 Bronze Challenge


#1

For the Chapter 7 Bronze Challenge, I added WhereAmIViewController.h + .m and BNRMapPoint.h + .m to the HypnoTime project. Then I added the UITabBar item to the “- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil” method in WhereAmIViewController.m. I also created a custom UITabBar image for the 3rd item.

[code]UITabBarItem *tbi = [self tabBarItem];
[tbi setTitle:@“Where Am I?”];

    UIImage *i = [UIImage imageNamed:@"Graphic4.png"];
    
    [tbi setImage:i];[/code]

I’m not sure if this is the way I was supposed to do it but it seems to work and if I understand correctly, displays the portability of classes between projects. Comments and concerns with doing it this way are welcome as I am still fairly new to this.


#2

I thought about doing this, but then I thought it would be more fun to create an entirely new MapViewController class. It was not more fun. :frowning:

The flexibility and portability of classes between projects is quite interesting. This leads me to believe that there are probably many class libraries (such as Apple’s standard ones) out there that are made by everyday iOS Developers.

To anyone attempting this method, REMEMBER to add your frameworks to HypnoTime!


#3

[quote=“tagabek”]I thought about doing this, but then I thought it would be more fun to create an entirely new MapViewController class. It was not more fun. :frowning:

The flexibility and portability of classes between projects is quite interesting. This leads me to believe that there are probably many class libraries (such as Apple’s standard ones) out there that are made by everyday iOS Developers.

To anyone attempting this method, REMEMBER to add your frameworks to HypnoTime![/quote]

Same thing. All I wanted the app to do is to show world map on the third ViewController. I was thinking to add WhereamiViewController but then after reading it I realized how many things intertwined on there - BNRPoint, stupid Location Manager, and on top of that - the Delegate concept that I didn’t fully grasped. Having a really hard time trying to wrap my head around it. Hoping to gain more understanding by practicing more.
Now going to try Tom’s method.


#4

I think I learned the most when I actually tried to implement the MapView on my own into this project. Yes, I spent a lot of time on it, but it really showed my weak points in what I’ve learned previously. Especially dealing with xib files and linking various things.


#5

Seems like most of us took the same approach.

I was going to add WhereAmI, too. Then I looked at the files and realized there was a lot of work ahead to get this to work. I re-read the brozne challenge description and it askes to load MKMapView and not to load WhereAmI view.

So, I created a xib file and setup it that way - first time I did it was a real mess and 30 mins later I gave up and started over again. I find scrapping the messy code I had made and starting over was the better solution - i then completed the challenge in under ten minutes and learnt some new things. :smiley: