2

I am working on PDF Application in which I want to add brightness settings which help to increase-decrease the brightness of a PDF page.

How can I do so?

Pierre.Vriens
  • 2,101
  • 75
  • 28
  • 42
Mayur
  • 5,212
  • 7
  • 37
  • 65
  • See this post: (http://stackoverflow.com/questions/8207305/how-to-change-brightness-in-ios-5-app) – Wienke Apr 09 '12 at 11:38
  • 1
    You're welcome. I think Malek has given you the full answer to your question, complete with info on multi-version compatibility. You might want to check it as the accepted answer. – Wienke Apr 10 '12 at 01:10

2 Answers2

1

if your app target is iOS 5 and above you can do it like this :

[[UIScreen mainScreen]setBrightness:0.5];//The value should be from 0 to 1.0

And if you want your app to be compatible with previous iOS versions then you will need to add a view to your pdfViewController , make it backGround Color black then change its alpha based on the brightness slider value.

Malek_Jundi
  • 6,080
  • 2
  • 26
  • 35
1

insert UIImage with Black.png is a Black color image & change slider value for Brightness 0.2 to 1.0

UIImageView *imgview=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 768, 1024)];
imgview.image=[UIImage imageNamed:@"Black.png"];

[self.view addSubview:imgview];
[imgview bringSubviewToFront:self.view];
imgview.alpha=1.0;
arvind
  • 368
  • 2
  • 8