전체 글(342)
-
UIImage
- 자주 사용하는 이미지 imageName는 시스템에 데이터를 캐싱하기 때문에 사용후 메모리에서 바로 해제가 되지 않는다.용량이 크고 자주 보여야 하는 이미지는 아래의 방법을 사용하는게 좋을것 같다.예) 통배경 이미지 UIImage *objImage = [UIImage imageNamed:@"test.png"]; - 한번만 쓰고 사용하지 않을 이미지 imageWithContentsOfFile 함수는 시스템에 데이터를 캐싱하지 않기 때문에 사용후 메모리에서 바로 해제가 된다.예) 웹에서 읽어와서 출력하는 일회성 이미지 NSString *strImagePath = [[NSBundle mainBundle] pathForResource:@"test.png" ofType:nil]; UIImage *objImage..
2014.10.28 -
Xcode 디버깅 설정
Debug창(Command + 6)에서 왼쪽 하단의 + 선택 Add Exception Breakpoint - Exception All => Done Add Symbolic Breakpoint - Symbol에 malloc_error_break 입력 => DoneAdd Symbolic Breakpoint - Symbol에 objc_exception_throw 입력 => Done Product - Scheme - Edit Scheme - Run 프로젝트명.app 선택 - Arguments - Environment Variables 의 + 선택name : NSZombieEnabled/ Value : YESname : NSDebugEnabled/ Value : YES Product - Scheme - Run 프..
2014.10.28 -
메모리 관리
## retainCount가 증가 함수- alloc- retain- copy- new ## retainCount 증가 함수, AutoRelease Pool 등록 함수- addSubView - UIButton *objButton = [UIButton buttonWithType:UIButtonTypeCustom];; Factory Method로 자동으로 autoreleaes가 된다.- NSString *str = [NSString stringWithFormat:@"%@", name];- UIImage *img = [UIImage imageNamed:@"test.png"]; ## 기타 retain : 참조카운터를 1 증가release : 참조카운터를 1감소. 참조카운터가 0이 되면 메모리가 해제된다.autor..
2014.10.28 -
Status Bar 없애기
소스[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
2014.10.28 -
iPhone 3GS UI Element Size
ElementSize (in Pixels) Window (include status bar)320 x 480 Status Bar (How to hide the status bar)20 View inside window (visible status bar)320 x 460 Navigation Bar44 Navigation Image / Toolbar Imageup to 20 x 20 (transparent PNG) Tab Bar49 Tab Bar Iconup to 30 x 30 (transparent PNG) Text Field31 Height of a view inside a navigation bar416 Height of a view inside a tab bar411 Height of a view ..
2014.10.28 -
단말기 해상도
* iPhone 3GS해상도입력해상도출력해상도480 x 320640 x 480 * iPhone 4GS해상도입력해상도출력해상도960 x 6401280 x 7201024 x 768 * iPad해상도입력해상도출력해상도1024 x 7681280 x 7201024 x 768 해상도 설명항목 설명해상도 화면 표시 가능한 해상도입력해상도 데이터로 읽어들일수 있는 최대 해상도출력해상도 Apple iPad Dock Connector를 통해 VGA 출력시 해상도
2014.10.28