반응형
rss 아이콘 이미지

SVN 오류 해결법

개발/개발팁 2011. 6. 21. 12:13 Posted by 법당오빠
반응형
....... remains in conflict 

 svn remove --force filename
svn resolve --accept=working  filename
svn commit

......... locked

해당소스경로 .svn파일안에 lock이라는 파일을 삭제하면된다.!! 

다른건 생각이 안나네요 ! 차차 업데이트 하겠습니다. 
반응형

[IB없이 개발하기]UIImage 넣기

개발/개발팁 2011. 5. 9. 12:10 Posted by 법당오빠
반응형
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"넣고싶은 이미지.png"]];
    [imageView setFrame:CGRectMake(0, 0, 320, 460)];
    [self.view addSubview:imageView];

반응형

[IB없이 개발하기]UIButton 넣기

개발/개발팁 2011. 5. 4. 17:26 Posted by 법당오빠
반응형
UIImage *stampImg;

CGRect frame = CGRectMake(5 + (80 * (i % 4)), (70 * (i / 4)), 60, 60);
stampbtn = [[UIButton alloc] initWithFrame:frame];

stampImg = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"emo_%02d", i + 1] ofType:@"png"]];
[stampbtn addTarget:self action:nil forControlEvents:UIControlEventTouchUpInside];
[stampbtn setBackgroundImage:stampImg forState:UIControlStateNormal];
[stampbtn setBackgroundImage:stampImg forState:UIControlStateHighlighted];
[stampImg release];
[stampScoll addSubview:stampbtn];
반응형

[IB없이 개발하기] UILabel 붙이기

개발/개발팁 2011. 5. 4. 17:23 Posted by 법당오빠
반응형
# UILabel

UILabel *label;
label = [[UILabel alloc] init];       
label.frame = CGRectMake(5 + (0 * (i % 25)), 39, 50, 20);
label.textAlignment = UITextAlignmentCenter;
label.backgroundColor = [UIColor clearColor];
label.font = [UIFont systemFontOfSize:10];
label.textColor = [UIColor whiteColor];
label.text = @"들어갈 텍스트";


반응형
반응형
- (void)_hideKeyboardRecursion:(UIView*)view {
    if ([view conformsToProtocol:@protocol(UITextInputTraits)]){
        [view resignFirstResponder];
    }
    if ([view.subviews count]>0) {
        for (int i = 0; i < [view.subviews count]; i++) {
            [self _hideKeyboardRecursion:[view.subviews objectAtIndex:i]];
        }
    }
}

- (void) hideKeyboard {
    UIWindow *tempWindow;
    for (int c=0; c < [[[UIApplication sharedApplication] windows] count]; c++) {
        tempWindow = [[[UIApplication sharedApplication] windows] objectAtIndex:c];
        for (int i = 0; i < [tempWindow.subviews count]; i++) {
            [self _hideKeyboardRecursion:[tempWindow.subviews objectAtIndex:i]];
        }
    }
}

이렇게 하면 모든뷰를 검사하여 키보드를 숨겨줍니다

반응형

'개발 > 개발팁' 카테고리의 다른 글

SVN 오류 해결법  (0) 2011.06.21
[IB없이 개발하기]UIImage 넣기  (0) 2011.05.09
[IB없이 개발하기]UIButton 넣기  (0) 2011.05.04
[IB없이 개발하기] UILabel 붙이기  (0) 2011.05.04