0
votes
2answers
46 views

Issue with Sorting NSMutableArray

I have an NSMutableArray which contains an NSDictionary, I need to sort the array based on certain criteria. Sorting criteria is sort based on properties.property.value, suppose if I want to sort ...
1
vote
1answer
73 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 ...
0
votes
1answer
39 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 ...
0
votes
1answer
34 views

KVO on a collection

I added a observer to my collection, and observe the count on it [[[JHTaskSave defaults] tasks] addObserver:self forKeyPath:@"count" options:NSKeyValueObservingOptionNew | ...
0
votes
0answers
74 views

Getting image URL from NSMutableArray

I'm trying to get a pictureURL from an NSMutableArray to an imageview or just a subView. And I'm getting the URL and I can see it in the Xcode output. This is what I have: - ...
-3
votes
2answers
47 views

How to access NSMutablearray from one class to another class in cocos2d? [closed]

In my project i need to access the NSMutablearray from one class to another class.I refered many forum but couldnt get the proper solution. Give me a exact solution for this question.
-1
votes
3answers
111 views

How to delete an object from array in iphone [closed]

I am trying to delete an object from array ,when my table view gets reload, deleted object from array showing in tableview,I am using – removeObjectAtIndex: to delete object from array. Please help me ...
0
votes
2answers
93 views

How to update the NSMutableArray if its initialized with other NSMutableArray

We have address book feature in our application, contacts are stored in NSMutableArray. I have a separate class which is accessing contacts from outside, so I have initialized like below in new ...
0
votes
3answers
85 views

How to check array value not exist in another array

I have two different NSMutabelArray ArrOne and ArrTwo. Letsay ArrOne = A, B, C and D ArrTwo = C, D, X and Y. So i need to check if the value of ArrTwo is same as ArrOne and remove item from ArrTwo if ...
1
vote
1answer
58 views

How can I add programatically to NSMutableArray and show it on tableviewcells?

I have textfield,button and UItableview in my program.The user enters a text in textfield and when he clicks the button ı want to show his text on tableviewcell. He will enter again a text and ı will ...
1
vote
5answers
261 views

Differences between [NSArray arrayWithArray:] and [NSArray copy]

lately I work much with arrays and I'm wonder.. what's diffrences between those two lines. NSArray *array = [NSArray arrayWithArray:someArray]; and NSArray *array = [someArray copy]; Which of it ...
4
votes
1answer
89 views

NSMutableArray remove Object is cloning another object in the Array

I have an strange error after removing an object in a NSMutableArray. If i remove an object with [Array removeObjectAtIndex:2]; the array changed to this: why are there now 2 ...
4
votes
2answers
106 views

NSMutableArray removeLastObject Exception

According to the NSMutableArray documentation: removeLastObject raises an NSRangeException if there are no objects in the array. For some reason, I seem to be able to call this method on an ...
0
votes
1answer
75 views

NSMutableArray not holding UIImages properly?

I have enabled my Cocoa Touch app to be navigable by swiping left or right to alter positions in history. The animation is kind of done like Android's "card" style. Where swiping to the left (<--) ...
0
votes
1answer
46 views

Do i need to use mutableCopy to NSMutableArray when using MPMediaItem in iOS?

Hello everyone please guide me something. I am doing custom music app with iPodMusicPlayer. Here is some of code i load songs from iPodLibrary. MPMediaQuery *query = [MPMediaQuery playlistsQuery]; ...
1
vote
4answers
380 views

Efficient way to generate a random alphabet string?

I want a string of all the characters of the alphabet randomized. Right now, I create a mutable array of the 26 characters, shuffle them with the exchangeObjectAtIndex: method and then add each ...
1
vote
1answer
38 views

NSMutableArray: what does object at index do exactly?

I am running the following code and CCLOG always get triggered.. the two pointers have the same address and I don't understand why.. I need help :) bullets is a NSMutable array with 200 hundred ...
0
votes
1answer
99 views

UIImage Frame Null in NSMutableArray

I am trying to display star rating images, and I have three star images: full star, half star and an unselected grey-ed out star. I have an array which holds the stars: so for rating 4.5, it would ...
1
vote
2answers
65 views

How do I move data from one array to another? Using UITableView

Following on from my last question, I have a tableview populated with 2 NSMutableArrays, 2 sections and 2 section headers, all of which are working ok. incompleteItems = [NSMutableArray ...
0
votes
3answers
50 views

Setting flags for elements in NSMutableArray

I have an NSMutableArray of elements and I want to be able to conditionally set custom flags for some of the elements. For example an error count for certain elements if they return an error. If the ...
0
votes
2answers
127 views

I am sending dictionary in json and its have two array and multiple value but i am getting response access denied

I am sending two array and multiple value throw json but when i send this i am getting success code 200 and its response showing access denied pls any one give me right way to solve it ** ...
1
vote
2answers
79 views

Trying to dynamically add UILabels to a view by doing fast enumeration of an NSMutableArray

Dear fellow iOS developers: I have an NSMutableArray that contains objects of type Person. The Person object contains parameters of NSString *name, NSString *dateStamp, and NSString *testScore. ...
0
votes
0answers
52 views

CCTouchEnds isn't removing ccsprite from layer

This is really do my head in, I have been researching and researching for ever, can't seem to find anything. Basically what I want to do is a sprite is created every 3 seconds via scheduled selector, ...
-3
votes
2answers
145 views

Sum of two array [closed]

I have two different NSMutableArray that contains some elements. Now I want the sum of each array's elements and also the result of the array's addition. How can I proceed?
0
votes
1answer
167 views

Array loses all values after go trough its own method - Objective C

I have this piece of code below and I'm trying to add Objects(String elements) to an array, problem is that every time I'm out its adding's method, it goes to nil, it doesn't retain the objects. I ...
0
votes
1answer
211 views

Global variable being recognized as null when it is not - Objective C

I am encountering a confusing problem in my Objective-C program. I am trying to save data from an NSMutableArray when my program enters the background. I have a static variable called savedResults in ...
0
votes
2answers
167 views

How to use UISearchBar to search only the sections titles of a UITableView?

I have an UITableView with sections and many rows. I don't need a detailed search, going through all cells in the tableview. All the sections titles are contained inside a NSMutableArray. Is there ...
0
votes
2answers
93 views

How to join the atributes of xml file into a NSMutableDictionary?

I have to join all the same atributes of a parsed XML file into an NSMubableDictionary. I need everything about "show1", "show2", etc... in a dictionary (being ""show1", "show2", etc... the keys, ...
0
votes
1answer
130 views

Storing Pointer to Another Object in NSMutableArray and Changing it

I have an object called GraphicPath which stores a CGMutablePath and a UIColor value for the fill color. I then have an NSMutableArray called graphic which stores a series of these GraphicPath objects ...
0
votes
2answers
110 views

NSMutableArray Sort Task

i have NSMutableArray contains NSArray Objects, it looks like this ( "2012-10-10 13:13:29 +0000", cc5772389efc1f93bedaab872bad542a1c8432af, "{\n size = {360, 480}\n ...
0
votes
1answer
169 views

Extracting data from multidimensional NSMutableArray into a simpler array

I'm learning iOS but have an issue extracting data from a multidimensional NSMutableArray, I've looked at various solutions but have not yet found one.. I have an NSMutableArray like { "service_0" ...
0
votes
1answer
176 views

How to reorder NSMutableDictionary to a NSMutableArray?

I have a NSMutableArray containing NSURLConnection descriptions, like so: array { "<NSURLConnection: 0x60eb40>", "<NSURLConnection: 0x6030e0>", "<NSURLConnection: ...
0
votes
1answer
92 views

NSMutableArray objectatindex always shows the last Object

my problem is that my NSMutableArray always get the last element with the objectatindex-method. I have an array with some classes derived from UIViewController. I want to show one View after another. ...
0
votes
0answers
164 views

Adding objects to array seems to overwrite — the same value shows in every row of table

I'm displaying the values from an NSMutableArray in a table view. My problem is that when I add another value to the array, it overwrites the previous value. For example, if I store "abc -1" value ...
0
votes
2answers
161 views

Store UITextfield's contents into NSMutableArray

I want to let the user enter some names in a UITextField (preferably seperated with commas or just spaces), and then convert it into an NSMutableArray to display it in a UITableView. Is it possible? ...
2
votes
3answers
123 views

How to remove only one instance of an object from an NSMutableArray?

The Apple documentation says that the - (void)removeObject:(id)anObject method removes all occurrences of the given object from an NSMutableArray. Is there a way to remove only one occurrence of the ...
5
votes
3answers
300 views

Avoid copying NSMutableArray for reading with multithreaded writes

I have a class that uses a mutable array that is modified once after a lot of reads (new items arrive). The problem is that when times comes to mutate the array, reads keep coming. Currently to ...
0
votes
1answer
1k views

Get object index in NSMutableArray using dictionary object key in iphone sdk

i'm trying to get object index from array using dictionary key object... but unable to get it. Here are the details.. I have the Array having dictionaries.... ( { CATEGORYID = 865; ...
1
vote
2answers
205 views

How to create an NSMutableArray Dynamically?

I want to create an array with the name the user has given as input in textfield, for this i want to know how to create an array dynamically. Any help will be appreciated
1
vote
0answers
77 views

How to pass data from NSMutableArray to PowerPlot

I have two NSMutableArrays one is filled with NSNumber values the other with NSDate values. Does anyone can help passing this values to PowerPlot to draw a linechart where the NSDate values should be ...
0
votes
1answer
116 views

NSMutableArray from another view returns empty

I have two UIViews. One UIView, called SelectText has an ivar of NSMutableArray which is populated after performing a certain function. Here is a snippet code: - (void)fillDrawPoints { //the ...
0
votes
2answers
146 views

NSArray combining different objects?

So I've run into what I believe to be quite an interesting problem. I have a number of different NSArrays, which are chosen and added to myNSMutableArray based off of a table views selected index. My ...
0
votes
2answers
393 views

Could not “Copy” one mutable array to another

In my iPhone app. I am copying the one mutable array(with dictionary) to another. It is like resultsToDisplay = [[[NSMutableArray alloc]initWithArray:resultsPassed]mutableCopy]; 2012-06-21 ...
0
votes
1answer
121 views

How to calculate the hash MD5 of each content of a NSMutableArray?

I have this: NSString *string1 = ...; NSString *string2 = ...; NSMutableArray *array = [NSMutableArray alloc]inithWithObjects:string1, string2]autorelease]; How do I calculate the MD5 hash (or ...
1
vote
2answers
488 views

Sorting NSMutableArray by date

I want to sort a mutable array by date. My array contains several dict with keys say:key1,key2,birthday.Now, I have to sort by its birthday key: I know that this can be done using: NSSortDescriptor ...
1
vote
2answers
67 views

SIGABRT when adding objects to array

enemyBlobArray = [[NSMutableArray alloc] init]; for(int i = 0; i < kEnemyCount; i++) { [enemyArray addObject:[SpriteHelpers setupAnimatedSprite:self.view numFrames:3 withFilePrefix:@"greenbox" ...
0
votes
1answer
503 views

Adding ABRecordRef to NSMutableArray causes error about requiring bridged cast

I am getting an error: Implicit conversion of C pointer type 'ABRecordRef' (aka 'const void *') to Objective-C pointer type 'id' requires a bridged cast from this code, trying to add an ...
1
vote
3answers
105 views

Inserting Objects into NSMutableArray

Currently, I have edited a delegate function that adds Exercise objects to an NSMutableArray. However, I would not like to add duplicate objects, instead, if the object is already in the array, i'd ...
0
votes
1answer
259 views

NSCountedSet Duplicates and count in UITableView

I have a NSSet method checking for duplicates and the count of duplicates of each name. I want to place the names in the table view with the number of duplicates with it. I have taken 100 names and ...
0
votes
1answer
397 views

convert instance of C++ class to NSObject and then add to NSMutableArray

This is a simple class ive created in C++ for a musical application im creating for an iOS device which will store some values of notes and their timings : class info { public: float attackTime; ...

1 2 3 4
15 30 50 per page