Try this:
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
Tag Archive for 'objective-c'
So you might have spent some time trying to figure out how to do a fade transition on iPhone. You probably found sample code and doc for things like curl and flip but not fade in/out, right? Well, it’s actually pretty simple:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0];
someView.alpha = 0.1;
[UIView commitAnimations];
Bam. You just faded from whatever prior alpha value was set on someView to 0.1 (10%) opacity. The setAnimationDuration method takes a float value in seconds. You could go all the way to 0 to hide it, or set it higher later to fade it back in. This means you can do something like this:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
someImageView.alpha = 0.0;
[UIView commitAnimations];
[someImageView setImage: [UIImage imageNamed:@"anotherImage.png"]];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
someView.alpha = 1.0;
[UIView commitAnimations];
to create a fade transition from one image to the next. The total time from hiding one image to seeing the next would be 1 second, in this case.
Radio Javan is out on the Appstore! Click here or navigate to the music category to download your free copy.

Recent Comments