Replace Objective-C with Swift code.