| ㅋㅋㅋ 뻘글 하나 써 봅니다. KillerWhale이라고 제가 회사에서 두번 째로 만든 게임이 하나 있어여 처음엔 좀 퍼포먼스도 엉망이고 그랬는데, 거듭되는 패치와 함께~ 새로생긴 랭킹 기능이 있어요 ![]() ![]() KillerWhale 랭킹보기 오.. 막 외쿡인의 향연!.. ㅋㅋㅋㅋ 랭킹페이지가 계속 업데이트 되는거 보면 개발자로서 뿌듯함을 느끼네영 ㅋㅋ 좀 꾸준히 많이 팔려야 될텐데.. |
'iPod Touch'에 해당되는 글 5건
- 세계인이 즐기는 KillerWhale (1) 2009/07/03
- KillerWhale가 런칭되었습니다 ^^ (2) 2009/04/29
- UIScrollView sample project (2) 2009/04/23
- iPuzzle이 절찬리 판매중입니당 :D 2009/01/28
- How to Double tapping UIScrollView to bring to initial zoom scale (3) 2008/12/30
입사한지 6개월만에 나온 두번째 야심작 =_= KillerWhale이 드디어 런칭되었습니다.디자인도 깔끔한 게.. (역시 돈을 써야 그럴싸 하게 나오네여) 나름 만족스럽네요 ^^ ![]() ![]() 달러 강세인 요즘, 돈좀 쭉쭉쭉 벌었으면 좋겠습니다.. (월급 좀 올려줘여.. -_-) |
어떤 외국인 아저씨가 //
// ScrollView.h // ScrollView // // Created by Riky.G Kim on 09. 04. 22. // Copyright 2009 TSMobile. All rights reserved. // #import <UIKit/UIKit.h>
@interface ScrollView : UIScrollView <UIScrollViewDelegate> {
UIImageView *SubImage; float ZoomValue; } @end
// // ScrollView.m // ScrollView // // Created by Riky.G Kim on 09. 04. 22. // Copyright 2009 TSMobile. All rights reserved. // #import "ScrollView.h"
@interface UIView (Gestures) // undocumented SDK extension - (void)zoomToScale:(float)scale; - (void)rotateToDegrees:(float)degrees; - (void)setRotationDegrees:(float)degrees duration:(NSTimeInterval)duration; - (float)rotationDegrees; - (void)setZoomScale:(float)scale duration:(NSTimeInterval)duration; - (float)zoomScale; @end @implementation ScrollView
- (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { self.delegate = self; self.alwaysBounceHorizontal = YES; self.alwaysBounceVertical = YES; self.bounces = YES; self.bouncesZoom = YES; SubImage = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"missingtaiji.jpg"]] autorelease]; ZoomValue = 100; CGSize ImageSize = SubImage.image.size; //minumum zoomscale of image while(ImageSize.width*(ZoomValue-1)/100>=320||ImageSize.height*(ZoomValue-1)/100>=460){ ZoomValue--; } [self setContentSize:ImageSize]; [self setMinimumZoomScale:ZoomValue/100]; [self addSubview:SubImage]; } return self; } - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return SubImage; } - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; if ([touch tapCount] == 2) { [SubImage setZoomScale:1.0 duration:0.0]; [self setContentOffset:CGPointMake([touch locationInView:self].x*ZoomValue/100,[touch locationInView:self].y*ZoomValue/100)]; } [super touchesBegan:touches withEvent:event]; } @end 도움이 되길 바라며~ |
How to Double tapping UIScrollView to bring to initial zoom scale
from 나에 의한/Development, iPhone 2008/12/30 16:13| 이런 궁극기를 숨겨 놓다니.. SDK문서에도 전혀 언급이 없던 이런 내용이 있다.. -_- UIScrollView를 두번 태핑 했을 때, 원래의 크기로 돌아가는 방법. CGAffineTransform 이걸 이용해서 Transform을 바꿔 겉모양만 그럴싸 하게 바꿔줬었는데, 땜빵이라 역시 한계가 있었다. @interface UIView (Gestures) // undocumented SDK extension - (void)zoomToScale:(float)scale; - (void)rotateToDegrees:(float)degrees; - (void)setRotationDegrees:(float)degrees duration:(NSTimeInterval)duration; - (float)rotationDegrees; - (void)setZoomScale:(float)scale duration:(NSTimeInterval)duration; - (float)zoomScale; @end UIScrollView에 addSubview된 UIView에게 위와 같은 method들을 사용할 수 있다. 스티브 잡스 횽아 이럴수가.. - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { if(type == 2) return View; else if(type == 1) return Panel; return nil; } - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale { } - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesBegan:touches withEvent:event]; UITouch *touch = [touches anyObject]; if ([touch tapCount] == 2) { if(type == 1) { [Panel setZoomScale:1.0 duration:0.2]; } else if(type == 2) { [View setZoomScale:1.0 duration:0.2]; } } } |






ScrollView.zip




댓글을 달아 주세요
kh 랑 bm 은 처음 보는 국기...!!