views:

146

answers:

0

How do you save an Image using NSUSerDefaults The main image is set in IB, the secondary image is set here

- (IBAction) changeImage {
 CATransition *fadeThing = [CATransition animation];
 fadeThing.type = kCATransitionFade; 
 fadeThing.subtype = kCATransitionFade; 
 fadeThing.duration = 1; 
 [CATransaction begin];
 [background.layer addAnimation:fadeThing forKey:@"superCoolSloMoFadingAnimation"];  
 [background setImage:[UIImage imageNamed:@"Mainbackground.png"]];
 [CATransaction commit];
}

I will have different actions for different images. Anyway of setting this up so I can use a toggle button maybe and change the image as well as save it

Thanks