[ios] keyboard textFieldShouldReturn 안될때 기본적으로 키보드 딜리게이트 의 textFieldShouldReturn 는 아래와 같이 사용한다. 물론 .h - UITextFieldDelegate 상속되어 있어야 한다. - (BOOL)textFieldShouldReturn:(UITextField *)textField { NSLog(@"return Key at %@",textField); [tfieldPhone1 resignFirstResponder]; [tfieldPhone2 resignFirstResponder]; return YES; } 하지만 , 아무리 해도 안되어 찾아보니. 중요한 한가지가 있었다. TextFieldName.delegate = self; 이것이다. 적절한 곳에 위와 같이 딜리케이트를 넣어주어 설정하면 좋을거 같다. 나는 키보드 .. 더보기 [php] 특수문자 치환 제거 특수문자를 치환하거나 제거할 때 쓰는 preg_replace. $string = preg_replace("/[ #\&\+\-%@=\/\\\:;,\.'\"\^`~\_|\!\?\*$#()\[\]\{\}]/i", "",$string); 모든 특수문자는 사라진다. 한자 한자 하고 싶을땐 $newstr = str_replace("}","",htmlspecialchars($newstr)); 더보기 [php] 스마트 폰 가로지원 환경설정 - Detecting Smart Phone Screen Orientation in PHP & Javascript if( isset($_COOKIE['orientation']) ){ $rotation = $_COOKIE['orientation']; if( $rotation == 0 ){ echo 'Is Portrait'; }else{ echo 'Is Landscape'; } }else{?> }?> 더보기 이전 1 ··· 62 63 64 65 66 67 68 ··· 253 다음