Skip to content

Commit

Permalink
filter whitespace/newlines from lot name
Browse files Browse the repository at this point in the history
closes #103 (for now)
  • Loading branch information
kiliankoe committed Oct 23, 2015
1 parent 0f83924 commit 8ae97f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ParkenDD/LotlistView/ParkinglotTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ class ParkinglotTableViewCell: UITableViewCell {
func setParkinglot(lot: Parkinglot) {
parkinglot = lot

// Quickfix for issue #103
let sanitizedLotName = lot.name.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet())

if let lotType = lot.lotType {
parkinglotNameLabel?.text = "\(lotType) \(lot.name)"
parkinglotNameLabel?.text = "\(lotType) \(sanitizedLotName)"
} else {
parkinglotNameLabel?.text = lot.name
parkinglotNameLabel?.text = sanitizedLotName
}

parkinglotLoadLabel?.text = "\(lot.free)"
Expand Down

0 comments on commit 8ae97f1

Please sign in to comment.