In Xcode 4, the “Symbols” drop-down appears when pressing Control-6. You can change this in the Xcode settings by changing the key binding for “Standart Editor > Show Document Items”.
- (void) statusBarHack
{
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
UIView *addStatusBar = [[UIView alloc] init];
addStatusBar.frame = CGRectMake(0, 0, self.window.frame.size.width, 20);
addStatusBar.backgroundColor = [UIColor blackColor]; //change this to match your navigation bar
[self.window.rootViewController.view addSubview:addStatusBar];
}
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer;{
return YES;
}
Import <QuartzCore/QuartzCore.h>
and for changing the border color use the following code snippet (I’m setting it to redColor), textField.layer.cornerRadius=8.0f; textField.layer.masksToBounds=YES; textField.layer.borderColor=[[UIColor redColor]CGColor]; textField.layer.borderWidth= 1.0f;
- (BOOL)becomeFirstResponder
{
BOOL ret = YES ;
ret = [super becomeFirstResponder] ;
if( ret && ( _setupClearButtonMode == UITextFieldViewModeWhileEditing ) )
self.rightViewMode = UITextFieldViewModeAlways ;
return ret ;
}
- (BOOL)resignFirstResponder
{
BOOL ret = YES ;
ret = [super resignFirstResponder] ;
if( ret && ( _setupClearButtonMode == UITextFieldViewModeWhileEditing ) )
self.rightViewMode = UITextFieldViewModeWhileEditing ;
return ret ;
}