nsmutablearray

Passing NSMutableArray from Delegate to tableview

Hi all, i have encountered a problem when wanting to pass a NSMutableArray from the delegate to a tableview controller and then reload it's data, I need to do this because i have my socket in the delegate and when it receives data it returns a NSMutableArray which is supposed to be the data for the tableview, unfortunately it passes nil ...

NSMutableArray member item randomly disappears

Hi there, I'm having very strange issue with NSMutableArray class (as it seems at least). I have UITableViewController with custom data source class, which loads data from underlaying model class. Now I need to incorporate AdMob ads to the table. There can be one or more ad positions, typically at the top of the table and at the 3rd row...

how to check an nsmutablearray is null or not

How to check an NSMutableArray is null or not ? ...

Stuff NSMutableDicitonary into NSMutableArray

I am newbie to Iphone Application development. Please help me. I am sorry if I am wrong. I have following declarations: //.h file: NSMutableArray *dataArray; NSMutableDictionary *item; //.m file - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedN...

Display NSMutableArray in Table View Cell

MY question is how to display arrayData in table view cell? I want to set the table view cell's label text to the 'ename' from the data parsed. Please help me out. I am newbie to Iphone Development... Thanks in Advance - (void)viewDidLoad { NSString *url = [NSString stringWithFormat:@"http://mmabigshow.com/app/get_result_from_quer...

Copy NSMutablearray to another

I am trying to copy mutablearray to another but it does not show me anything at the UItableview NSMutableArray *objectsToAdd= [[NSMutableArray alloc] initWithObjects:@"one",@"two"]; NSMutableArray *myArray = [[NSMutableArray alloc] initWithObjects:objectsToAdd,nil]; NSMutableArray *list = [[NSMutableArray alloc] init]; [self.list add...

how to add nil to nsmutablearray?

NSArray *array = [[NSArray alloc] initWithObjects:@"ΕΛΤΑ", @"ΕΛΤΑ COURIER", @"ACS", @"ACS ΕΞΩΤΕΡΙΚΟ", @"DHL", @"INTERATTICA", @"SPEEDEX", @"UPS", @"ΓΕΝΙΚΗ ΤΑΧΥΔΡΟΜΙΚΗ", @"ΜΕΤΑΦΟΡΙΚΕΣ ΕΞΩΤΕΡΙΚΟΥ", nil]; This is working because it has nil at the end. But I add objects l...

How do I save an NSMutableArray w/ UIImgeViews to the iPhone's document direcory

I have an NSMutableArray that holds multiple and changing amounts (that's why I am using an NSMutableArray) of UIImageView's that I want to save and also in return load when my app quits and loads. Also, how would I then, after my app loads, get the image viws out of the array ...

Code is bypassing Array creation Loop from a sqlite database

my NSMutableArray creation code is being bypassed altogether for some reason. in theory it is supposed to create an NSMutableArray based on an sqlite database. There is only one warning message and no errors. what am I missing? the implementation file is: #import "iProspectFresno LiteAppDelegate.h" #import "MainViewController.h" #import...

Will saved images have tag properties with them when I load them back?

I have 3 UIImageViews, and they all have tags 1, 2, 3, and are inside of an NSMutableArray. I want to save the images to a file upon termination of the app, then load them back whe the app loads and extract them from the array, and still have them have the tags. ...

iPhone - array lost between appDidBecomeActive: and run loop starting?

EDIT: I stuck in a single call to manually retain the array right after initializing it, and that fixed it. Dur. Thanks. I keep an NSMutableArray in a UIScrollView subclass, and I add to it instances of a UIImageView subclass as each is added as a subview. It needs to be a mutable array, as I plan to rearrange their order in the array e...

how do i reverse the order of objects in an NSMutableArray?

Hey, Im trying to achieve something like this NSMutableArray *myArray = [[NSArray alloc] initWithObjects: @"A",@"B",@"C",nil, retain]; NSLog(@"Array: %@, myArray); //logs A, B, C. //reverse code here NSLog(@"Array: %@, myArray); //logs C, B, A The code isn't exact, just a demo. But you get the idea. Any way to do this? Cheers, S...

NSMutableArray initWithContentsOfFile memory leak

I´m new in iPhone development and I have this memory leak. I´m using an NSMutableArray to retreive the content of a .plist file located in the Documents directory. The first time I use it, everything goes fine, but if I call it several times I get a memory leak. This is my code: - (void)viewWillAppear:(BOOL)animated { [super viewWi...

Array, not refeshing table view

Hi, I have a list of items, and in a modal view controller, i have what is effectively a 'New item' screen, where a user can type in a new thing for the list. The list is a UITableView, with data source, NSMutableArray. here is the code on the MVC -(IBAction)done{ [RoutineTitle resignFirstResponder]; [RoutineInvolvment resignFirst...

UIPickerView with 2 NSMutableArrays?

I have a core data based app I am working on, that uses an EditingViewController to control a number of different UI elements that get input from the user which describe attributes of an object that is subsequently stored within my app. The EditingViewController.xib file has such elements as a datePicker, textField, numberSlider, and whe...

Editing a NSMutable Array, defined in one class, from a Modal View Controller.

Hello All. This is my app im working on. http://twitpic.com/yrzpo and it has a modal view that i want to let the user app things to the routines list. http://twitpic.com/yrzs3 The table view on the first page, has a data source of a NSMutableArray. On the second page, i would like to add to that array, by typing in the top text field...

How to check a uiviewcontroller is present in uinavigationcontroller stack

I have a UINavigationController . I have to pop a view from a UINavigationController and replace it with another. How we can search for a UIviewcontroller object and replace it with another ? when i print NSMutableArray *allViewControllers = [NSMutableArray arrayWithArray: myDelegate.navigationController.viewControllers];...

Problem filling NSMutableArray w/ UIImage objects

I am having a baffling issue while trying to fill an NSMutableArray with UIImages. CGBitmapInfo bitmapInfo = kCGBitmapByteOrderMask; CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); while(...) // <--- Iterates through data sets { CGDataProvide...

NSArray sort and isolate

I have an NSArray of names, I want to sort them alphabetically into a UITableView and separate them into sections. I have a tagged section at the top, being section 0. I want the names sorted aplhabetically to come after that. So all names beginning with A get put into section 1, B into section 2, and so on. I need to be able to someho...

Reusing NSMutableArray

I'm getting some leaks (obvserved by Instruments) when trying to reuse an existing NSMutableArray (in order to save memory). Basically I'm creating an NSMutableArray, filling it with objects (UIImages) and passing it onto another object which retains it. However, I now need to use an NSMutableArray again. I figured I would release all ...