reloading IKImageBrowserView in an IBAction
reloading IKImageBrowserView in an IBAction
- Subject: reloading IKImageBrowserView in an IBAction
- From: Claus Guttesen <email@hidden>
- Date: Sun, 1 Mar 2009 22:23:34 +0100
Hi.
I read the excellent article 'Image Kit Programming Guide' at
http://developer.apple.com/documentation/graphicsimaging/Conceptual/ImageKitProgrammingGuide/Introduction/chapter_1_section_1.html#//apple_ref/doc/uid/TP40004907-CH1-SW1
and have my ImageBrowser working. I want to use it as the basis of an
image-uploader and would like to visualize the upload-progress by
removing the first image. I have connected a button to an IBAction and
can remove the images one by one.
- (IBAction)listImagesButtonClicked:(id)sender {
NSUInteger n;
NSArray *myArray;
if ( [mImages count] > 0 ) {
myArray = [mImages objectAtIndex:0];
NSLog(@"%@", [myArray description]);
[mImages removeObjectAtIndex:0];
[mImageBrowser reloadData];
n = [mImages count];
[numberOfImagesOutputField setIntValue:n];
// sleep(1);
}
}
[mImages removeObjectAtIndex:0] removes the first image and
[mImageBrowser reloadData] animates it.
I changed the 'if' to a 'while' but it doesn't animate removals one by
one but is waiting with [mImageBrowser reloadData] until all images
are removed (perhaps IBAction blocks it?) and remove all images at
once.
How can I make the [mImageBrowser reloadData] refresh within the while-loop?
--
regards
Claus
When lenity and cruelty play for a kingdom,
the gentler gamester is the soonest winner.
Shakespeare
--
regards
Claus
When lenity and cruelty play for a kingdom,
the gentler gamester is the soonest winner.
Shakespeare
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden