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?
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?
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.
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;