I have a image and want to it become a border as UIView, this view will be in size 320 x 60 or 160 x 200, I hope the border will keep width, what can I do?
I tried to use code as below, but it looks like not what I need, can you help me?
I tried to use code as below, but it looks like not what I need, can you help me?
Code:
image = [image stretchableImageWithLeftCapWidth:10 topCapHeight:10];
UIImageView *iv = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, image.size.width, image.size.height)];
iv.image = image;
[self.labelView setBackgroundColor:[UIColor colorWithPatternImage:image]];
//or
[self.labelView addSubview:iv];