'Round Rect'에 해당되는 글 1건

  1. 2011.09.30 둥근 모서리 UIImageView 만들기

둥근 모서리 UIImageView 만들기

Dev/iOS 2011. 9. 30. 15:31


#import <QuartzCore/QuartzCore.h>

...

    UIImage * image = [UIImage imageNamed:@"sexy.jpg"];

    UIImageView * imageView = [[[UIImageView alloc] initWithImage:image] autorelease];

    

    [imageView setFrame:CGRectMake(10.0f, 10.0f, 100.0f, 100.0f)];

    [imageView.layer setBorderColor:[[UIColor orangeColor] CGColor]];

    [imageView.layer setBorderWidth:6.0];

    [imageView.layer setCornerRadius:10.0];

    [imageView.layer setMasksToBounds:YES];    

    [scrollView addSubview:imageView];

     
 ------------------------
또 다른 방법으로는 UIView를 상속 받아 
UIBeizerPath 를 이용해 구현하는 방법이 있다.

'Dev > iOS' 카테고리의 다른 글

커스텀 액션 시트  (0) 2011.09.30
iOS 모달 화면에 네이게이션 바 붙이기.  (0) 2011.09.30
iOS 모달뷰  (0) 2011.09.29
아이폰 사진 관련.  (0) 2011.09.29
테이블 셀에서 사용할 때 UIImage 와 UILabel의 정렬.  (0) 2011.09.28
: