Sorry if this is a n00b question (self-admitted n00b), but having a strange problem hoping someone could assist with. I recently added a trashcan.png image to a Delete button for a list view - code extract below:
UIButton *deleteButton = [UIButton buttonWithType:UIButtonTypeCustom];
deleteButton.bounds = CGRectMake(0.0, 0.0, 100, 30);
[deleteButton setBackgroundImage: [[UIImage imageNamed: @"redbutton-1.png"] stretchableImageWithLeftCapWidth:5.0 topCapHeight:0.0] forState:UIControlStateNormal];
[deleteButton setImage:[UIImage imageNamed: @"trashIcon.png"] forState:UIControlStateNormal];
deleteButton.titleLabel.font = [UIFont systemFontOfSize:12];
[deleteButton setTitle: @"Delete" forState:UIControlStateNormal];
[deleteButton addTarget:self action:@selector(bookmarkDeleteButtonAction
forControlEvents:UIControlEventTouchUpInside];
deleteButton = [[UIBarButtonItem alloc] initWithCustomView:deleteButton];
NSArray *barButtonArry = [[NSArray alloc]initWithObjects:flexSpace,deleteButton,flexSpace,c ancelButton,flexSpace, nil];
The trashcan picture appears when running the app from the simulator, but doesn't appear when deploying/running from my device.
Any hints? Many thanks in advance!