Recently, I was busy working on a project for question library, all of which were multiple choice questions. I thought xcode had a radio button control, but I had to find it online. As a result, I found two demos on code4app and ran them in a single step. I learned how to make a rough process. Then simulate a radio button. I do not need to group, so I useCodeRemove all. You only need a global array. Each time you create an instance, the radio button is automatically added to the array.
Click to download
In addition, when the radio button is initialized, set the commonalities. During the call, you only need to pass the location and option text to the past.
After imitating someone else to make a radio button, I learned to use global variables and delegate. To better understand the meaning of delegate, the delegate statement is used to feedback the processed information.