Skip to content

Instantly share code, notes, and snippets.

@Jamonek
Created January 8, 2016 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jamonek/4c242f5ddbc887c8dd33 to your computer and use it in GitHub Desktop.
Save Jamonek/4c242f5ddbc887c8dd33 to your computer and use it in GitHub Desktop.
// I know this is horrible lol I needed a quick hacky way to create the blurred view with data
// lil bit of number magic :o
// definitely a better way to do this lol I'll come back to it as well
schoolNameLabel.frame = CGRect(x: sX*0.22, y: sY * 0.1, width: 15, height: 20)
schoolNameLabel.sizeToFit()
schoolNameLabel.textColor = UIColor.grayColor()
specialView.addSubview(schoolNameLabel)
schoolNameLabelContent.frame = CGRect(x: sX*0.4, y: sY*0.1, width: 15, height: 20)
schoolNameLabelContent.sizeToFit()
specialView.addSubview(schoolNameLabelContent)
districtNameLabel.frame = CGRect(x: sX*0.22, y: sY * 0.2, width: 15, height: 20)
districtNameLabel.sizeToFit()
districtNameLabel.textColor = UIColor.grayColor()
specialView.addSubview(districtNameLabel)
districtNameLabelContent.frame = CGRect(x: sX*0.4, y: sY*0.2, width: 150, height: 35)
districtNameLabelContent.numberOfLines = 0
districtNameLabelContent.sizeToFit()
specialView.addSubview(districtNameLabelContent)
gradesNameLabel.frame = CGRect(x: sX*0.22, y: sY*0.39, width: 15, height: 20)
gradesNameLabel.sizeToFit()
gradesNameLabel.textColor = UIColor.grayColor()
specialView.addSubview(gradesNameLabel)
gradesLabelContent.frame = CGRect(x: sX*0.4, y: sY*0.39, width: 15, height: 20)
gradesLabelContent.sizeToFit()
specialView.addSubview(gradesLabelContent)
phoneNumberLabel.frame = CGRect(x: sX*0.22, y: sY*0.48, width: 15, height: 20)
phoneNumberLabel.sizeToFit()
phoneNumberLabel.textColor = UIColor.grayColor()
specialView.addSubview(phoneNumberLabel)
phoneNumberLabelContent.frame = CGRect(x: sX*0.4, y: sY*0.48, width: 15, height: 20)
phoneNumberLabelContent.sizeToFit()
//phoneNumberLabelContent.editable = false // When I switch back to `UITextView`
//phoneNumberLabelContent.dataDetectorTypes = .PhoneNumber
specialView.addSubview(phoneNumberLabelContent)
let seeMoreButton = UIButton()
seeMoreButton.frame = CGRect(x: sX*0.22, y: sY*0.65, width: 200, height: 20)
seeMoreButton.setAttributedTitle(NSAttributedString(string: "View More", font: UIFont.boldSystemFontOfSize(16), kerning: 1.0, color: UIColor.flatSkyBlueColor()), forState: .Normal)
seeMoreButton.backgroundColor = UIColor.clearColor()
specialView.addSubview(seeMoreButton)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment