Save a UIImageView using NSUSerDefaults

Posted by Magician Software on Stack Overflow See other posts from Stack Overflow or by Magician Software
Published on 2010-04-09T19:18:22Z Indexed on 2010/04/09 19:23 UTC
Read the original article Hit count: 438

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

© Stack Overflow or respective owner

Related posts about uiimageview

Related posts about nsuserdefaults