TargetView - Ben-Stacey/COSC345 GitHub Wiki

TargetView

Class that controlls the targets for the Drag and Drop game

public class TargetView: UIImageView 

Inheritance

UIImageView

Initializers

init(coder:)

Init shouldnt be called and if it is diaplays the fatal error

public required init(coder aDecoder: NSCoder) 

init(letter:sideLength:)

This init function displays the empty tile that the user will drag the string into

public init(letter: Character, sideLength: CGFloat) 

Parameters

  • Letter: [in] the string that will be dragged into it
  • sideLength: [in] the length of the tile

Properties

letter

var letter: Character

isMatched

var isMatched: Bool = false