I want to repeat the following image:

to achieve the following backgro
As my comment already said: use
bluePatternView.backgroundColor =
[UIColor colorWithPatternImage:[UIImage imageNamed:@"blue_pattern.png"]];
You dont want to stretch your image. Let UIKit take care of the repetition.
Assuming that your bluePatternView is the actual large view for which you want to set a pattern as background. Maybe you are setting the background property of the wrong view if that code is still not working.
Note: duplicating the SAME image with @2x and @3x extension will lead to behaive properly for better resolution devices.
