Skip to content

Set iOS wallpaper, by Activator gesture, to a random Unsplash image

License

Notifications You must be signed in to change notification settings

ipadkid358/UnsplashWalls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UnsplashWalls

Change wallpaper to a random image from Unsplash using an Activator gesture

-setWallpaperForLocations: Documentation

-setWallpaperForLocations: takes in a bitmask for homescreen and lockscreen

PLStaticWallpaperImageViewController *wallpaper; 
// assume `wallpaper` gets initialized
long long lockscreen = 1;
long long homescreen = 2;

// if you're unfamiliar with this notation, it's a bitwise OR operator
long long bothScreens = lockscreen | homescreen;

// now we can easily set the wallpaper
[wallpaper setWallpaperForLocations:bothScreens]; // both
[wallpaper setWallpaperForLocations:lockscreen]; // lock
[wallpaper setWallpaperForLocations:homescreen]; // home
// of course you can directly plug in the values, but this is for this is for documentation purposes