jwknz
jwknz

Reputation: 6824

iPhone showing Different to the Simulator

.

Hello,

First of all, this question may seem similar to my last, but it isn't. For reference if you must compare it is here Previous Question

Now I have developed an app and it runs perfectly on the iPhone Simulator. It does not use anything the Simulator cannot handle.

I have a button, generated in code and it appears on my mac in the simulator, but not on the 2 tested devices. 1) iPhone4 and the 2) iPod Touch 4th Gen.

How is that possible?

-(void)popUpMenu
{
UIImage *image = [UIImage imageNamed:@"[email protected]"];
UIImage *selectedImage = [UIImage imageNamed:@"[email protected]"];
UIImage *toggledImage = [UIImage imageNamed:@"[email protected]"];
UIImage *toggledSelectedImage = [UIImage imageNamed:@"[email protected]"];

NSArray *buttons = [NSArray arrayWithObjects:b1, b2, b3, b4, b5, nil];

RNExpandingButtonBar *bar = [[RNExpandingButtonBar alloc] initWithImage:image selectedImage:selectedImage toggledImage:toggledImage toggledSelectedImage:toggledSelectedImage buttons:buttons center:center];

//    RNExpandingButtonBar *bar = [[UIButton buttonWithType:UIButtonTypeRoundedRect] initWithArray:buttons];


[bar setHorizontal:NO];
[bar setExplode:NO];
[self.view addSubview:bar];
[self setBar:bar];
}

The array is a set of buttons that appear from this. The link to the Github is: Github - RNExpandingButtonBar

Then I use this code in viewDidLoad method to display the button

[self popUpMenu];

Cheers Jeff

Upvotes: 0

Views: 121

Answers (1)

iTukker
iTukker

Reputation: 2083

Check the case of the image names in your code and in your workspace, the device is case sensitive and OSX by default is not. Thats why it is working in your simulator and not on your device.

Upvotes: 2

Related Questions