Return to WrightsCS.com   |   Check out WrightsCSApps.com   |   How to Post Snippets  

Not registered? Thats okay! You can Submit a Snippet without being a member of this site!

I like to use 1 controller for my universal apps. There’s no need to use RootViewController.h and RootViewController~iPad.h and write the same code twice! Here is how I use 1 controller for both iPad and iPhone specific code. If you haven’t read my post on how I use Macros, check it out. One way to […]

I find it easier to use html hex colors instead of converting RGB to UIColor blah blah blah. So here is a sweet little snippet to do just that. This piece of code allows me to use Photoshop or any other software with a color picker to get a specific color and use it in […]

I just recently started using a Globals.h file as my staging ground for my macros. Where ever you want to use any of the macros, just use #import “Globals.h”. You can use this file to store an AppDelegate instance and many other static options you wish to use. Here is an example of what one […]

Here are a few examples of how to add a UINavigationBar item, wether it’s a “Done” button or an Action button, these can be done in 1 line of code as well (throughout your main source files of course). How to use: In the first example, @”Back” is used as the button title telling the […]

Quick and easy check to see if the iOS app is running on the iOS Simulator and display a message. You can also pre-define the message and remove (MSG). How to use: This example is similar to UIAlertView Shortcut Macro, only difference is there is 1 argument.

I just recently got heavily into using preprocessor macros. These macros cut down on code in your main source files. Here is an easy way to use a macro to show a UIAlertViewM in 1 line of code. When using a multiline macro like this example, you insert a \ at the end of each […]

This portion of the site is dedicated to source code snippets. Read more below to learn what languages are supported and how to properly place your snippet into a post. You can also include some information on what your code does, why it is significant, or any other info you think would be useful to […]

© Copyright 2011 Wright's Computer Services.   All rights reserved Suffusion theme by Sayontan Sinha