0
votes
1answer
17 views

iOS: NSMutableArray NSLog outputs different results

I'm trying to assign tags and then creating an NSMutableArray #import "myClass" static NSString *kC = @"100"; static NSString *kLo = @"110"; @interface MyApp() @property (strong, nonatomic) ...
2
votes
4answers
39 views

Instance method not found warning, but working

In my implementation model, I need to have some differents files, with some similar methods. Also, I gather objects of differents types in a NSMutableArray, and try to call my similar method like ...
0
votes
0answers
35 views

NSRangeException while adding objects to NSMutableArray

I am programming the search bar logic in an iOS application. I have 1 NSArray "results", which has the entities returned from a NSFetchRequest, and an empty NSMutableArray "resultados" where I want ...
-1
votes
2answers
35 views

Issue passing object to NSMutableArray in AppDelegate

I'm having trouble making a shopping cart sort-of concept in my app. I have my AppDelegate (named ST2AppDelegate) that contains an NSMutableArray called myCart. I want RecipeViewController.m to pass ...
-1
votes
3answers
57 views

How to create NSMutableArray by plist file? [duplicate]

Previously, I used the following code to create an array for me and it worked. bundle = [NSBundle mainBundle]; path = [bundle pathForResource:@"MultiSetting" ofType:@"plist"]; settingArray = ...
-4
votes
1answer
35 views

Adding an object to NSMutableArray causing crash

I am trying to combine a string date and time then convert that to an NSDate. My code is: NSMutableArray *arrayOfDatesAsDates = [[NSMutableArray alloc] init]; NSDateFormatter *dateAndTimeFormatter = ...
1
vote
1answer
39 views

Array not showing in Table View

Can anyone tell me why my code isn't showing any results in my table view. Here is my code. I already tried to change the @"@" into indexPath.row without any luck. I 'm looking for any answer into the ...
0
votes
1answer
44 views

Create NSMutableArray dynamically, and use selector with parameters on objects

I'm creating an application, in which i used an NSMutableArray to stock some objects. To do this, no problem in first look : ArrayOfViews = [[NSMutableArray alloc] init]; [ArrayOfViews ...
0
votes
1answer
24 views

Returning key for object in dictionary gives no visible interface error

I have the dictionary like this: { Asr = "5:33"; Dhuhr = "1:11"; Fajr = "2:40"; Isha = "11:34"; Maghrib = "9:28"; Qiyam = "1:38"; Sunrise = "4:54"; } I have the value ...
0
votes
2answers
44 views

Store data after adding items to array

I have an array that you can add items to. Though when I exit the app the records are not saved. How would I do this. Here is my appdelgate file becausde that is where my NSMutableArray is held ...
1
vote
2answers
57 views

Xcode Add MutableArray to a MutableArray

I am adding an NSMutableArray to another NSMutableArray, the problem is all the objects in the first array are the same (length size content, etc). I am guessing that when you add an array to an ...
0
votes
3answers
50 views

Inserting hebrew into NSMutableArrey

When I insert Hebrew (LTR) string into NSMutableArrey, the string is distorted somehow. What do I do? NSString *peace = @"שלום"; NSLog(@"peace - %@", peace); NSMutableArray ...
0
votes
1answer
45 views

How to replace an object in MSMutableArray with another object

OK. I've spent a ridiculous amount of time on this. I've looked all around on the internet to the point of feeling pretty stupid. I have program which is an array of x, 2, "+". So I make a copy of ...
1
vote
2answers
34 views

More efficient nested loops calculation

