Writing better code is what makes great developers, a great codebase, and great products. So how can you use Swift's power to make your life easier and your code even better?
world! Wie geht's?" let attributedString = NSMutableAttributedString(string: string) let range = (attributedString.string as NSString).range(of: "Hello") attributedString.addAttributes([NSForegroundColorAttributeName: UIColor.red], range: range) attributedString.setForegroundColor(.red, for: "Hello")
world! Wie geht's?" let attributedString = NSMutableAttributedString(string: string) let range = (attributedString.string as NSString).range(of: "Hello") attributedString.addAttributes([NSForegroundColorAttributeName: UIColor.red], range: range) attributedString.setForegroundColor(.red, forText: "Hello")
of the view controller } extension ViewController: UITableViewDataSource { // implementation of data source } extension ViewController: UITableViewDelegate { // implementation of delegate }