본문 바로가기

Development/IOS & Mac

[IOS] UIScrollView contentOffset 애니메이션 후 다른 작업하기 [UIView animateWithDuration:2.0 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations: ^(void) { [scrollView setContentOffset:CGPointMake(x, y)]; } completion:^(BOOL isFinished) { //다른거 하기~! }]; 더보기
[IOS Library] 카테고리가 있는 Refresh Controller 슬라이딩 방식보다 더 직관적인것 같다.~! 사진이나 SNS 관련 앱을 만들떄 유용할 것 같다. MBPullDownController MBPullDownController accepts two view controllers, which it presents one above the other. The front view controller is configured to accept a pull interaction which it utilizes to show or hide back view controller. MBPullDownController from Matej Bukovinski on Vimeo. 더보기
[cocos2d-x] CCLayer 또는 CCSprite clipping하기 draw 함수에서 아래와 같이 사용하면 된다.따로 kmGLPushMatrix(), kmGLPopMatrix()를 호출 하지 않아도 된다. glEnable(GL_SCISSOR_TEST); CCEGLView::sharedOpenGLView().setScissorInPoints(clippingRegion.origin.x + getPosition().x, clippingRegion.origin.y + getPosition().y, clippingRegion.size.width, clippingRegion.size.height); CCNode::visit();glDisable(GL_SCISSOR_TEST);[출처] cocos2d-x 레이어 클리핑 시키기|작성자 김아키라 더보기
[IOS] Instrument Alloc 항목 설명 Instrument를 통해 메모리 사용량을 확인할 때 필요한 용어 정리 Live Byte - 현재 Alloc된 Object크기, #의 경우 갯수 #Transitory - release된 Object수 Overall Bytes - 지금까지 Alloc된 Objject 크기, #의 경우 갯수 [출처] Xcode Tools|작성자 인생 더보기
[IOS Library] 이동 & 삽입 & 확대해서 보기 등등 다양한 기능을 가진 GridView 코드 보러가기 Features - General:Works on both the iPhone and iPad (best suited for iPad)Works on both portrait and landscape orientationInherits from UIScrollView - you can override the UIScrollViewDelegate if you wishReusable cellsEdit mode to delete cellsGestures work great inside of the scrollView4 different layout strategies (Vertical, Horizontal, Horizontal Paged LTR/TTB)Possibility to provide y.. 더보기
[IOS] UIScrollView에서 스크롤 중 NSTImer가 동작이 되게.. UIScrollView에서 Timer를 사용할때 [NSTimer scheduledTimerWithTimeInterval:.........] 위의 함수로 사용하면 스크롤이 완전히 종료된 후에 호출이 되어진다.그래서 아래의 코드로 대체를 하면 스크롤 중에도 동작을 합니다. NSTimer *timer [NSTimer timerWithTimeInterval:0.3 target:self selector:@selector(update:) userInfo:nil repeats:YES]; [[NSRunLoop mainRunLoop] addTimer:m_timer forMode:NSRunLoopCommonModes]; 더보기
[IOS] UIView Animation 연속적인 호출시 유용 IOS에서 보통 UIView에 애니메이션을 적용할 때 [UIView beginAnimations:nil context:NULL];애니메이션..... [UIView commitAnimations]; 위의 소스로 연속적으로 애니메이션을 호출할 경우 애니메이션이 부드럽지 않고 딱딱 끊어짐? 현상이 발생하는 경우가 있다 그럴때 아래와 같이 setAnimationBeginsFromCurrentState 을 설정하면 애니메이션 하는 상태에서 다시 실행하여서 부드럽게 연출이 된다. [UIView beginAnimations:nil context:NULL]; [UIView setAnimationBeginsFromCurrentState:YES];애니메이션.....[UIView commitAnimations]; 더보기