목록예전꺼(2014년이전꺼)/iOS (35)
liebus
// 키와값 세팅 NSMutableDictionary *diction = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"ValueOne", @"keyOne", @"ValueTwo", @"KeyTwo", nil]; // 값하나를 더 할때 [diction setOnject:value forKey:key]; // 값얻어오기 NSString *str = [diction objectForKey:@"KeyOne"]; // 모든 key를 NSArray형으로 리턴 [diction allkeys]; // 모든 데이터 삭제 [diction removeAllObjects];
터미널 에서 sudo /Developer/Library/uninstall -devtools --mode=all 비번 물어 보고 입력 하면 삭제 진행 됨
UIToolbar *toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 40) ]; UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 220, 40) ]; UIBarButtonItem *btnSear = [[UIBarButtonItem alloc] initWithCustomView:textField]; UIBarButtonItem *btnHomePage = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemReply target:self action:@selector(tou..
개발을 하다 보면 리소스 영역에 파일은 넣어 두고 NSString *path = [[NSBundle mainBundle] pathForResource:@"English" ofType:@"txt"]; NSString *strText = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; 이런식으로 읽어 와서 파일의 내용을 사용하고 싶을대가 있다. 3.x 때에는 Resources 디렉토리가 존재 해서 거기다 붙여 넣으면 됐는대 4.x 에는 그 디렉토리가 없어서 한참 해맸다. 처음에는 코딩을 잘못한줄 알고 이짖 저짖 해보고가 리소스를 추가하는 곳이 따로 있었다는 것을 방금 알게 됐다. -_-;; 위의 그림처럼 프로젝..