今天介紹一下如何在IOS實作Android的RadioButton
首先先建立RadioButton.swift、RadioButtonController.swift兩個檔案



將button的class改為RadioButton後即可自訂外框顏色等外觀內容設定
在viewdidload()中初始化一個RadioButtonController
let radioButtonController = RadioButtonController.init(buttons: [button1,button2,button3])
    radioButtonController.delegate = self