Tagged Questions
-1
votes
1answer
76 views
How to arrange the images in an array starting from index 1 in Objective C?
I have some buttons in my view, which contain images in them to make it look like a thumbnail view. If tapped on the button, based on the button tag, i have to retrieve the image from the database and ...
0
votes
1answer
45 views
How to make my UIPickerView display all elements of an array
I have a UIPickerView and an array though I can't seem to be able to input all the date from the array into the UIPicker.
I know that the syntax is meant to be like this:
- (NSString ...
0
votes
0answers
39 views
Two mutable arrays getting mixed
I am making a table object which by a swipe gesture changes the displayed values to completely different ones. This works because there is a UIPageControl which shows which set must be displayed on ...
-1
votes
4answers
89 views
Trying to initialize array objective -c
So I know my problem is that my transfer array is not being initialized correctly. Where should I put transfer = [[NSMutableArray alloc] init];?
@interface PictureViewController (){
Poi ...
0
votes
8answers
107 views
Check if NSDictionary is empty
I want to check if an NSDictionary is empty. I am doing it like this.
mutDictValues = [[[NSUserDefaults standardUserDefaults] objectForKey:@"dicValues"]mutableCopy];
NSLog(@"dictValues are ...
0
votes
3answers
50 views
NSArray error: initializer element is not constant
I declared this array in my view controller implementation file:
NSMutableArray *images = [NSMutableArray array];
I wanted an empty, mutable array that I would later add UIImageViews to. It always ...
-2
votes
3answers
50 views
JSON to NSMutableArray with AFNetworking [duplicate]
I have a webpage with the code in JSON:
[
{"url":"event.com","name":"Event name","event":"Event"},
{"url":"event.com","name":"Event name 2","event":"Event"},
...
0
votes
3answers
68 views
Initialise an array with numbers from 1 to n objective C
Very basic question. I need to initialise a NSMutableArray with values from 1 to n(or m to n, say). Is there anything I can do to initialise the array without using a for loop? I mean is there ...
-3
votes
4answers
95 views
how to fetch data from NSMutableArray ObjectAtIndex from integer value? [closed]
I want to fetch data from my NSMutableArray, I am doing this
-(void)ViewDidLoad{
A_array = [[NSMutableArray alloc] init];
A_array = [NSMutableArray ...
0
votes
0answers
8 views
Unable to put NSSound instance in NSMutableArray ion cocoa
Im having trouble adding NSsound instances into an NSMutableArray - But im not sure why.
The error I get is that I can not do soundFiles addObject, because soundObj is nil. But if I do [soundObj ...
0
votes
1answer
33 views
Try to present uitableview with nsmutablearray
ok i try my best to explain my problem, I try to create an array after user finish picking a picture from their device
- (void)imagePickerController:(UIImagePickerController *)picker
...
0
votes
0answers
22 views
Predicating and multiple connected NSMutableArrays
long time reader, first time poster. I was hoping someone would be able to help me out with an array problem I'm having. I've been working with iOS for about 4 months. I can't get this code to work ...
0
votes
2answers
32 views
Persisting UIBezierPaths in NSMutableArray
I am trying to draw multiple UIBezierPaths on a custom view, with the ability to manipulate them individually.
path and the NSMutableArray to store the paths are instance variables declared like:
...
0
votes
1answer
25 views
Order of instance variable assignments freezes iOS app
In my header, I have two properties as shown below.
@interface HZCalendarDataSource : NSObject
@property (strong, nonatomic) NSMutableArray *datesOnCalendar;
@property (strong, nonatomic) ...
0
votes
1answer
37 views
EXC_BAD_ACCESS while adding an object to one array inside a switch [duplicate]
That's my code
int indiceCorrente=0;
int differenza=delegate.reader.feedItems.count;
while(variable!=0){
switch(variable){
case 1: ----
case 2: ----
default: {
...
1
vote
1answer
66 views
How to add NSMutableArray to NSMutableArray
I want to add NSMutableArray to another NSMutableArray but it doesn't do anything.
This code adds NSMutableArray to existing array:
- (void)viewDidLoad
{
[super viewDidLoad];
...
-1
votes
2answers
48 views
NSMutableArray add the last object only
Let me allow to describe the scenario first. i have an array called "exibitors"
which hold all exibitors information (all array information is parsed from an URL).
Currently it has "107" Fair01 item ...
0
votes
0answers
50 views
Storing multiple value types within a NSMutableArray
I'm attempting to create an application that stores multiple groups of images and lists each group within a table view.
I'm unsure of the best way to go about storing and calling this data.
I was ...
1
vote
5answers
120 views
Compare 2 nsmutablearray and get different object to third array in ios
I want to compare 2 NSMutableArray and get different object into third Array. How can i do that ?
Array1 can loop object .
Array1 = "a", "b","c","d","a","b","c";
Array2 = "a", "b", "c";
And then ...
0
votes
2answers
41 views
NSMutableArray not letting me access object?
I am extremely new to objective-c and iPhone programming (although, i have a little more background with C#), and I am learning by doing.
I am currently trying to make a mini platform game and ...
0
votes
2answers
30 views
CoreData for Adding under an Object in Relationship
This is probably easier for iPhone devs who are familiar with CoreData but i am not and would really like to know how to properly access my data within a crucial deadline.
This is what my core data ...
-1
votes
1answer
39 views
UIImageView array frame equality
I have two NSMutableArrays with UIImageViews in it. I am wondering how to check if the frames of the UIImageViews are equal to the frames of the other array in Objective-C. Is there a function for ...
0
votes
1answer
34 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
44 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
41 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
45 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
59 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
39 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
40 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
47 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
30 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
45 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
68 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
52 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
47 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
41 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
55 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
42 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
31 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
29 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
49 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
57 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
86 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 ...
1
vote
1answer
82 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
20 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
45 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
41 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
74 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
81 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 ...