SDEASYCAM 手机APP软件 前30页代码.docx
《SDEASYCAM 手机APP软件 前30页代码.docx》由会员分享,可在线阅读,更多相关《SDEASYCAM 手机APP软件 前30页代码.docx(29页珍藏版)》请在第壹文秘上搜索。
1、#importMKHorizMenu.h#defineKButtonBaseTag10000#defineKLeftOffset5implemeniationMKHorizMenuSyntheSiZetitles=Jitles;synthesizeSelectedlmage-_selectedlmage;synthesizeitemSelectedDelegate;SyZheSiZedataSource:SynmeSiZeitemCount=JtemCount;-(void)awakeFromNib(self.bonces=YES;self.scrollEnabled=YES;self.alw
2、aysBounceHorizontalYES;self.alwaysBounceVertical=NO;Self.ShowsHorizontaiscroIIIndicator=NO;Self-ShowsverticaiscrolllndicatorNO;SeIfreloadData;-(void)TeIoadSoundBtn()-(void)reloadData(NSArray*viewsToRemove-selfsubviews;for(UIView*vinViewsToRemove)vremoveFromSperview);)SeIfJtemCount=dataSourcenumberOf
3、ltemsForMenu:self;self.backgroundColor=dataSourcebackgroundColorForMenuzself;/Self.Selectedlmage=dataSourceSelecteclltemImageForMenuiseIf;UIFont*buttonFont=(UIFontboldSystemFonlOfSizer15;intbultoPadding-5;inttag=KButtonBaseTag;intxPosRLeftOffset;CGFIoatbtnTotalWidth=O.Of;for(inti=O;iself.itemCount;i
4、+)Ullmage*bglmg=UllmageimageNamed:dataSourcehorizMenu:selftitleForltemAtlndex:i;btnTotalWidth+=bgImg.size.width;if(i3)NSLog(OK);)计算左右变距CGFIoattotalLen=(self.itemCount-1)*buttonPadding+btnTotalWidth;CGFIoatleft-(self.superview.frame.size.width-totalLe)2;f(leftXO)IeftX=XPos;XPos=IeftX;for(intiO;iself.
5、itemCount;i+)(NSString,title=UIButton*customButtonUIButtonbuttonWithTypeUIBultonTypeCuslom;CustomButtonsetTitle:titleforState:UIControlStateNormal;CustomButtonJitleLabeLfont=buttonFont;Ullmage*bglmg=UllmageimageNamed:dataSourcehorizMenu:selftitleForltemAtlndex:i:(CustomButtonSetBackgroundImagerbgImg
6、forState:UIcontroIStateNormaI;CustomButtonsetBackgroundlmage:UllmageimageNamedJdatasourceselectedltemlmageForMenuiseIfitemAtIndexiiforState:UIcontroIStateSeIected;(CustomButtonsetBackgroundlmage:UllmageimageNamed:dataSourceselectedltemlmageForMenu:selfitemAtlndex:iforState:IJlContrOIStaIeHighlighted
7、;CustomButtonJag=tag+;CustomButtonaddTarget:selfaction:selector(buttonTapped:)forControlEvents:UIControlEventTouchUplnside;CustomButtonaddTarget:selfaction:selector(buttonTouchDown:)forControlEvents:UIControlEventTouchDown:CustomButtonJrame-CGRectMake(xPos,3,bglmg.size.width,38):Pos+=bglmg.size.widt
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- SDEASYCAM 手机APP软件 前30页代码 手机 APP 软件 30 代码