Start with Apple's Photo framework example app.