본문 바로가기

IOS

[IOS] UIView 점선 테두리 그리기 CAShapeLayer *layer = [CAShapeLayer layer]; [layer setStrokeColor:[[UIColor colorWithRed:0.86 green:0.86 blue:0.83 alpha:1] CGColor]]; [layer setFillColor:[[UIColor clearColor] CGColor]]; [layer setLineWidth:3]; [layer setLineDashPattern:[NSArray arrayWithObjects:[NSNumber numberWithInt:5], [NSNumber numberWithInt:3], nil]]; [layer setPath:[UIBezierPath bezierPathWithRoundedRect:self.drawingPlac.. 더보기
[IOS] UIScrollView contentOffset 애니메이션 후 다른 작업하기 [UIView animateWithDuration:2.0 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations: ^(void) { [scrollView setContentOffset:CGPointMake(x, y)]; } completion:^(BOOL isFinished) { //다른거 하기~! }]; 더보기
[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.. 더보기