Tagged Questions
0
votes
1answer
34 views
Program crashing after adding subview from NSMutableArray
Right now I have a UIView with two subviews on it. I am trying to add another subview to one of those views, from a custom-made Card class. The problem is that the subview is coming from an ...
0
votes
3answers
75 views
Objective C why are the objects from my NSMutableArray disappearing?
I'm new to Objective-C and iOS. I'm having trouble with something that is probably easily corrected, but I have no idea why it's happening.
I'll try to give a brief description of what I'm doing and ...
1
vote
2answers
77 views
how to set a property of an object inside a NSArray
I have written a class which has a property, I want to add instances of this class into a mutable array and after that I want to set the num property of the instances. but I dont know the correct ...
0
votes
2answers
63 views
NSMutableAray RemoveObject: Not Working As Expected
I have recently begun working with cocoa and Objective-C, although I am not new to software concepts, and I have come across some curious and unanticipated behavior in the NSMutableArray Class.
...
0
votes
1answer
31 views
NSMutableArray collection and @Synchronized blocks
In Objective C I'm using a NSMutableArray instance from various thread and I'm using @synchronized to make it thread safe. currently all my acces to this array are protected with a @synchronized ...
-1
votes
2answers
34 views
How to sort multi-dimensional array in objective-c?
I'm having a two dimensional array as follows
NSArray *cities = [NSArray arrayWithObjects:@"New Delhi",@"Karachi",@"Dhaka",@"Columbu", nil];
NSArray *distance = [NSArray ...
0
votes
1answer
40 views
Copy NSMutableArray and change it
I have method :
-(void)ModifyArray:(NSMutableArray)orginalArray
{
NSMutableArray* copy = [[NSMutableArray alloc]init];
copy = [orginalArray copy];
Field* field = [copy objectAtIndex:0];
[copy ...
0
votes
3answers
35 views
how add empty object on 2D array
I have 2D NSMutableArray with my class objects.
Example:
NSMutableArray *myArray2D = [[NSMutableArray alloc] init];
for (int i=0;i<10;i++) {
NSMutableArray *myArray = [[NSMutableArray ...
0
votes
1answer
36 views
How to use insertObjectAtIndex
in my app there is are 4 textFields (0,1,2,3). When the user type something and hit the return-Key, i want to save the content of this textField in an array. But i need the right order. For example, ...
0
votes
2answers
30 views
About modifying contents of NSMutableArray
I have a NSMutableArray, called buttonContainer that contains UIButtons. The thing is I want to change the CGRectmake() of every button with a new value, is there an easy way to do this?
I'm trying ...
1
vote
2answers
101 views
Remove duplicates from NSArray of Custom Objects also compare and edit same
I have two NSMutableArrays. Each contains a custom word object in it. Custom word has 2 properties text and frequency. Now I want to combine these two arrays in such a way that, if these two arrays ...
2
votes
5answers
60 views
Optimised array shift method
I have an NSMutableArray holding NSStrings e.g. {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
I would like to be able to shift elements with wrapping.
So e.g. move 1 to the centre, shifting all elements, wrapping ...
0
votes
1answer
45 views
Why am I getting a NSFastEnumerationMutationHandler with this NSMutableArray code?
Can someone help me understand what I am doing wrong here that would caused this stack trace:
1 libobjc.A.dylib 0x3a8a897a objc_exception_throw + 26
2 CoreFoundation ...
1
vote
2answers
54 views
AFNetworking JSON to UITableView - Objective - C
So I'm working on my first app and starting to bang my head against the wall. I created a C# web API that spits out simple JSON. I'm using AFNetworking and getting a valid response (I believe) and now ...
0
votes
1answer
43 views
How do would you split this given NSString into a NSDictionary?
I have some data i aquire from some linux box and want to put it into a NSDictionary for later processing.
How wold you get this NSString into a NSDictionary like the following?
data
(
bytes
(
...