Dec 13

iPhone 5S – Creating Proper Background Image Size

For those of you who have been battling the annoying required zoom/arrange method of ios7 on the iPhone 5s, here is a simple method to create perfectly centered and aligned background images using Photoshop:

1.) Create an image that is the iPhone 5s default resolution of 640px X 1136px with a Pixels per Inch of 327 (standard for retina display).

2.) Resize the canvas to 840px X 1336px (200px extra horizontal/vertical).

3.) extend a background color or blend as desired.

4.) Email to your iPhone 5s and choose to make it your background.

5.) Use the required alignment tools to simply center the image to now have a perfectly aligned image that appears to be the true 640px X 1136px background.

Thanks for reading and I hope this is of help to someone!

May 11

Using Singletons for iPhone iOS 4 Global Variables

Hello Everyone,

I recently began working with iOS 4 for the programming of a highly complex mobile asset management system to complement the online system. I ran in to an issue when I was trying to create global variables to store things such as GPS info, so after hours and hours of research I came upon a great way to create a singleton globals class to manage global variables that can be used for setting and getting in any object throughout your app. Wordsworth wrote a great post so here is the link to visit:


The post provides a lot of great information but it lacked the final bit that taught how to actually use the final class in a real scenario. Here are my bits to finalize the info:

I added the following under the *.h, I named mine GlobalsObject.h:

NSString *general;

With a method as follows:

@property (nonatomic, copy) NSString *general;

I then added the following under the *.m, I named mine GlobalsObject.m:

@synthesize general;

Then I was able to get and set the saved global information by adding the following under the other object:

// set the value of the global “general” variable I created in the singleton class

-(IBAction) setValue:(id)sender {

[[GlobalsObject sharedInstance] setGeneral:@”test”];


// get the value of the global “general” variable that was set in the “setValue” action

-(IBAction) setTextValue:(id)sender {

barcode.text = [[GlobalsObject sharedInstance] general];


Please let me know if you have any questions and thanks for visiting my blog.

Nick Napier



Oct 09

Why is a Normalized Relational Database so important?

I know many web developers that choose to ignore the importance of a quality normalized database. When beginning a web development project that uses database driven components, the first thing that should ever be considered is what data will be required. Before the website design ever begins, the developer must first interview staff to find out exactly what data will need to be made available on the website. Once a list of all the data elements has been completed, they must next be organized into proper tables where the relationship with other data and tables can be established.

Don’t make the mistake of developing a database as you go because it will only lead to bad structure, duplicated data, and unneeded complicated queries. Save yourself the trouble and design your relational database ahead of time. You never know, designing your database may help to also define the flow of not only data but also the overall structure of your web application. If you are stuck or need a little assistance getting started with data flow diagrams, data definitions, or even advanced ER diagrams, then don’t hesitate to contact me at nick@nicknapier.com.

Jul 09

New Blog Launch

Hello and thank you for visiting my blog. This blog will be used to post guides, tutorials, and news about programming and technology. Please check back often for updates. Please click the “RSS” button on the upper right of the page to sign up for the RSS Feed.