0
votes
2answers
20 views

Local Decleration Hides Instance Variable - setting up ViewNavigation Controller

I am converting a simple app which was only a TabViewContoller to one where I need to push multiple views via Navagation controllers. The following Code: - (BOOL)application:(UIApplication ...
0
votes
2answers
41 views

Local variable being stored over different function calls. weird

I'm bewildered by whats happening. It's more of a trick question I don't know the answer to. I have the following function inside my main.m of an Objective-C program. int incrementCounter(){ ...
0
votes
2answers
45 views

setting a variable to CGPointMake

How can I set a variable to a CGMakePoint? I've tried setting and calling the variable in the following ways: I expected this one to work. float p0[] = {0, 100}; UIBezierPath *point = ...
-2
votes
4answers
64 views

How to use value of a variable in ObjectiveC?

I just start to learn ObjectiveC and I have a problem. I have a variable in a for loop , this variable change value at any iteration and I want get his value. Here my problem the variable is "name": ...
1
vote
1answer
48 views

float dashPattern[] = {10, 5};

Hopefully someone can help me understand this variable: float dashPattern[] = {10, 5}; This is considered a variable? Right? It does what I want it to but I don't know why. I know it's based on ...
0
votes
0answers
71 views

Property set in different class always returns NULL

How can I properly set a property created in another class, Class A, in a secondary class, Class B? I understand how to setup properties and synthesize them. //The property is created in Class A's ...
0
votes
2answers
56 views

Access an array according to a NSString's value

In my app the user has twelve buttons available, and I have defined twelve NSMutableArrays. If the user clicks button one, the app should count the number of objects in the Comp1 array, or if user ...
0
votes
2answers
76 views

Declaring instance variables in iOS (XCode)

Ok, I've read a lot around these days about this topic and I alwyas get confused because the answers is different every search I make. I need to know the best way to declare instance variables in ...
-5
votes
2answers
54 views

Variables in cycle objective-c [closed]

Is this possible? I have variables IBOutlet UIButton * myButton1; IBOutlet UIButton * myButton2; IBOutlet UIButton * myButton3 .... IBOutlet UIButton * myButton(n) if I can refer to them in the ...
0
votes
2answers
51 views

adressing a “numbered” variable when moving slider, Objective-C

In my Mac OS X project I have a slider and a couple of "numbered" NSImageView outlets. Depending on the sliders value I would like to address the corresponding NSImageView for further actions. ...
-1
votes
2answers
53 views

Automatically creating class instances [duplicate]

Is it possible to create dynamically instances of a class giving them specific names (e.g. Friend1, Friend2, etc)? I have a "Friends" class with some instance variables (e.g. Name and Surname). In my ...
-3
votes
2answers
123 views

Setting static variables in Objective C

I can't seem to find a way to set the static int I have created to assign unique ids to every object I save to persistent memory. The following gives me a 'no setter method 'setIdGen' for assignment ...
1
vote
2answers
55 views

Similar method in ObjectiveC for 'java.lang.Class.getDeclaredField()' [duplicate]

I am reading a text file. I want to check whether there is a variable declared in the class with name same as the text that I read from the file. Method for this in java is ...
0
votes
2answers
60 views

Transfer variable between viewcontrollers [duplicate]

I have a problem with my iOS App Project. I want to transfer a value of my SearchViewController to my ResultGeneralInfoViewController. There are no bugs or issues but it doesn't work. Here my Code in ...
-1
votes
2answers
52 views

Xcode: How do I put this into a loop? [closed]

I am fairly new to xcode and trying to make my code more efficient. I have the code below and I want to put the repeated lines at the end into a loop (there are many more items in the array). I am ...

1 2 3 4 5 17
15 30 50 per page