Is it possible to preset one of the dynamic wallpapers supplied to be used as background for my app? It doesn't have to be the one the user is using at the moment since I know there is no public API for that, but anyone selected by me whilst coding would do.
Asked
Active
Viewed 281 times
1 Answers
0
I'm not sure, but I think there are not public APIs to access programmatically dynamic wallpapers from an app.
Your best try could be mimicking dynamic wallpaper by creating your own animation:
NSArray *frames = [NSArray arrayWithObjects:[UIImage imageNamed:@"firstFrame.png"],
[UIImage imageNamed:@"secondFrame.png"],
// add other frames
, nil];
UIImageView *dynamicWallpaper = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];
dynamicWallpaper.animationImages = frames;
dynamicWallpaper.animationDuration = 60.0f; // seconds
dynamicWallpaper.animationRepeatCount = 0; // 0 = loops forever
[dynamicWallpaper startAnimating];
[self.view addSubview:dynamicWallpaper];
[dynamicWallpaper release];
Anyway, doing so you need a lot of images...

Giuseppe Garassino
- 2,272
- 1
- 27
- 47