3

How do I detect if my iOS device has an LED light or not?

I am trying to see the difference between an iPad 2 (front and back camera) and an iPhone 4 (front, back + LED light)

Ethan Allen
  • 13,099
  • 22
  • 89
  • 175
  • possible duplicate of [Turn on torch/flash on iPhone 4](http://stackoverflow.com/questions/3190034/turn-on-torch-flash-on-iphone-4) – jscs Jun 11 '11 at 02:45

2 Answers2

5

Turn on torch/flash on iPhone

Community
  • 1
  • 1
Louie
  • 5,868
  • 4
  • 28
  • 44
  • 2
    I am not sure why this was down voted. The answer in the other question tells you how to determine if there is a flash or not on the device. – Andrew T Finnell Jun 11 '11 at 00:59
  • 2
    Answers that consist of nothing but links, especially to other SO questions, aren't generally considered good answers. http://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers @Andrew – jscs Jun 11 '11 at 02:44
  • 2
    so im supposed to just ignore the guy? or "copy and paste" another answer and take credit?... no thanks! :) – Louie Jun 11 '11 at 02:48
  • That’s what quotes and links are for. It’s not a matter of taking credit; it’s a matter of providing a complete answer instead of a plain link, giving credit to the original author of the answer, and potentially identifying what bits in the original answer are most applicable to this particular question. /cc @Josh –  Jun 11 '11 at 02:58
  • 3
    As Bavarious says, as long as you have more to add, it's perfectly okay to refer to answers in another question, giving credit where due (like I just did to Bavarious ;). If another answer _completely_ covers this question, then you should ideally flag the question to be closed as a duplicate of the other. Use the "flag" link, select "It doesn't belong here", then "Exact duplicate". – jscs Jun 11 '11 at 03:06
  • so i should have said... "this has already been answered " .. got it! :) – Louie Jun 11 '11 at 03:15
  • @Louie: You miss out on some rep, but over the long run, it's better for the site, and for future readers. Thanks! – jscs Jun 11 '11 at 03:19
  • 1
    no i understand the point behind it, but I dont expect the user to not get an answer. Yes they should have dug in a little more but if they need help, thats what the site is for. I agree, and agree. Lets stop adding to this ticket its taking away from the site. :) Happy Coding! – Louie Jun 11 '11 at 03:24
-1

Those should give information you needed.

[[UIDevice currentDevice] model];
[[UIDevice currentDevice] systemVersion];
[[UIDevice currentDevice] systemName];

When you know the device you know if it has a LED light or not.

DreamOfMirrors
  • 2,112
  • 21
  • 34
  • This will not tell you if the device has an LED flash or not .. Sure you know what physical devices have them, but programmatically, this will not know if the device has an LED. – WrightsCS Jun 11 '11 at 01:31