어떤 전화가 올 바릅니까? 두 호출이 같은 결과를 얻은 것 같습니다. 정확한에iOS : UIImage 초기화
UIImage *img = [UIImage imageNamed: @"image.png"];
어떤 전화가 올 바릅니까? 두 호출이 같은 결과를 얻은 것 같습니다. 정확한에iOS : UIImage 초기화
UIImage *img = [UIImage imageNamed: @"image.png"];
우선
UIImage *img = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image" ofType:@"png"]];
또는
UIImage *img = [[UIImage alloc] imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image" ofType:@"png"]];
+1 나는 두 번째를 잘못 읽었습니다 (이것은 현명한 일이 아닙니다) – MByD