how can we access a variable local and globel??
if you want to access your variable with in the view then declare it in the view.h file
and if you want your variable globally then declare it in the appDelegate file
and then make an object for appDelegate file like this
YourAppDelegate *appDelegate = (YourAppDelegate *)[[UIApplication sharedApplication] delegate];
and then access your variable