iphone 使用按钮实现单选框
//画图 -( void )addSecondZone:( UIView *)contentView // 按钮图片 UIImage *selecticonNo =[ UIImage imageNamed : SelecticonNo ]; UIImage *selecticon =[ UIImage imageNamed : Selecticon ]; UIView * childSecondView ; childSecondView = [[ UIView alloc ] initWithFrame : CGRectMake ( 0 , 155 , 320 , 500 )]; int pointY =0; for ( int i= 0 ;i< 4 ;i++) { [ childSecondView addSubImageView :contentbar Rect : CGRectMake ( 0 , pointY , 320 ,contentbar. size . height / 2 )]; UIButton * button = [ UIButton buttonWithType : UIButtonTypeCustom ]; [ button setBackgroundImage :selecticonNo forState : UIControlStateNormal