How to copy text with iOS

Swift 3 and latest

UIPasteboard.general.string = "Hello world"

 

Objective C

UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];

pasteboard.string = @"Hello world";