Tagged Questions
3
votes
11answers
5k views
how can I convert string to an array with separator?
I have a string in the following format
myString = "cat+dog+cow"
I need to store each string separated by + in to a array.
Eg:
myArray[0] = cat
myArray[1] = dog
myArray[2] = cow
Can anyone tell ...
2
votes
1answer
975 views
What is an easy way to break an NSArray with 4000+ objects in it into multiple arrays with 30 objects each?
What is an easy way to break an NSArray with 4000 objects in it into multiple arrays with 30 objects each?
So right now I have an NSArray *stuff where [stuff count] = 4133.
I want to make a new ...
5
votes
3answers
3k views
How might I check if a particular NSString is present in an NSArray?
How might I check if a particular NSString is presnet in an NSArray?
0
votes
2answers
4k views
Save JSon data in NSArray
I'm trying to save some specific JSon data and store them in a simple NSArray.
This is the JSon I have:
products = {
72 = {
value_a = "something1";
value_b = "something2";
...
1
vote
2answers
330 views
SearchDisplayController search multiple arrays
Currently I'm populating my tableviewcells with the contents of multiple arrays representing a name, id, etc.
My question comes when I start to use the search display controller. I have an array with ...
0
votes
2answers
443 views
copy NSArray inside an empty NSArray
I have a first NSArray firstArray and I do
[firstArray removeAllObjects];
after I want fill it with the content of an other array secondArray
is it right write in this way?
firstArray = ...
2
votes
4answers
4k views
Loading Array From .Plist
I'm trying to load my array from an array in my .Plist but its not working.
The plist looks like this:
This is the code I'm using:
NSString *path = [[NSBundle ...
2
votes
4answers
914 views
selecting a random objectAtIndex from NSArray
I have an NSArray which contains 10 objects from index 0 - 9. Each entry in the array is a quotation.
When my user selects the 'random quote' option I want to be able to select a random entry from ...
1
vote
4answers
9k views
sorting mutable array in alphabatical order
Hi i am having a nsmutable array and in that nearly 50 -60 object having different names ,and can i sort this array in alphabatical order (Is it possible, How?) (is it a duplicate question ?)
2
votes
2answers
2k views
How to parse Dictionary with keys that have array of dictionaries
UPDATE-8/31/12- So now I would need to go through the Array of Dictionaries based on "isReservable" = 1 and then display the "begin". I am just trying to get the contents of the array of each ...
1
vote
1answer
173 views
UITable is not getting populated with NSMutableArray
In my app i have a text field where if i enter a word i should get all the file names starting with the particular word into a UITable. Here i am getting these file names into an array and its ...
0
votes
1answer
359 views
data from txt file to NSArray
As I was searching through stackoverflow, I did not came across an answer.
What I would like to do is the following:
I'm using XCode 4.6.1, building an iOS App
I have an textfile (.txt) that ...
7
votes
2answers
14k views
How can i convert a NSData to NSArray? [duplicate]
Possible Duplicates:
How to convert NSArray to NSData?
Need to convert NSData to NSArray
HI,
I have a NSData object named as "myNsData"(it is converted form of NSArray)
and a NSarray ...
2
votes
2answers
1k views
Search String in NSDictionary store in NSMutableArray
I am trying to search a String in NSDictionary stored in NSMutableArray
for (int k = 0; k < [onlyActiveArr count]; k++) {
NSString *localID = [onlyActiveArr objectAtIndex:k];
...
2
votes
1answer
2k views
Save Array to plist
I'm trying to store some items into a pList. Here is the array loop:
for (id obj in items)
NSLog(@"obj: %@", obj);
Output NSLog:
2013-03-27 13:00:40.072 mycode[47436:c07] obj: Red
2013-03-27 ...
2
votes
2answers
2k views
NSString from NSArray
I am trying to create a String from Array.But, there is condition to how it should be generated, as explained below.
NSArray *array=[NSArray arrayWithObjects:@"Hello",@"World",nil];
[array ...
2
votes
2answers
914 views
Finding most repeated object in array
I have an array full of strings with each string being a name. Some names may be the same while some may be different. The language I'm working in is objective-C. I want to be able to find out which ...
1
vote
2answers
335 views
Memory issue when using large NSArray of UIImage
I am trying to use an array of UIImages to display large number of images on the screen. Currently I add each image into NSMutableArray and then access them when I need to, but as the number of images ...
1
vote
3answers
2k views
how to remove spaces, brackets and " from nsarray
I have an array where i am trying to remove the access spaces, brackets and " from the nsarray in order to use componentsSeparatedByString:@";"
NSArray *paths = [dic valueForKey:@"PATH"];
...
0
votes
2answers
2k views
Objective C Dynamic NSDictionary for UI Table View divided by Section Headers
So this is based off of my question here
objective c when to use NSDictionary instead of NSArray
Apologies for the noob questions. I just started learning objective c and I'm really confused.
- ...
-1
votes
1answer
35 views
how to chose an array( column) from a given file.txt? (stringByAppendingPathComponent) X-code
i am trying to pick an array (column) from a given file that contains arrays of numbers e.g:
2012-09-02 16:27:15.010 SMA -0.818863 0.286575 0.206177 -0.108286 -0.231033 -0.303317
2012-09-02 ...
-1
votes
1answer
196 views
Random results after parsing JSON in Objective-C
I need to parse multiple JSON objects from several sources on a remote server and I need to populate UITableView with each value of the single parse:
The single JSON source, example at ...
-1
votes
4answers
167 views
NSArray clears after 3 times view did load
I have an NSArray that contains a couple of items. The NSArray is loaded into a uitableview from another class. when I back out of the detail view and re-enter (for the 3rd time), the NSArray is empty ...