-1

Hi am working on ios project using xcode 6.0.1,ios 8.While I am running my app in iphone6 simulator it is not showing my image.I have set my image using the following code,[UIImage imageNamed:@"/Resources/btnbg.png"].What is the reason for this.it is perfectly working in my iphone4s.

Madhumitha
  • 3,794
  • 8
  • 30
  • 45
  • Take a look on this - http://stackoverflow.com/questions/24908239/cant-set-background-for-buttons-ios/24909502#24909502 – Kampai Feb 19 '15 at 08:24

2 Answers2

1

Please check your retina size image i.e. btnbg@2x.png.As may be the retina size image is not being loaded properly.As iphone 6 loads retina size images that is in the form of ImageName@2x.png.

ashForIos
  • 399
  • 1
  • 5
  • 18
  • This answer would be improved by expanding upon it a little. As it stands, it's a little too terse to be helpful to future readers. – Sobrique Feb 19 '15 at 12:43
1

No need to write full path.

user only image name as below:

[UIImage imageNamed:@"btnbg.png"]

It'll take full path automatically.

And also check @2x image of same image.

Er.Shreyansh Shah
  • 1,482
  • 1
  • 9
  • 29