SDEASYCAM 手机APP软件 前30页代码.docx

上传人:王** 文档编号:198564 上传时间:2023-04-14 格式:DOCX 页数:29 大小:74.96KB
下载 相关 举报
SDEASYCAM 手机APP软件 前30页代码.docx_第1页
第1页 / 共29页
SDEASYCAM 手机APP软件 前30页代码.docx_第2页
第2页 / 共29页
SDEASYCAM 手机APP软件 前30页代码.docx_第3页
第3页 / 共29页
SDEASYCAM 手机APP软件 前30页代码.docx_第4页
第4页 / 共29页
SDEASYCAM 手机APP软件 前30页代码.docx_第5页
第5页 / 共29页
SDEASYCAM 手机APP软件 前30页代码.docx_第6页
第6页 / 共29页
SDEASYCAM 手机APP软件 前30页代码.docx_第7页
第7页 / 共29页
SDEASYCAM 手机APP软件 前30页代码.docx_第8页
第8页 / 共29页
SDEASYCAM 手机APP软件 前30页代码.docx_第9页
第9页 / 共29页
SDEASYCAM 手机APP软件 前30页代码.docx_第10页
第10页 / 共29页
亲,该文档总共29页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《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

8、h;if(i1self.itemCount)xPos+=buttonPadding;sefaddSubviewxustomButto;xPos+=IeftX:if(xPosself.frame.size.width)xPos-self.frame.size.width;self.cotentSize=CGSizeMake(Pos,self.frame.size.height);(SelflayoutSubviews;)#import#import#importCameraMultiLiveViewController.h#import#importVloTCamera/ImageBufflnf

9、o.h#import#import#importAppDelegate.h#import*MyNavViewController.himport-UIDevice+Device,h#defineDEF_WAIT4ST0PSH0W_TIME250#CIefineDEF-SplitViewNm4#defineDEFReTryConnectlnterval25*1000#defineDEF_ReTryTimes10interfaceCameraMultiLiveViewController()MyCamera*mDummyCam:NSMutabIeArray,marlmg-Vdo:intmReTry

10、TimesArrayDEFSpIitViewNum;UnsignedintmnLastReTryTickArray(DEF-SplitViewNum;)end(implementationCameraMultiLiveviewControIIerSynmeSiZebStopShowCompletedLock;synthesizeSelectedAudioMode;SyntheSiZecamNeedReconnect;synthesizeSeIectCameraArray;synthesizeCameraArray;SyntheSiZeChanneIArray;#PragmamarkMethod

11、s-(Ullnterfaceorientation)PreferredlnterfaceorienlationForPresentation(returnUllntertaceOrientationLandscapeLeft;)(CGRect)ZoomRectForscroliviewxuiscroIIView*)_scrollViewwithScale:(CGFIoat)scaleWithCenter:(CGPoint)CenterCGReclzoomRect:HThezoomrectisinthententviewsordinates.HAtazoomscaleof1.0.itwouldb

12、ethesizeofIhe/imageScrollView,sbounds.HAsthezoomscaledecreases,somorententisvisible,hesizeoftherectgrows.ZoomReCISiZe.height=_scrollView.frame.size.height/scale;zoomRect.size.width=scrollView.frame.size.width/scale;Uchooseanoriginsoastogettherightcenter.zoomRct.origin.x=center.x-(zoomRect.size.width

13、/2.0);zmRect.origin.y=center.y-(zoomRect.size.height/2.0);returnzoomRect;)-(Ullmage*)getUllmage:(char*)buffWidth:(NSInteger)WidthHeight:(NSInteger)heightCGDataProviderRefprovider=CGDataPrOViderereateWithData(NULL,buff,width*height*3tNULL);CGcoIorSpaceRefcolorspace=CGColorSpaceCreatDeviceRGB():CGlmag

14、eRefimgRef=CGlmageCreat(width,height,8l24,width*3,colorSpace1kCGBitmapByteOrderDefaut,provider,NULL,true,kCGRenderingIntentDefauIt);Ullmage*img=UIImageimageWithCGImagejmgRef;f(imgRef!=nil)(CGImageRelease(imgRef);imgRef=nil;if(colorSpace!=nil)CGcolorspaceRelease(CoIorSpace);lorSpace=nil;f(providerlnil)CGDataPrOViderReleaSe(ProVider);provider-nil;returnimgcopyautorelease;)-(void)camStopShowr(int)algnoreldxisCamStopShow=YES:for(inti-O;iDEF_SplitViewNum;i+)if(i=algnored)continue;MyCamera*testCamera=(CameraArrayobjectAtIndexzi;if(testCamera.id!=nil

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > IT计算机 > 手机开发

copyright@ 2008-2023 yzwku网站版权所有

经营许可证编号:宁ICP备2022001189号-2

本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!