Access a variable local and globally

Access a variable local and globally

how can we access a variable local and globel??

View Answers

October 21, 2010 at 11:17 AM

hello,

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

like this

appDelegate.variable.....









Related Tutorials/Questions & Answers:
Access a variable local and globally
Access a variable local and globally  how can we access a variable local and globel??   hello, if you want to access your variable... your variable globally then declare it in the appDelegate file and then make
Local Variable and Instant Variable
Local Variable and Instant Variable  difference between Local Variable and Instant Variable   Difference between local variable... a method, while a local variable is declared within a method. Instance variable get
Advertisements
What is a local, member and a class variable?
What is a local, member and a class variable?   Hi, What is a local, member and a class variable? thanks
I want to store the value of local variable into Global variable
I want to store the value of local variable into Global variable    <%=cnt%>=x; is it a valid Statement
Local Variable ,Package & import
Local Variable ,Package & import A local variable has a local scope.Such... it is declared. Example of Local variable : The class variable are declared in the class but not within methods of any class. Whereas the local variable exits within
ModuleNotFoundError: No module named 'Local-Variable-Manager'
ModuleNotFoundError: No module named 'Local-Variable-Manager'  Hi...: No module named 'Local-Variable-Manager' How to remove the ModuleNotFoundError: No module named 'Local-Variable-Manager' error? Thanks   Hi
Difference between the local and class variable.
Description: The class variable are declared in the class but not within methods of any class. Whereas the local variable exits within the methods of any... between the class and local variable. Showing Local Variable
Creating a Local Variable in JSP
Creating a Local Variable in JSP     ... consider a situation where we have to declare a variable as local, then we should... or variable we usually declare it inside the declaration tag. If we declare
Creating a Local Variable in JSP
Creating a Local Variable in JSP      In jsp when we have to create a method or variable we usually declare... to declare a variable as local, then we should declare the methods and variables
please tell me the difference between local variable, staitic variables, and instance variables....
please tell me the difference between local variable, staitic variables, and instance variables....  please tell me the difference between local variable, staitic variables, and instance variables
PHP Global Variable
to access the globally declared variable. There is no limit to use global...PHP  Global Variable To access global variable in PHP we need to use... references to all global variables, the variable names are the keys
Flex Variable Scope
Scope of the variable defines the accessibility of the variable across the application. The global variable has global access to the application and local variable is restricted to the block of code only. The variable defined outside
access
access   This is Nitha Sriram i am having a problem that, i am having a combo box in the JSP page when i select an item from that i am calling the onchange function. In javascript i am getting the value now i want to pass
php local variables
php local variables  Creating and calling a local variable in PHP
php variable scope
php variable scope  How can i access a variable from scope of another function
php variable in javascript
php variable in javascript  Access php variables in Javascipt or Jquery rather than php echo $variable
Getting the Local port
Getting the Local port       In this section you will learn that how a user can access the Local... it will display the server's local port. For which we use a class ServerSocket which creates
Instance variable in java
kind of variable in java, they are as follows : Local variable Instance.... Access modifier can be given for instance variable. Instance variable have...Instance variable in java In this section you will learn about Instance
Access Specifiers and Access Modifiers
Access Specifiers and Access Modifiers  What are Access Specifiers and Access Modifiers
creating a global variable with php
creating a global variable with php  Is it possible to create a variable to declare as global in case of database connectivity?   Yes, if you want to have access of that variable anywhere in the program. See the example
Java Final Variable
Java Final Variable  I have some confusion --Final variable has single copy for each object so can we access final variable through class name,or it is necessary to create object for accessing final variable
Converting jsp variable to java variable
Converting jsp variable to java variable  Hi how to convert java script variable to java variable on same jsp page
Pointer a variable
Pointer a variable  hii, Pointer is a variable or not ?   hello,ADS_TO_REPLACE_1 Yes, a pointer is a variable
Java variable
Java variable   To what value is a variable of the String type automatically initialized
Passing variable
Passing variable  How to pass variable to HTTP object in HTMl or PHP
access specifiers and access modifiers
access specifiers and access modifiers  I want a powerpoint presentation for access specifiers and access modifiers. Please send me the same and soon
Referance variable - Java Interview Questions
Referance variable  by using which reference variable we declare instance variable as local variable in java   Hi friend,Local variables..., an area is pushed onto the call stack. This area contains slots for each local
final variable
final variable  Please give some easiest and understanding example program for final variable
environment variable
environment variable  what are the environment variable is need to run j2ee application in eclipse could you explain the details
environment variable
environment variable  what is environment variable in java?   Environment variables are used by the Operating System to pass configuration information to applications
Static Variable
Static Variable  What is the basic use of introducing static variable... that a certain object/variable is resident in memory and accessed each time an instance..., it means that the static variable is shared among all instances of the class
JSP Variable in Javascript
JSP Variable in Javascript          JSP Variable in Javascript helps you to pass jsp variable to javascript. The JavaScript include a function
MXML variable
MXML variable  Hi.... How can you access a var defined in 1 MXML flex in to another MXML file? please give the example for that so i clearly understand....... Thanks
PHP Variable Global
variable inside the function refers that it is a local variable and we can used...PHP Global Variables PHP Global variable are the variables which can be used... can use global variable in different-different ways, For example : PHP Global
PHP Static Variable and Methods
copy of the variable for the class. All objects of that class will access one copy... then we can access the method using class, without instantiating any object
Application Variable
anyone show a simple sample code of storing the connection data in a variable so
how to assign javascript variable value to a jsp variable
how to assign javascript variable value to a jsp variable  how to assign javascript variable value to a jsp variable
define string variable in php
define string variable in php  how to define string variable in PHP
global variable in objective c
global variable in objective c  Declaring global variable in objective c
php variable functions
php variable functions  Setting a variable in a class function, where can I use that variable
static variable in php
static variable in php  How can i call a global variable as a static variable
Access Specifier
Access Specifier  What's the usage of getter and setter in access specifier? Thank You
Access level
Access level  Which access level allows exclusive access to the attributes and methods that belong to a class or classes derived from that class? default protected public private
How to Access MS Access in jar.
How to Access MS Access in jar.  how do i access my Ms-Access file... to access it via Code or is their any alter-native?? Do i need any Driver to do this ... i m able to access a Ms-access via JDBC but cant find the file wen
how to inherit static variable
how to inherit static variable   how to inherit static variable or methods in Java?? Please explain the entire process of inheriting the variable. Thanks in advance
How to access session values through Ajax?
How to access session values through Ajax?  Suppose in a servlet a variable userName is kept in session. How can I access this variable from JSP through AJAX? Is it possible
php search variable
php search variable  Search variable in PHP
variable function in php
variable function in php  Can any one tell me how to write a variable function in PHP?   Go through the PHP Variable function tutorial ... PHP Variable Function
variable types in php - PHP
variable types in php  Do i need to explicitly specify the variable type in PHP
variable function in php
variable function in php  Can any one tell me how to write a variable function in PHP

Ads