A simple demo code for Swift delegate