Hi,
I'm trying to initialize an NSArray in the loadView method. And when I initialize it, it has a certain address in the memory.
Then when I touch the screen I call the refresh method. When I debug the blends array here, it has the same address, but the content is {(int)[$VAR count]} objects...
Here is my code:
@implementation MCPickerViewController
#pragma mark Overriden methods
- (void)loadView {
[super loadView];
blends = [NSArray arrayWithObjects:@"Piepje", @"Paapje", nil];
pickerView = [[MCPickerView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
pickerView.delegate = self;
[self setView:pickerView];
}
#pragma mark Delegate methods for MCPickerView
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[self refresh];
}
#pragma mark Personal methods
- (void)refresh {
NSLog(@"count: %i", [blends count]);
}
@end
I hope someone can help me, cause I'm stuck for a long time!
Thnx!!