一些有趣的iOS視圖控件集合:JMFunnyView

jopen 9年前發布 | 9K 次閱讀 iOS開發 移動開發 JMFunnyView

JMFunnyView

這是我做的一些有趣的iOS視圖控件集合

JMCircleView

一個可以可旋轉,區域點擊的圓盤視圖。

demo

How to use

//初始化需要分塊的顏色數組,有多少種代表分多少塊
NSArray *colorArray=[NSArray arrayWithObjects:
                                   [UIColor colorWithRed:214.0/255.0 green:19.0/255.0 blue:33.0/255.0 alpha:1],//read
                                    [UIColor colorWithRed:63.0/255.0 green:183.0/255.0 blue:55.0/255.0 alpha:1],//green
                                 [UIColor colorWithRed:51.0/255.0 green:111.0/255.0 blue:183.0/255.0 alpha:1],

                                 [UIColor colorWithRed:240.0/255.0 green:186.0/255.0 blue:20.0/255.0 alpha:1],nil
                                 ];
//初始化View                              
JMCircleView *circleView=[[JMCircleView alloc]initWithFrame:CGRectMake(0, 20, screenRect.size.width, screenRect.size.width)];  

//設置內部圓的半徑      
circleView.innerCircleRadius=screenRect.size.width/6;
//設置內部圓顏色的分塊
circleView.sectorColorArray=colorArray;
//代理委托方法,用于響應點擊色塊的事件:
//index:點擊色塊的序號
//didClickZoneIndex:(int)index
circleView.delegate=self;

項目主頁:http://www.baiduhome.net/lib/view/home/1442138140106

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!