Is there a way I can make the below activity more efficient. + (NSMutableArray *)sortArrayOfOrdersByDate:(NSMutableArray *)array{ //create an array of the dates from the Order class ...
1
vote
2answers
51 views

Filtering an NSArray with custom objects [duplicate]

I have a class like this : @interface MyObject : NSObject @property (nonatomic, strong) NSString *type; @end and I am creating an array like this: NSMutableArray *array = [NSMutableArray array]; ...
1
vote
2answers
40 views

How to sort NSMutableArray which contains NSIndexPath integer array?

I have a NSMutableArray. It contains NSIndexPaths which itself a NSUInteger array. Array looks like this [ (NSIndexPath xxxxxxx) 3 indexes [1, 0, 0], (NSIndexPath xxxxxxx) 3 indexes [2, 1, ...
-2
votes
1answer
26 views

I cannot allocate a nsmutablearray as a class variable [closed]

I was having problem allocating the NSMutableArray in the player class, there is no warning in the compile time when I tried this way in the (id)init method: playerInventory = [[NSMutableArray alloc] ...
0
votes
2answers
24 views

Create an array of custom Object to fill it and take his content to fill a UITableView

I have a Class called Product that contains some propeties, I wanna make that my class will be the base for an list of Product called Products. And this list can access in a UITableView to fill it ...
-1
votes
3answers
43 views

How to remove object at all index except first index in NSMutableArray IOS

I have 1 mutablearray, i want to remove object all indexs but hold object at first index. EXample : Input : Array (a,b,c,d,e) Output: Array (a) Can you help me. Thanks in advance
0
votes
5answers
53 views

iOS:how can query the objects in nsmutablearray objects

Can anybody help me to tell me how can access to objects in NSMutableArray. This is how the creation of the objects is been made: ViewController: Students *studens =[[Students alloc] ...
-5
votes
3answers
84 views

unrecognized selector sent to instance in Array [duplicate]

I am trying to add an object to an array but it senting zig bart error "unrecognized selector sent to instance" Below is my code AppDelegate *appdelegate = (AppDelegate ...
0
votes
1answer
78 views

Where would I implement this array to pass?

I currently build an NSMutableArray in Class A.m within the ViewDidLoad Method. - (void)viewDidLoad { [super viewDidLoad]; //Question Array Setup and Alloc stratToolsDict = ...
0
votes
1answer
19 views

nsscanner limiting output to interface

I am trying out a nifty obj-c/ios app i found at http://tech.pro/tutorial/975/building-an-earthquake-monitor-for-iphone-using-mapkit. It maps out earthquakes It works fine, but I wanted add title and ...
-1
votes
1answer
23 views

Displaying next data in Detailview of my NSMutableArray

I have a simple problem. Im using a NSMutableArray for multiple Questions and Answers. I`ve put all the data in a tableView and put the data of the selected row in a Label. Now, how do i get the data ...
0
votes
1answer
35 views

Deep copy of an NSMutableArray of custom objects with NSMutableArray members

I'm trying to make a deep copy of an NSMutableArray whose objects are instances of a custom class similar to this: @interface CustomParent : NSObject @property NSInteger Id; @property (strong, ...
1
vote
2answers
40 views

How to reorder an Array of Dictionaries as per random order of keys/attributes (neither ascending nor descending) [duplicate]

I have an array of dictionaries as below. NSMutableArray *newArray ({ { A = John; B = THAILAND; }, { A = Jack; B = US; } { A = Lee; ...
1
vote
2answers
69 views

Delete element in array before creating table view cells

Im quite new in objective-c and im trying to do a UItableview app. The whole concept is that i have two views, both tableviews. In the first view controller I have months and depending on which month ...
4
votes
3answers
75 views

Finding out NSArray/NSMutableArray changes' indices

I have a NSMutableArray oldArray. Now, at one point, this NSMutableArray object gets updated with another NSMutableArray, which may have more, less or same number of elements as the previous ...
0
votes
2answers
36 views

creating a class based on NSMutableArray causes Thread 1: signal SIGABRT

I'm trying to create a class based on NSMutableArray filled with objects based on fictional stock market holdings, which works if I simply create an NSMutableArray. NSMutableArray *portfolio = ...
-4
votes
0answers
25 views

Access and Change Objects array Values [closed]

trying to access an array. program Fails, couse there is no Key Matched. it's an array of Class's objects: that the log: arrResults=( "<Comment: 0x1fa3edc0>", "<Comment: 0x1fa67e90>", ...
-1
votes
1answer
60 views

How to add an NSMutableArray into NSMutableDictionary as a key? [closed]

I have an array storing some attributes (those attributes are: tableID(string), tables coordinate(x,y coordinate in float)). Does anyone know how to store this array into NSMutableDictionary? And I ...
1
vote
0answers
48 views

Maximum size a NSLog can print

I was trying to print an array of dictionaries. The dictionary contains 300 keys and their values. There are about more than 6000 dictionaries in the array. But NSLog could print the array when the ...
0
votes
3answers
43 views

How to sort file from document directory by Created Date in iOS?

I have a NSMutableArray that retrieved file from document directory in iOS. i retrieved files from document directory with following codes. NSArray *paths = ...
0
votes
2answers
79 views

IndexPath.row on a button?

I have an app in which you can have some details of something and then inside that thing you have a sub-category of things. I have made a button as there was not enough room for a navigation item and ...
0
votes
2answers
67 views

NSMutableArray behaviour with ARC

With ARC enabled when adding an object (e.g. object X) to an NSMutableArray, if that object X is changed directly elsewhere in code, should the "copy" inside the NSMutableArray also be updated? Is ...
0
votes
2answers
104 views

NSMutable array adding entries?

I am pretty new to objective-c and I am creating an app where records are held. I have tried to make an adding method when I click a save button though it doesn't save the data when you press the ...
-2
votes
2answers
66 views

NSMutableArray with NSDate entries get days count [closed]

I have NSMutableArray with NSDates some dates are from a same day. What is the best way to get the number of NSDates for a particular day? Edit: Sorry, I am not fully explained. I need some kind of ...
0
votes
0answers
28 views

how to set property attributes for classes that include NSMutable array properties

objC newbie question...thanks in advance for any help... it is my understanding that when i declare for a class a property of type NSMutable Array, i must always declare it with the property ...
0
votes
2answers
69 views

The two nsmutablearray value is getting swap with another in ios

I am inserting NSMutableArray(self.tablePdfListArray) in tableview textlabel and NSMutableArray(self.dateListArray) in detailtextlabel at same index. It got added correctly at first place but when I ...
-9
votes
3answers
93 views

How to find array last element [closed]

NSMutableArray * arr = [[NSMutableArray alloc]initWithObjects:@"1",@"2",...@"n" ,nil]; how to get last position of this array Any help really appreciated Thanks in advance
0
votes
4answers
63 views

Grouping the NSArray elements into NSMutableDictionary

I have an NSArray some thing like in the following format. The group array is : ( "Q-1-A1", "Q-1-A9", "Q-2-A1", "Q-2-A5", "Q-3-A1", "Q-3-A8", "Q-4-A1", "Q-4-A4", ...
0
votes
1answer
41 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
2answers
103 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
87 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
84 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
48 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
41 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
43 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
37 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
38 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, ...

1 2 3 4 5 37
15 30 50 per page