2

In my project, In Xcode 7 the image slicing was working fine. After moving to Xcode 8 image slicing not working.

I followed everything given here.

But final image looks like this:

Actual final image

Anything I'm missing for Xcode 8?

Community
  • 1
  • 1
Mohammad Zaid Pathan
  • 16,304
  • 7
  • 99
  • 130
  • Show your original image, and show how you want it to end up looking. – DonMag Mar 31 '17 at 13:13
  • Image and end result you can find [here](http://stackoverflow.com/q/30001569/3411787) – Mohammad Zaid Pathan Mar 31 '17 at 13:18
  • Please explain, as there are several things going on in the page you linked. Do you want to **tile** an image? Or do you want to **stretch** an image? Or do you want to tile or stretch just **part** of an image? – DonMag Mar 31 '17 at 13:23
  • I want to repeat full image given in question [here](http://stackoverflow.com/q/30001569/3411787) – Mohammad Zaid Pathan Mar 31 '17 at 13:25
  • OK - so, in your code, you have this line? `bluePatternView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"blue_pattern.png"]];` – DonMag Mar 31 '17 at 13:26
  • No, I'm using [this](http://stackoverflow.com/a/30023188/3411787) answer to repeat image. – Mohammad Zaid Pathan Mar 31 '17 at 13:27
  • That is only a partial answer. It's showing how to use slicing to make only a *portion* of the image the pattern for the background. – DonMag Mar 31 '17 at 13:31
  • Yes, I wanted to repeat the whole image as image of UIImageView. – Mohammad Zaid Pathan Mar 31 '17 at 13:32
  • OK - please show the exact code you are using - not a link to someone else's partial code. – DonMag Mar 31 '17 at 13:35
  • @DonMag, I'm sorry I think you didn't get my question. I'm using image slicing provided by Xcode, no code required. – Mohammad Zaid Pathan Mar 31 '17 at 13:36
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/139593/discussion-between-donmag-and-zaid-pathan). – DonMag Mar 31 '17 at 13:37
  • Curious... after mucking around with various images, I'm getting the impression that this is *not* by-design functionality, and only "just happened" to work previously. Very, very inconsistent results using a wide variety of images. – DonMag Mar 31 '17 at 15:03

1 Answers1

0

Please check what you have as deployment target. Xcode image slicing supported for deployment targets iOS 7+

ReDetection
  • 3,146
  • 2
  • 23
  • 40