분류 전체보기
산사자 업그레이드
드디어 산사자로 업그레이드이제 xcode 4.5 예제를 안걸러네고 그냥 볼수 있다4.3에서는 4.5 프로젝트를 열어도 실행이 되지 않는다따로 해결 방법을 찾아봐도 안나오고 오로지 복사 붙여넣기로 새 프로젝트를 만들어야한다최근에 ios6.0을 발표하면서 더이상 스노우로는 개발하기 힘들다는 결론을 내리고컴퓨터의 버벅임을 감수하고 산사자로 갈아탔다.갈아타는데 백업하느라 시간을 다 날렸는데깔아보니 궂이 백업 할 필요가 없었다.3일 사용해본 결과 산사자에 비해 버벅이거나 그런점은 못느꼈다때문에 아직 스노우 레오파드를 사용하고계시면 업데이트하시길참고로 말하자면 제 맥은 맥북프로 2010 2분기 버젼이니듀얼코어에 i3, i5가 나오기 전버젼입니다 아래 사진은 mission control이 기능은 그래도 스노우가 더 ..
Opengl Library
Opengl Library (기본) 모음 http://www.swiftless.com/tutorials/opengl/gldrivers.html 에서 퍼왔습니다 opengl, glut, glu, gluax 등이 들어있습니다
함수에 같은 타입의 인수 여러개 받기
void foo(char *fmt, ...) { va_list ap, ap2; int d; char c, *s; va_start(ap, fmt); va_copy(ap2, ap); while (*fmt) switch(*fmt++) { case 's': /* string */ s = va_arg(ap, char *); printf("string %s\n", s); break; case 'd': /* int */ d = va_arg(ap, int); printf("int %d\n", d); break; case 'c': /* char */ /* Note: char is promoted to int. */ c = va_arg(ap, int); printf("char %c\n", c); break; } va_en..
image masking
CGImageRef myMaskedImage; const float myMaskingColors[6] = {124, 255, 68, 222, 0, 165}; myColorMaskedImage = CGImageCreateWithMaskingColors (image, myMaskingColors); CGContextDrawImage (context, myContextRect, myColorMaskedImage); CGImageRef myMaskedImage; const float myMaskingColors[6] = { 0, 124, 0, 68, 0, 0 }; myColorMaskedImage = CGImageCreateWithMaskingColors (image, myMaskingColors); CGCon..
iphone
// 세로 if (toInterfaceOrientation == UIInterfaceOrientationPortrait || toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){ NSLog(@"vertical"); rect = CGRectMake(0.0, 0.0, 1024.0, 768.0); topMBar.frame = CGRectMake(0.0, 0.0, 1024.0, 44.0); // 가로 } else if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRigh..