Become a member
Sign in
r
r

r

2 Following
1 Followers
  • Profile

  • Claps

  • Highlights

  • Responses

Highlighted by r

See more

From Using the factory pattern to avoid shared state in Swift by John Sundell

With the above setup, we can easily end up in undefined situations when loadItems is called multiple times before a pending request has been completed (we might include a search control, or a pull-to-refresh mechanism, for example, which can result in many requests).

From Dealing with Complex Table Views in iOS and Keeping Your Sanity by Marin Benčević

let cellModel = cells[indexPath.row]

switch cellModel {
case .status(let status):
let cell = ...
return cell
case .photo(let photo):
let cell = ...
return cell
}
}

From Dealing with Complex Table Views in iOS and Keeping Your Sanity by Marin Benčević

var model: StatusCellModel! {
didSet {
statusLabel.text = model.statusText
usernameLabel.text = model.usernameText
commentIconImageView.image = model.commentIcon
favoriteButton.setTitle(model.favoriteButtonTitle, for: .normal)
}
}

Claps from r

See more

@autoreleasepool uses in 2019 Swift

Bruno Rocha

Reusing code with Swift frameworks

Anurag Ajwani

WWDC18: Modern Tips for Optimising Swift Build Time in Xcode 10

Shashikant Jagtap