This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( [[[UIDevice currentDevice] systemVersion] floatValue] >= 5.0 ) | |
NSLog (@"iOS version is greater than 5.0"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//dim the screen base on a slider value | |
[[UIScreen mainScreen] setBrightness:[(UISlider *)sender value]/100]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//--Touch to dismiss keyboard | |
UIButton *dismissKeyboardButtonBg = [UIButton buttonWithType:UIButtonTypeCustom]; | |
dismissKeyboardButtonBg.backgroundColor = [UIColor clearColor]; | |
[dismissKeyboardButtonBg addTarget:self action:@selector(dismissKeyboard:) forControlEvents:UIControlEventTouchUpInside]; | |
[dismissKeyboardButtonBg setFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)]; | |
[dismissKeyboardButtonBg setAutoresizingMask:UIViewAutoresizingFlexibleWidth]; | |
[self.view addSubview:dismissKeyboardButtonBg]; |
OlderNewer