Hello,
I am having some trouble populating NSMutableArray with images. This NSMutableArray will be my datasource for an IKImageBrowserView.
Here is my code:
NOTE: paletteView is the IKImageBrowserView I declared in the .h file.
Any ideas as to why this not working. I don't get any errors or warnings, the problem is my IKImageBrowserView remains blank.
I am having some trouble populating NSMutableArray with images. This NSMutableArray will be my datasource for an IKImageBrowserView.
Here is my code:
Code:
NSBundle *resourcesBundle = [[NSBundle mainBundle]init];
NSString *resourcesPathToApp = [resourcesBundle resourcePath];
NSString *resourcesPathToAppExtraInfo = @"/ImageResourceFolder";
NSString *imageResourcesFolderPath = [resourcesPathToApp stringByAppendingString:resourcesPathToAppExtraInfo];
NSFileManager *fileManager = [[NSFileManager alloc]init];
NSMutableArray *imagesArray = [[NSMutableArray alloc]init];
[imagesArray addObject:[fileManager contentsOfDirectoryAtPath:imageResourcesFolderPath error:nil]];
[paletteView setDataSource:imagesArray];
Any ideas as to why this not working. I don't get any errors or warnings, the problem is my IKImageBrowserView remains blank.