Examples of delegation using Swift