Brightness on my iPhone 6 keeps going down and sometimes even up by itself how do I stop it?

The brightness on my iPhone 6 keeps going down and sometimes even up by itself how do I stop it?

Do you have auto brightness on? If you do, that is probably why. Go to your settings and turn off the auto brightness