An immutable, integer indexed, array of objects from Apple Foundation framework.

learn more… | top users | synonyms

3
votes
2answers
22 views

“[__NSArrayM objectForKey:]: unrecognized selector” when trying to retrieve a string from Dictionary

Hi guys I'm trying to set text to my labels.Here's the code: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { newsDataCell *cell = ...
0
votes
1answer
32 views

Search a NSArray filled with JSON for a specific title

I'm working on my first serious iphone app and using json for the first time. Now i have a searchfield above my tableview, and i want to filter the data to the entered search text. The JSON looks like ...
-5
votes
2answers
53 views

Compare NSArray with NSDictionary

I have one NSArray with objects {3, 5, 6} and a NSDictionary with {3, 5} i want to compare those and delete the "6" because its missing from the NSDictionary i'm using the following code [lists ...
0
votes
1answer
30 views

Getting and array of values from an array of CustomObject [duplicate]

I have the following issue, I need to get an array of values from an array of custom Objects. Is there a method for doing this without iterating the principal array, let me graphic it a little bit. ...
-6
votes
1answer
34 views

How to get index of array element in cell?

I have array which a pushed to tableView, when i tap a row(cell) a need to get number of my array element in these row, how can a do these? - (void)rightButtonClick:(MyTableView *)tableView ...
0
votes
0answers
15 views

Adding Transition Effects to Images In NSArray

In my project I have an UIIimageView And 2 swipe gesture recogniser for left an right swiping, I made a NSArray that contains images and i passed this array in the UIImageView, the project works when ...
2
votes
4answers
64 views

How to filter array with objects by using predicate?

I have NSArray *listArray with objects like - (id, name). I would like sort array by (name) - NSString *alphabet = [agencyIndex objectAtIndex:indexPath.section]; //---get all states ...
2
votes
3answers
45 views

Turn NSArray of CGPoints into a block of NSData

I am trying to turn a NSArray of CGPoints to NSData. I can't figure out how to do it. According to ...
0
votes
2answers
51 views

Check through an Array for a specific object

I am trying to work out how many cells my table view should have. This is determined by results of a query which are stored in Array. When the view is loaded the array might not exist or have any ...
-1
votes
1answer
28 views

how to use cgrect in a nsarray loop

Trying to create a for loop with an nsarray of uiimageviews but cant seem to get the cgrectmake to work. Location = CGRectMake(10, 10, 97, 110); NSArray *cardImages = [[NSArray ...
-1
votes
1answer
101 views

NSMutableArray Resetting Itself?

I am having an issue with NSMutableArray wiping its contents. Consider my code: (int i; is in my file's .h as is NSMutableArray* newFileControllerArray) -(void)awakeFromNib{ i = 0; ...
1
vote
2answers
50 views

No visible @interface for 'NSArray' declares the selector 'exchangeObjectAtIndex:withObjectAtIndex

I am trying to shuffle an array, but I get a "No visible @interface for 'NSArray' declares the selector 'exchangeObjectAtIndex:withObjectAtIndex:' on the last statement. How should bArray be ...
4
votes
2answers
69 views

Objective-C implementation of Ruby “chunk”

I have an Objective-C application where I'm trying to sort an NSArray while grouping the array elements that have equal sort values. Ideally, I would generate a new array of sets, where each set in ...
1
vote
1answer
34 views

Searching an Array using NSPredicate method predicateWithFormat

Currently trying to setup a search would search an Array (bakeryProductArray) which looks like this "Tea Loaf", Tiramusu, "Treacle Loaf", Trifle, "Triple Chocolate Brownie", ...
-1
votes
2answers
28 views

componentsSeperatedByString returns full word [duplicate]

I am trying to get each letter of an NSString using this line of code: NSArray *array = [string componentsSeparatedByString:@""]; //string is equal to Jake NSLog(@"Array Count:%d",[array count]); I ...
2
votes
1answer
32 views

Core Data made easy with using of Arrays

browsing in some core data pages online i found a tutorial that use an interesting technique, i never seen nor used it before, but actually looks pretty smart. Instead of working with long methods, ...
0
votes
2answers
35 views

How to encode json response and write it in array?

I am using AFJSONRequestOperation to obtain the list of my friends. Here’s the request: /// get friends NSString *str = [NSString ...
-2
votes
2answers
48 views

iOS : Copy selected row from Table to an Array: [on hold]

Alright, I'm at a wall. I'm trying to copy the SELECTED ROW from a Table View and add the contents to an ARRAY. I tried this, but to no avail: [self.templist addObject:[self.songsList ...
0
votes
1answer
50 views

NSArray and new plugin signature with Phonegap 2.9

I'm working with a Phonegap 2.9.0 project with Xcode 4.6, I'm in trouble with a ExternalFileUtil plugin. It's all installed, but it doesn't work. As these post says, I have recoded the plugin with ...
0
votes
4answers
48 views

NSArray with multiple Objects

I have a array with 10 objects , sometimes out of 10 objects ,some objects tends to null and if any of the object is null ,Its comes as empty in my UIPickerView but I want If the value of any object ...
-3
votes
4answers
76 views

How to remove elements of NSDictionary

I have NSArray of NSDictionaries I need to extract 2 values or remove the values I don't need from the dictionary in the example below I need to remove id and NumberValue. any of you knows how can I ...
0
votes
3answers
51 views

Can't store all data from NSArray into NSMutableDictionary? [closed]

What's the problem with this code?? I am trying to put the data from an NSArray to a NSMutableDictionary but I do not want to first split the initial nsarray into two and then send the data to the ...
0
votes
0answers
9 views

XCode: How to use Segmented Control to change the Array my App Randomly Generates from?

First time posting on here - and unfortunately I'm fairly new to XCode. Basically I can't work out, despite maybe 4-5 hours of constant research, how to get the Segmented Control in XCode to change ...
0
votes
2answers
12 views

Rotate a UIButton that I pulled from a NSArray

I am trying to apply a transformation to a Button that I have pulled from a Array: buttonArray[y].transform=CGAffineTransformMakeRotation(M_PI); but it doesn't like this... Is there a different way ...
5
votes
2answers
72 views

What does @[indexPath] do

I followed a tutorial for using a UITableView. The finished code - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath ...
-1
votes
4answers
68 views

Fetch NSarray from the NSDictionary of NSArray using objectForKey

I have a NSArray which contain n number of NSDictionary sampleArray = ( { 0 = 0; 1 = 0; }, { 0 = 86400; 1 = 2; ...
1
vote
2answers
54 views

Can't make NSArray deep copy

A user on my app can select filters to narrow down items. Once filters are selected, an NSNotification is sent that passes an array of selected filters (NSStrings) to another view controller. When I ...
1
vote
1answer
23 views

How can i count and sort a NSMutableArray duplicate values

I've seen this question: NSMutableArray counting occurances of objects and then re-arange the array The solution comes very close to what i need. The solution I'm referring to: NSInteger ...
0
votes
2answers
55 views

UITextView displaying all the values from array

I stored some text value in server. I successfully fetched that text value and stored to local database file. Then added that values to array. when i display that array values to UITextView. But ...
0
votes
2answers
72 views

How to create an NSArray of NSArray

I am trying to sort an array of NSDictionaries into an alphabatised array of arrays based of one of the NSDictionary valueForKey: first letters effectively I want something that looks a little ...
0
votes
1answer
26 views

Cannot pass arrays with content, using sharedStore?

Short background: I am creating an app in which the user can see the menus for each restaurant. I have created a class called "Dish" in which the name, ingredients and price of a menu item is set. I ...
1
vote
2answers
36 views

Efficient way of checking the content of every NSDictionary in NSArray

In my app I'me getting responses from the server and I have to check that I don't create duplicate objects in the NSArray which contains NSDictionaries. Now to check if the objects exists I do this: ...
0
votes
1answer
31 views

How to save and retrieve two arrays in Core Data in iOS6

I have two arrays 1)retievedNamesMutableArray 2)reterivedImagesArray which i am saving in Core Data.Although the saving operation is successfull , when i fetch data...it seems to fetch either Names or ...
0
votes
1answer
12 views

Getting exception from where I did not changed the code

I am trying to create a view that has many features, but I am getting an exception from this line in my code, [addedList addObject:name]; Exception, [NSMutableArray insertObject:atIndex:]: attempt ...
0
votes
1answer
44 views

filtering results using containsAllObjectsInArray

I am trying to filter results into a searchDisplayController by searching objects on parse.com. I can successfully search the objects and display them using containsString but that is not how I want ...
2
votes
3answers
40 views

sort NSDictionary based on single object key

I would like some help sorting an NSArray of NSDictionary values based on each objects ISV key. This is the code I have so far for creating my array objects so you have a better idea of what I am ...
0
votes
1answer
37 views

How to save contents of Array in CoreData in iOS 6

I am fetching the contents of AddressBook which in turn are copied into an array.Now i want to save this array into CoreData.I know how to insert single values in CoreData.How do i loop through an ...
0
votes
2answers
29 views

TableViewController cells not populating with data

Alright, I know I'm going to annoy someone here with my n00b-ness, so consider this a fair warning. I'm fresh-as-a-fish to Obj-C, and so what may be obvious to you most likely won't to me. I've been ...
-1
votes
2answers
37 views

how to show objects of nsarray on lable on tableview?

i have an NSArray of friends list on viewdidload , then i have a customized table view each cell consists a Lable, i want to show array elements in Lable on table view cell . my code as tableList1 ...
3
votes
2answers
64 views

UIPickerView crashes app when user is spinning components at the same time

I've got really unbearable issue with UIPickerView. There're 2 components: first one with food categories, and second with foods inside each category. I've got proper arrays with foods, which looks ...
0
votes
2answers
17 views

UITableView: cell.textLabel.text error: [__NSArrayI isEqualToString:]

I'm downloading an NSManagedObject. Assigning an NSString to valueForKey@"username" of that object. Next, I assign that string to a cell.textLabel.text in UITableView and I'm getting an exception. ...
-2
votes
1answer
34 views

Multiple UISwitches to target NSArrays

can anyone help me here? I'm trying to create a fairly simple flashcards app, but I'd like to have the flashcards' images divided up into categories, such as "beginner", "easy", "medium" and ...
1
vote
2answers
32 views

Instantiate multiple objects in a non-mutable array

I often find myself implementing methods that create a bunch of objects in a loop and return them in a non-mutable array. I'd usually write something like this: - (NSArray *)myObjects { ...
0
votes
2answers
63 views

Managing multiple NSArrays on a different UIViewController?

is it possible to manage multiple NSArrays on a different View Controller? Here's my example: I am currently working with two View Controllers: TableViewController serves as a main menu. I've set ...
1
vote
5answers
142 views

Sorting negative and positive numbers in objective c

I am listing out a quantity percentage like stuff for an item via a webservice.The response that I get is an array of dictionaries similar to the below code.I need it in a sorted format NSArray ...
1
vote
0answers
35 views

Re-calculate the items inside a `NSArray` then reload the `UITableView`

I have two arrays: array1: A,B,C,D,E,F,G,H array2: 1,1,2,2,3,3,4,4 every two letters (stations) add $2. these two arrays will populate in a UITableView, whenever a user tap on a UITableViewCell ...
2
votes
3answers
38 views

attaching dictionary object to UITableViewCell

I would like to know if there is a way to attach a NSDictionary object to a cell that is displayed in a UITableView, so when a cell is selected I can access the NSDictionary attached to that ...
2
votes
2answers
29 views

Adding Multiple NSArrays to NSMutableDictionary with corresponding matching item in array order

I have two arrays say itemName and itemImages NSArray *itemName = @[@"Blog", @"Missions", @"Subscriptions", @"Questions", @"Aide",@"Disconnect"]; NSArray *itemImages = @[@"ico-1",@"ico-2", @"ico-3", ...
0
votes
1answer
25 views

Sorting array with NSSortDescriptor for specific item

I am using an NSSortDescriptor to sort an array as follows: NSSortDescriptor *titleDescriptor = [[NSSortDescriptor alloc] initWithKey:@"title" ascending:YES]; NSArray *sortDescriptors = [NSArray ...
0
votes
1answer
32 views

Create sorted array from multi-dimensional NSDictionary's sub-dictionary values

I have an NSDictionary which contains sub NSDictionaries and I was wondering if it is possible to alphabetically sort the main dictionary by the value of the "name" keys of the sub dictionaries. ...