SAN FRANCISCO — In the latest example of courts grappling with police searches of electronic devices, a California appeal court on Wednesday backed the warrantless search of a juvenile’s digital camera.

After Alfredo C. was busted for tagging in an alley, a Los Angeles County Sheriff’s deputy patted him down and found an iPod and a digital camera in his pockets. A search of the camera revealed several photos of him holding a sawed-off shotgun.