Stretching a image in iOS using colorWithPatternImage
问题 I have a image like this: . In iPad, when I place it with these code: [separatorLineView setFrame:CGRectMake(10, 0, 430, 3)]; separatorLineView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"divider.png"]]; In iPad, it shows up like this: In iPhone, it works fine. The code for iPhone looks like this: [separatorLineView setFrame:CGRectMake(10, 0, 180, 3)]; separatorLineView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"divider.png"]]; How to