Radio button in iPhone app

后端 未结 11 1743
臣服心动
臣服心动 2020-12-06 06:11

I have to add radio buttons in my iPhone application. For that I have got radio button image which is of round in shape. Can I add that image as a subview? and Can I add tou

11条回答
  •  隐瞒了意图╮
    2020-12-06 06:31

    You can try using the UIImageView class which just wraps a UIImage inside a UIView container. It supports the touchesBegan/Cancelled events which would be suitable I think.

    You might also consider not using with a true radio button setup as you've described and instead going with a more iPhone-like approach--for instance, using a UITableView with cells corresponding to your radio selections and that toggle checked/unchecked on a touch. See the TouchCells example at the Apple iPhone dev site for an example.

提交回复
热议问题