Jack Nutkins
Jack Nutkins

Reputation: 1555

UIButton doesn't display properly

I added a UIButton to a view in my application. Its a custom button, with two different images for its default and highlighted state. I have 2 other buttons on the view that are very similar but provide different functions.

However, my latest button won't display at all. I've clean the project as suggested in another question and it still won't display. Whats doubly weird though is that if I click the area of the view where the button should be, the IBAction is called and the UITextFields are cleared as if the button was there. Its as if the button is being created without its graphics being displayed.

Does anyone know what might be happening here? The button looks as it should in IB.

Thanks, Jack

Upvotes: 2

Views: 94

Answers (1)

Constantino Tsarouhas
Constantino Tsarouhas

Reputation: 6886

Go to the Organizer window, select the Projects tab, select your project in the list and then delete the derived data folder by choosing "Delete…" in the window.

If that doesn't work, check if the images are included in the target. Select the image files and look in the info editor (the Files tab — the left one) if it's added to the target.

Hope that helps.

Upvotes: 2

Related Questions