Swift : align UILabel text in the top rather in the middle
问题 I want the UILabel to start from the top even if the text is short it seems that NSTextAlignment doesn't work cell.textContent.text = comments[indexPath.row] cell.textContent.textAlignment = func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { //post's section == 0 if indexPath.section == 0 { let cell = tableView.dequeueReusableCellWithIdentifier("postCID", forIndexPath: indexPath) as! postCell cell.usernameLabel.text = "Steve Paul Jobs"