Skip to content

Instantly share code, notes, and snippets.

@agnosticdev
Created September 24, 2015 12:57
Show Gist options
  • Save agnosticdev/f37a2cd3259987ca3911 to your computer and use it in GitHub Desktop.
Save agnosticdev/f37a2cd3259987ca3911 to your computer and use it in GitHub Desktop.
Swift implementation of a UILabel Programmatically
let cellLabel = UILabel(frame: CGRectMake(10, 0, 400, 21))
cellLabel.textAlignment = NSTextAlignment.Left
cellLabel.text = self.tableData[indexPath.row]
cellLabel.font = UIFont(name: "HelveticaNeue-UltraLight", size: 20)
cellLabel.textColor = UIColor.blackColor()
cellLabel.backgroundColor = UIColor.clearColor()
cell.addSubview(cellLabel)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment