0

Heres the code, and for some reason Expected Declaration keeps on showing up beside it. Also these answers didn't seem to work for me.

import UIKit

class SpeechBubble: UIView {
    let uButton  = UIButton(type: .custom)
    let uImage = UIImage (named: "Upvote")
    uButton.setImage(uImage, for: .normal)
}

Upvote is an image inside Assets.xcassets that is listed as universal and has 1x, 2x and 3x options

Sam
  • 1,765
  • 11
  • 82
  • 176
  • Put your code in a function. – rmaddy Dec 09 '18 at 05:07
  • @rmaddy >:( Well that worked. Any more advice? – Sam Dec 09 '18 at 05:10
  • @rmaddy What is it a duplicate of, I posted 2 links of similar questions that don't discuss putting it in a function, and I couldn't find any answers that discussed putting it in a function – Sam Dec 09 '18 at 05:11

0 Answers0