How to add awesomness to your icons?

So the other day one of my twitter followers showed me an awesome application. As you all know I suck at drawing, any time I do an iPhone app I get icons from an artist. Most of the time the artist will give me an icon that looks really nice but they don’t have the extras that I need. The program is called Icons.

So this is the original image that I made.

The icons program will export your icon in several different formats.

It can add a shine and rounded corners to your image.

Or you can just add rounded corners.

You can all so add an OpenFeint overlay to any corner.

Over all the Icons application is a great buy. It is only 2.99. If you would like to purchase it you can find it in the app store.

Posted in cocos2d | 2 Comments

Improving the Web View 1/4. UIActivityIndicatorView

This tutorial continues on from How to use Open Flow to create a menu, so make sure you get the code. This tutorial is going to show you how to add an UIActivityIndicatorView that is the little gray loading signal.

To begin go to FirstViewController.h and insert the following after the declaration of the UIWebView.

IBOutlet UIActivityIndicatorView *m_activity;
@property (nonatomic, retain) UIActivityIndicatorView *m_activity;

In FirstViewController.m right after @implementation FirstViewController insert the following.

@synthesize m_activity;

And then after the init method

- (void)webViewDidFinishLoad:(UIWebView *)webView {
        [m_activity stopAnimating];
        UIApplication* app = [UIApplication sharedApplication];
        app.networkActivityIndicatorVisible = NO;

- (void)webViewDidStartLoad:(UIWebView *)webView {
        [m_activity startAnimating];
    UIApplication* app = [UIApplication sharedApplication];
        app.networkActivityIndicatorVisible = YES;

Save and then double click on the FirstViewr.xib file.
In the interface builder add an activity indicator to the center of the web view.

Then select Hide when stopped.

If you saved the .h and .m file then under File’s Owner you should see m_activity click the circle and drag it over to the gray activity indicator.

Save and run and you should see the spinning gray indicator when you click one of the menu buttons
code for Improving the web view 1/4

Posted in cocos2d | 5 Comments

Change the initial tab view.

I have a tab bar app that I am making for my job and my boss wanted the the third tab item to come up when the app began instead of the first one. This is very easily implemented. In your appdelegate.m file

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait];
    // Add the tab bar controller’s view to the window and display.
    [window addSubview:tabBarController.view];
//Take this line this line and put it in your code.
        tabBarController.selectedIndex = 2;
    [window makeKeyAndVisible];

    return YES;

The important line is

tabBarController.selectedIndex = 2;

This line pragmatically changes the selectedIndex and there you go now your tab bar will show the third view on start up instead of the first.

Posted in cocos2d | 12 Comments

How to use Open Flow to create a menu.

Open flow gives your app a cover flow like effect and we will use this to create a menu. You will need a current iPhone app with at least one view with a .xib file. I will be using the code from Beginning iPhone dev adding a web view.

The wordpress icon is not mine I got it from
Continue reading

Posted in Regular iPhone Apps | 4 Comments

How to use NSLog to debug with Xcode.

We will use the console, and NSLog to find out what our bug is. Continue reading

Posted in cocos2d | Leave a comment

Beginning iPhone dev adding a web view

In this tutorial I will show you how to add a web view to your app.

Continue reading

Posted in Regular iPhone Apps | 2 Comments

Beginning C++ getting input from a user.

This tutorial will show you how to get input from a user and then display it on the screen.

Continue reading

Posted in C++ | Leave a comment

Beginners guild to C++

In this tutorial we will do a simple hello world example to make sure that you have every thing set up right. All my c++ examples can be coded with any compiler but I will be using Xcode which is a free development environment for the mac.

Continue reading

Posted in C++ | Leave a comment

RPG Battle with Cocos2d part three.

Finally part three of the RPG Battle is here. We will make it so the player can only attack after the monster is done attacking, delay the monster attack by two seconds, allow the player to level up and add in saving. If you haven’t already download the code from part two and lets get started.

Continue reading

Posted in cocos2d | 5 Comments

Saving with Cocos2d

This tutorial will show you how to save an integer to your iphone.
Continue reading

Posted in cocos2d | 4 Comments