# SwiftUI Something wrong with button and canvas

**URL:** <https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256>\
**Category:** Swift\
**Created:** [October 26, 2019, 7:54pm UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256 "2019-10-26T19:54:49Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunwalker](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sunwalker/32/84981_2.png) [@sunwalker](https://forums.kodeco.com/u/sunwalker)\
**Post date:** [October 26, 2019, 7:54pm UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/1 "2019-10-26T19:54:49Z")

</div>

![50](https://files.chunter.kodeco.com/original/3X/4/a/4aacf78f6a9fb45b1f47b9652df86edac788ae39.png) Hello there.

I don’t know what am I doing wrong, but after I selected the background image for my buttons, they don’t look like the image and I could not find out why. Anyone can help me please?

Another thing. I also don’t know why, but my canvas is like disabled. I can’t select anything on the canvas. Can’t click on the buttons, labels, etc. The only thing that happen when I click on it, is the blue bar around him. Can anyone help with this too?

Thanks!!!

---

<div class="post-metadata">

**Author:** ![gdelarosa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gdelarosa/32/109063_2.png) [@gdelarosa](https://forums.kodeco.com/u/gdelarosa)\
**Post date:** [October 27, 2019, 11:20pm UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/2 "2019-10-27T23:20:21Z")

</div>

Hi @sunwalker, welcome to the forum community! What episode were you on when you noticed the background image for your buttons were not correct?

---

<div class="post-metadata">

**Author:** ![sunwalker](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sunwalker/32/84981_2.png) [@sunwalker](https://forums.kodeco.com/u/sunwalker)\
**Post date:** [October 28, 2019, 4:37pm UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/3 "2019-10-28T16:37:24Z")

</div>

Hello @gdelarosa, thanks!  
In the episode 43.  
I tryied to download the project and still not correct in my xcode.  
I can’t click on views on the canvas. I try and select all the canvas instead of the view I selected.

If it helps, I can make a short movie later to show this happening.

- Sorry for my bad english…

---

<div class="post-metadata">

**Author:** ![gdelarosa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gdelarosa/32/109063_2.png) [@gdelarosa](https://forums.kodeco.com/u/gdelarosa)\
**Post date:** [October 28, 2019, 10:28pm UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/4 "2019-10-28T22:28:44Z")

</div>

Hey @sunwalker, when you click on the assets folder of the project, do you see these?  
 ![54%20PM](https://files.chunter.kodeco.com/original/3X/2/f/2f4ac6134f7a6b1e8891602a696560c4fd38d6c5.png)

As for the canvas issue, have you tried restarting Xcode and your computer? I’m not certain why the canvas is not capable of responding to your clicks. It may be a bug within Xcode. Are you able to use the canvas when working on other projects?

---

<div class="post-metadata">

**Author:** ![sunwalker](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sunwalker/32/84981_2.png) [@sunwalker](https://forums.kodeco.com/u/sunwalker)\
**Post date:** [October 28, 2019, 11:23pm UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/5 "2019-10-28T23:23:04Z")

</div>

Hello. No, only these:  
 ![13](https://files.chunter.kodeco.com/original/3X/c/e/ce9758a5f2ab7f6ec9131e12059739639be15117.png)

I’m following the new course about SwiftUI, these you showed is from the UiKit course, isn’t?

About the canvas, I restarted it… And on other projects it is working.  
I’m trying to attach a video in a .zip file, but I’m not allowed.

---

<div class="post-metadata">

**Author:** ![gdelarosa](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/gdelarosa/32/109063_2.png) [@gdelarosa](https://forums.kodeco.com/u/gdelarosa)\
**Post date:** [October 30, 2019, 2:29am UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/6 "2019-10-30T02:29:13Z")

</div>

Hi @sunwalker, I was able to view the assets from this link [https://www.raywenderlich.com/4919757-your-first-ios-and-swiftui-app/lessons/43](https://www.raywenderlich.com/4919757-your-first-ios-and-swiftui-app/lessons/43). Is this where you are?

---

<div class="post-metadata">

**Author:** ![arminex](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/arminex/32/81494_2.png) [@arminex](https://forums.kodeco.com/u/arminex)\
**Post date:** [November 30, 2019, 10:40pm UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/7 "2019-11-30T22:40:25Z")

</div>

Hello,  
I have similar issue but the yellow background images doesn’t work on my buttons (they’re just black). This issue occurs when running via my device (works fine on simulator)

![PNG](https://files.chunter.kodeco.com/original/3X/8/d/8d3be4e40522e9f8fba9507dbb5bcac0623093d9.jpeg)

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [January 12, 2020, 9:33pm UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/8 "2020-01-12T21:33:04Z")

</div>

@arminex Do you still have issues with this?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [January 12, 2020, 9:33pm UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/9 "2020-01-12T21:33:53Z")

</div>

@sunwalker Do you still have issues with this?

---

<div class="post-metadata">

**Author:** ![jayantvarma](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jayantvarma/32/111768_2.png) [@jayantvarma](https://forums.kodeco.com/u/jayantvarma)\
**Post date:** [January 14, 2020, 9:46am UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/10 "2020-01-14T09:46:46Z")

</div>

Hi @arminex,  
I don’t know the exact problem with your code as I cannot see it. However one issue that we were also stumped by with Xcode and iOS 13 is that the assets create a folder that does not match (case wise) the name you give it. This can result in the asset not being available as it is case sensitive on the device.

cheers,

---

<div class="post-metadata">

**Author:** ![avantjer](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/avantjer/32/81494_2.png) [@avantjer](https://forums.kodeco.com/u/avantjer)\
**Post date:** [February 9, 2020, 9:41am UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/11 "2020-02-09T09:41:39Z")

</div>

Yes, this is still a problem in **iOS\_Apprentice\_v8.1.0**  
…which also occurs when building/running: **chapter-08-final**

**SOLVED**

I was having another, (_unrelated?_), problem as well.  
I was unable to run against a physical device. (_“too many devices”?_)

Since I wasn’t able to resolve that problem through my Apple Developer Account, I created a new Developer Account and added the new account in Xcode and…

Now I’m able to run against a physical device, and the buttons show correctly on both physical device and simulator.

I can’t explain why, but there ya go! 😉

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [April 10, 2020, 11:58am UTC](https://forums.kodeco.com/t/swiftui-something-wrong-with-button-and-canvas/86256/12 "2020-04-10T11:58:52Z")

</div>

This topic was automatically closed after 166 days. New replies are no longer allowed.
