├── .gitignore ├── .gitmodules ├── README.md ├── v2 ├── doc │ ├── doc │ │ └── docset-installed.txt │ └── docset-installed.txt ├── vApp │ ├── vApp.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── vApp.xccheckout │ └── vApp │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── vApp-Info.plist │ │ └── vApp-Prefix.pch ├── vDB │ ├── vDB.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── vDB.xccheckout │ └── vDB │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── vDB-Info.plist │ │ └── vDB-Prefix.pch ├── vDataOutlet │ ├── vDataOutlet.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── vDataOutlet.xccheckout │ └── vDataOutlet │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── vDataOutlet-Info.plist │ │ └── vDataOutlet-Prefix.pch ├── vDocument │ ├── vDocument.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── vDocument.xccheckout │ └── vDocument │ │ ├── IVTCanvasElement.h │ │ ├── IVTLayoutElement.h │ │ ├── IVTViewEntity.h │ │ ├── VTBRElement.h │ │ ├── VTBRElement.m │ │ ├── VTCanvasElement.h │ │ ├── VTCanvasElement.m │ │ ├── VTDocument.h │ │ ├── VTDocument.m │ │ ├── VTDocumentView.h │ │ ├── VTDocumentView.m │ │ ├── VTElement+Value.h │ │ ├── VTElement+Value.m │ │ ├── VTElement.h │ │ ├── VTElement.m │ │ ├── VTElementStyle.h │ │ ├── VTElementStyle.m │ │ ├── VTElementXMLParser.h │ │ ├── VTElementXMLParser.m │ │ ├── VTLayoutElement.h │ │ ├── VTLayoutElement.m │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── vDocument-Info.plist │ │ ├── vDocument-Prefix.pch │ │ ├── vDocument.h │ │ └── vDocument.m ├── vElement │ ├── doc │ │ └── docset-installed.txt │ ├── vElement.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── vElement.xccheckout │ └── vElement │ │ ├── VTElement.h │ │ ├── VTElement.m │ │ ├── VTElementParser.h │ │ ├── VTElementParser.m │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── vElement-Info.plist │ │ └── vElement-Prefix.pch ├── vService │ ├── vService.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── vService.xccheckout │ └── vService │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── vService-Info.plist │ │ └── vService-Prefix.pch ├── vStyleSheet │ ├── vStyleSheet.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── vStyleSheet.xccheckout │ └── vStyleSheet │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── vStyleSheet-Info.plist │ │ └── vStyleSheet-Prefix.pch ├── vTeam 2.0.mmap ├── vTool │ ├── vTool.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── vTool.xccheckout │ └── vTool │ │ ├── en.lproj │ │ └── InfoPlist.strings │ │ ├── vTool-Info.plist │ │ ├── vTool-Prefix.pch │ │ ├── vTool.h │ │ └── vTool.m └── vUI │ ├── vUI.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── vUI.xccheckout │ └── vUI │ ├── en.lproj │ └── InfoPlist.strings │ ├── vUI-Info.plist │ └── vUI-Prefix.pch ├── vTeam.dmg └── vTeam ├── Framework.sh ├── doc └── docset-installed.txt ├── vTeam.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── vTeam.xccheckout └── vTeam ├── Chart ├── IVTChart.h ├── IVTChartAnimation.h ├── IVTChartComponent.h ├── IVTChartContainer.h ├── IVTChartDraw.h ├── IVTChartView.h ├── VTChart.h ├── VTChart.m ├── VTChartArc.h ├── VTChartArc.m ├── VTChartComponent.h ├── VTChartComponent.m ├── VTChartContainer.h ├── VTChartContainer.m ├── VTChartDataReader.h ├── VTChartDataReader.m ├── VTChartLabel.h ├── VTChartLabel.m ├── VTChartRectangle.h ├── VTChartRectangle.m ├── VTChartTipLabel.h ├── VTChartTipLabel.m ├── VTChartView.h ├── VTChartView.m ├── VTPieChart.h ├── VTPieChart.m ├── VTPillarChart.h └── VTPillarChart.m ├── DOM ├── NSString+VTDOMSource.h ├── NSString+VTDOMSource.m ├── UIActivityIndicatorView+VTDOMElement.h ├── UIActivityIndicatorView+VTDOMElement.m ├── UIButton+VTDOMElement.h ├── UIButton+VTDOMElement.m ├── UIControl+VTDOMElement.h ├── UIControl+VTDOMElement.m ├── UILabel+VTDOMElement.h ├── UILabel+VTDOMElement.m ├── UIView+VTDOMElement.h ├── UIView+VTDOMElement.m ├── VTDOM.h ├── VTDOM.m ├── VTDOMActionElement.h ├── VTDOMActionElement.m ├── VTDOMActionViewElement.h ├── VTDOMActionViewElement.m ├── VTDOMBRElement.h ├── VTDOMBRElement.m ├── VTDOMContainerElement.h ├── VTDOMContainerElement.m ├── VTDOMDocument.h ├── VTDOMDocument.m ├── VTDOMElement+Control.h ├── VTDOMElement+Control.m ├── VTDOMElement+Frame.h ├── VTDOMElement+Frame.m ├── VTDOMElement+Layout.h ├── VTDOMElement+Layout.m ├── VTDOMElement+Render.h ├── VTDOMElement+Render.m ├── VTDOMElement+Style.h ├── VTDOMElement+Style.m ├── VTDOMElement.h ├── VTDOMElement.m ├── VTDOMHScrollElement.h ├── VTDOMHScrollElement.m ├── VTDOMImageElement.h ├── VTDOMImageElement.m ├── VTDOMLabel.h ├── VTDOMLabel.m ├── VTDOMLabelElement.h ├── VTDOMLabelElement.m ├── VTDOMLinkElement.h ├── VTDOMLinkElement.m ├── VTDOMPageScrollElement.h ├── VTDOMPageScrollElement.m ├── VTDOMParse.h ├── VTDOMParse.m ├── VTDOMRichElement.h ├── VTDOMRichElement.m ├── VTDOMScrollView.h ├── VTDOMScrollView.m ├── VTDOMStatusElement.h ├── VTDOMStatusElement.m ├── VTDOMStyle.h ├── VTDOMStyle.m ├── VTDOMStyleSheet.h ├── VTDOMStyleSheet.m ├── VTDOMTableElement.h ├── VTDOMTableElement.m ├── VTDOMTipElement.h ├── VTDOMTipElement.m ├── VTDOMVScrollElement.h ├── VTDOMVScrollElement.m ├── VTDOMView.h ├── VTDOMView.m ├── VTDOMViewElement.h ├── VTDOMViewElement.m ├── VTDOMWebContainerElement.h ├── VTDOMWebContainerElement.m ├── VTDOMWebViewElement.h └── VTDOMWebViewElement.m ├── FDB ├── VTFDB.h ├── VTFDB.m ├── VTFDBIndex.h └── VTFDBIndex.m ├── GIFView.h ├── GIFView.m ├── Grid ├── Grid.h ├── Grid.m ├── GridApposeDataView.h ├── GridApposeDataView.m ├── GridApposeHeadView.h ├── GridApposeHeadView.m ├── GridDataView.h ├── GridDataView.m ├── GridHeadView.h ├── GridHeadView.m ├── GridScrollView.h ├── GridScrollView.m ├── IGrid.h ├── IGridCell.h ├── IGridColumn.h ├── IGridDraw.h ├── IGridRow.h ├── IGridValue.h ├── IGridView.h ├── NSString+Grid.h └── NSString+Grid.m ├── IVTAPICancelTask.h ├── IVTAPITask.h ├── IVTAction.h ├── IVTAuthContext.h ├── IVTContext.h ├── IVTController.h ├── IVTDownlinkPageTask.h ├── IVTDownlinkTask.h ├── IVTFormEditor.h ├── IVTFormItemView.h ├── IVTImageTask.h ├── IVTService.h ├── IVTServiceContainer.h ├── IVTServiceContext.h ├── IVTTask.h ├── IVTUIContext.h ├── IVTUIViewController.h ├── IVTURLDownlinkTask.h ├── IVTUplinkTask.h ├── Montage ├── VTMontage.h ├── VTMontage.m ├── VTMontageElement.h ├── VTMontageElement.m ├── VTMontageGroupElement.h ├── VTMontageGroupElement.m ├── VTMontageLocus.h ├── VTMontageLocus.m ├── VTMontagePlayer.h ├── VTMontagePlayer.m ├── VTMontageScenes.h ├── VTMontageScenes.m ├── VTMontageViewElement.h └── VTMontageViewElement.m ├── NSData+CCCryptor.h ├── NSData+CCCryptor.m ├── NSData+GZIP.h ├── NSData+GZIP.m ├── NSData+VTBASE64String.h ├── NSData+VTBASE64String.m ├── NSData+VTMD5String.h ├── NSData+VTMD5String.m ├── NSFileManager+VTMD5String.h ├── NSFileManager+VTMD5String.m ├── NSObject+VTValue.h ├── NSObject+VTValue.m ├── NSString+Pinyin.h ├── NSString+Pinyin.m ├── NSString+TextLength.h ├── NSString+TextLength.m ├── NSString+VTBASE64Decode.h ├── NSString+VTBASE64Decode.m ├── NSString+VTBASE64String.h ├── NSString+VTBASE64String.m ├── NSString+VTMD5String.h ├── NSString+VTMD5String.m ├── NSURL+QueryValue.h ├── NSURL+QueryValue.m ├── Rich ├── VTRich.h ├── VTRich.m ├── VTRichImageElement.h ├── VTRichImageElement.m ├── VTRichLinkElement.h ├── VTRichLinkElement.m ├── VTRichView.h ├── VTRichView.m ├── VTRichViewElement.h └── VTRichViewElement.m ├── UIButton+VTStyle.h ├── UIButton+VTStyle.m ├── UIColor+UIImage.h ├── UIColor+UIImage.m ├── UIControl+VTDataOutlet.h ├── UIControl+VTDataOutlet.m ├── UIDevice+VTUUID.h ├── UIDevice+VTUUID.m ├── UIImage+GaussianBlur.h ├── UIImage+GaussianBlur.m ├── UIView+Hidden.h ├── UIView+Hidden.m ├── UIView+Image.h ├── UIView+Image.m ├── UIView+Search.h ├── UIView+Search.m ├── UIView+VTDataOutlet.h ├── UIView+VTDataOutlet.m ├── UIView+VTStyle.h ├── UIView+VTStyle.m ├── VTAPIRequestTask.h ├── VTAPIRequestTask.m ├── VTAPIResponseTask.h ├── VTAPIResponseTask.m ├── VTAPIService.h ├── VTAPIService.m ├── VTAPITask.h ├── VTAPITask.m ├── VTAction.h ├── VTAction.m ├── VTActionView.h ├── VTActionView.m ├── VTAlertView.h ├── VTAlertView.m ├── VTAnimationView.h ├── VTAnimationView.m ├── VTAppService.h ├── VTAppService.m ├── VTAppStatusView.h ├── VTAppStatusView.m ├── VTAppVersionTask.h ├── VTAppVersionTask.m ├── VTAudioService.h ├── VTAudioService.m ├── VTAudioTask.h ├── VTAudioTask.m ├── VTBEEventObject.h ├── VTBEEventObject.m ├── VTBESessionObject.h ├── VTBESessionObject.m ├── VTBarButtonItem.h ├── VTBarButtonItem.m ├── VTBehaviorObject.h ├── VTBehaviorObject.m ├── VTBehaviorService.h ├── VTBehaviorService.m ├── VTBehaviorTask.h ├── VTBehaviorTask.m ├── VTBehaviorTransactionTask.h ├── VTBehaviorTransactionTask.m ├── VTButton.h ├── VTButton.m ├── VTCleanupTask.h ├── VTCleanupTask.m ├── VTContainerDataController.h ├── VTContainerDataController.m ├── VTContainerLayout.h ├── VTContainerLayout.m ├── VTContainerView.h ├── VTContainerView.m ├── VTContentViewController.h ├── VTContentViewController.m ├── VTController.h ├── VTController.m ├── VTCrashService.h ├── VTCrashService.m ├── VTCrashTask.h ├── VTCrashTask.m ├── VTCreatorViewController.h ├── VTCreatorViewController.m ├── VTDBContext.h ├── VTDBContext.m ├── VTDBDataContext.h ├── VTDBDataContext.m ├── VTDBDataObject.h ├── VTDBDataObject.m ├── VTDBObject.h ├── VTDBObject.m ├── VTDataController.h ├── VTDataController.m ├── VTDataOutlet.h ├── VTDataOutlet.m ├── VTDataOutletContainer.h ├── VTDataOutletContainer.m ├── VTDataSource.h ├── VTDataSource.m ├── VTDocumentController.h ├── VTDocumentController.m ├── VTDocumentDataController.h ├── VTDocumentDataController.m ├── VTDocumentViewController.h ├── VTDocumentViewController.m ├── VTDownlinkService.h ├── VTDownlinkService.m ├── VTDragLoadingView.h ├── VTDragLoadingView.m ├── VTFallsContainerLayout.h ├── VTFallsContainerLayout.m ├── VTFeedbackService.h ├── VTFeedbackService.m ├── VTFeedbackTask.h ├── VTFeedbackTask.m ├── VTFlowContainerLayout.h ├── VTFlowContainerLayout.m ├── VTFlowViewLayout.h ├── VTFlowViewLayout.m ├── VTFoldViewController.h ├── VTFoldViewController.m ├── VTFormButton.h ├── VTFormButton.m ├── VTFormController.h ├── VTFormController.m ├── VTFormDateEditor.h ├── VTFormDateEditor.m ├── VTFormItem.h ├── VTFormItem.m ├── VTFormKeyboardEditor.h ├── VTFormKeyboardEditor.m ├── VTFormPickerEditor.h ├── VTFormPickerEditor.m ├── VTFormPickerEditorItem.h ├── VTFormPickerEditorItem.m ├── VTGatherService.h ├── VTGatherService.m ├── VTGatherTask.h ├── VTGatherTask.m ├── VTHeapViewController.h ├── VTHeapViewController.m ├── VTHtmlDataController.h ├── VTHtmlDataController.m ├── VTHttpFormBody.h ├── VTHttpFormBody.m ├── VTHttpService.h ├── VTHttpService.m ├── VTHttpTask.h ├── VTHttpTask.m ├── VTImageService.h ├── VTImageService.m ├── VTImageView.h ├── VTImageView.m ├── VTItemViewController.h ├── VTItemViewController.m ├── VTJSON.h ├── VTJSON.m ├── VTKeyboardController.h ├── VTKeyboardController.m ├── VTLayout.h ├── VTLayout.m ├── VTLayoutContainer.h ├── VTLayoutContainer.m ├── VTLayoutData.h ├── VTLayoutData.m ├── VTMonitorService.h ├── VTMonitorService.m ├── VTNavigationBar.h ├── VTNavigationBar.m ├── VTNavigationController.h ├── VTNavigationController.m ├── VTPageContainerLayout.h ├── VTPageContainerLayout.m ├── VTPageDataController.h ├── VTPageDataController.m ├── VTPageDataSource.h ├── VTPageDataSource.m ├── VTPopWindow.h ├── VTPopWindow.m ├── VTReportDocument.h ├── VTReportDocument.m ├── VTScrollView.h ├── VTScrollView.m ├── VTService.h ├── VTService.m ├── VTShell.h ├── VTShell.m ├── VTSqlite.h ├── VTSqlite.m ├── VTStatusDataSource.h ├── VTStatusDataSource.m ├── VTStatusGatherDataSource.h ├── VTStatusGatherDataSource.m ├── VTStatusView.h ├── VTStatusView.m ├── VTStyle.h ├── VTStyle.m ├── VTStyleController.h ├── VTStyleController.m ├── VTStyleOutlet.h ├── VTStyleOutlet.m ├── VTStyleOutletContainer.h ├── VTStyleOutletContainer.m ├── VTStyleSheet.h ├── VTStyleSheet.m ├── VTTabBar.h ├── VTTabBar.m ├── VTTabBarController.h ├── VTTabBarController.m ├── VTTabBarItem.h ├── VTTabBarItem.m ├── VTTabDataController.h ├── VTTabDataController.m ├── VTTabPageDataController.h ├── VTTabPageDataController.m ├── VTTabViewController.h ├── VTTabViewController.m ├── VTTableDataController.h ├── VTTableDataController.m ├── VTTableSection.h ├── VTTableSection.m ├── VTTableSource.h ├── VTTableSource.m ├── VTTableView.h ├── VTTableView.m ├── VTTableViewCell.h ├── VTTableViewCell.m ├── VTTask.h ├── VTTask.m ├── VTToolbar.h ├── VTToolbar.m ├── VTURLDataSource.h ├── VTURLDataSource.m ├── VTURLDocumentController.h ├── VTURLDocumentController.m ├── VTURLService.h ├── VTURLService.m ├── VTUnZip.h ├── VTUnZip.m ├── VTUplinkService.h ├── VTUplinkService.m ├── VTUplinkTask.h ├── VTUplinkTask.m ├── VTViewController.h ├── VTViewController.m ├── VTViewLayout.h ├── VTViewLayout.m ├── VTWebView.h ├── VTWebView.m ├── VTZoomView.h ├── VTZoomView.m ├── Vermin ├── vmDOMDocument.h ├── vmDOMDocument.m ├── vmDOMElement.h ├── vmDOMElement.m ├── vmVariant.h └── vmVariant.m ├── en.lproj └── InfoPlist.strings ├── pinyin ├── hpinyin.c └── hpinyin.h ├── vTeam-Info.plist ├── vTeam-Prefix.pch ├── vTeam.h ├── vTeam.m └── zh-Hans.lproj └── InfoPlist.strings /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "c"] 2 | path = c 3 | url = https://github.com/hailongz/c.git 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #vTeam.framework 2 | Checkout
3 | git clone https://github.com/hailongz/vTeam.git
4 | cd vTeam
5 | git submodule init
6 | git submodule update
7 | 8 | #Installing xcode project templates 9 | open vTeam.dmg
10 | copy vTeam to Templetes
11 | 12 | #初级使用入门 13 | http://v.youku.com/v_show/id_XNjkwMzE3MDQw.html
14 | 15 | #中级使用入门 16 | http://v.youku.com/v_show/id_XNjkwMzIwMTIw.html
17 | 18 | #高级使用入门 19 | http://v.youku.com/v_show/id_XNjkwMzIyODA0.html
20 | -------------------------------------------------------------------------------- /v2/doc/doc/docset-installed.txt: -------------------------------------------------------------------------------- 1 | Documentation set was installed to Xcode! 2 | 3 | Path: /Users/hailongz/Library/Developer/Shared/Documentation/DocSets/org.hailong.vElement.docset 4 | Time: 2014-07-01 03:38:48 +0000 -------------------------------------------------------------------------------- /v2/doc/docset-installed.txt: -------------------------------------------------------------------------------- 1 | Documentation set was installed to Xcode! 2 | 3 | Path: /Users/hailongz/Library/Developer/Shared/Documentation/DocSets/org.hailong.vElement.docset 4 | Time: 2014-07-01 03:38:58 +0000 -------------------------------------------------------------------------------- /v2/vApp/vApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v2/vApp/vApp/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /v2/vApp/vApp/vApp-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #import 10 | 11 | #ifndef DEBUG 12 | 13 | #define NSLog(...) {} 14 | 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /v2/vDB/vDB.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v2/vDB/vDB/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /v2/vDB/vDB/vDB-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #import 10 | 11 | #ifndef DEBUG 12 | 13 | #define NSLog(...) {} 14 | 15 | #endif 16 | 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /v2/vDataOutlet/vDataOutlet.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v2/vDataOutlet/vDataOutlet/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /v2/vDataOutlet/vDataOutlet/vDataOutlet-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #import 10 | 11 | #ifndef DEBUG 12 | 13 | #define NSLog(...) {} 14 | 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/IVTCanvasElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTCanvasElement.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-2. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTCanvasElement 14 | 15 | @property(nonatomic,readonly,getter=isHidden) BOOL hidden; 16 | @property(nonatomic,readonly) CGFloat cornerRadius; 17 | 18 | -(void) drawInContext:(CGContextRef) context; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/IVTLayoutElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTLayoutElement.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-2. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTLayoutElement 12 | 13 | @property(nonatomic,assign) CGRect frame; 14 | @property(nonatomic,assign) CGSize contentSize; 15 | @property(nonatomic,readonly) UIEdgeInsets padding; 16 | @property(nonatomic,readonly) UIEdgeInsets margin; 17 | @property(nonatomic,readonly,getter=isLayouted) BOOL layouted; 18 | 19 | -(CGSize) layoutChildren:(UIEdgeInsets) padding; 20 | 21 | -(CGSize) layout:(CGSize) size; 22 | 23 | -(CGSize) layout; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/IVTViewEntity.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTViewEntity.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class VTElement; 12 | 13 | @protocol IVTViewEntity 14 | 15 | -(void) elementDoAction:(id) viewEntity element:(VTElement *) element; 16 | 17 | -(void) elementDoNeedsDisplay:(VTElement *) element; 18 | 19 | -(UIView *) elementViewOf:(VTElement *) element viewClass:(Class) viewClass; 20 | 21 | -(void) elementLayoutView:(VTElement *) element view:(UIView *) view; 22 | 23 | -(void) elementVisable:(id) viewEntity element:(VTElement *) element; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTBRElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTBRElement.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-2. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTBRElement : VTElement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTBRElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTBRElement.m 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-2. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTBRElement.h" 10 | 11 | @implementation VTBRElement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTCanvasElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTCanvasElement.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-2. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface VTCanvasElement : VTLayoutElement 13 | 14 | @property(nonatomic,readonly) UIColor * backgroundColor; 15 | @property(nonatomic,readonly) UIColor * borderColor; 16 | @property(nonatomic,readonly) CGFloat borderWidth; 17 | 18 | -(void) onDrawBackgroundInContext:(CGContextRef) context; 19 | 20 | -(void) onDrawInContext:(CGContextRef) context; 21 | 22 | -(void) onDrawBorderInContext:(CGContextRef) context; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDocument.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDocument : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTDocument.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDocument.m 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTDocument.h" 10 | 11 | @implementation VTDocument 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTDocumentView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDocumentView.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTDocumentView : UIView 15 | 16 | @property(nonatomic,weak) id delegate; 17 | @property(nonatomic,retain) VTElement * element; 18 | @property(nonatomic,assign,getter = isAllowAutoLayout) BOOL allowAutoLayout; 19 | 20 | @end 21 | 22 | @protocol VTDocumentViewDelegate 23 | 24 | @optional 25 | 26 | -(void) documentView:(VTDocumentView *) documentView onActionViewEntity:(id) viewEntity element:(VTElement *) element; 27 | 28 | -(void) documentView:(VTDocumentView *) documentView onVisableViewEntity:(id) viewEntity element:(VTElement *) element; 29 | 30 | @end 31 | 32 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTElement+Value.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTElement+Value.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-2. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTElement (Value) 12 | 13 | -(NSString *) stringValueForKey:(NSString *) key defaultValue:(NSString *) defaultValue; 14 | 15 | -(NSString *) stringValueForKey:(NSString *) key; 16 | 17 | -(CGFloat) floatValueForKey:(NSString *) key defaultValue:(CGFloat) defaultValue; 18 | 19 | -(CGFloat) floatValueForKey:(NSString *) key; 20 | 21 | -(CGFloat) floatValueForKey:(NSString *)key of:(CGFloat) of defaultValue:(CGFloat)defaultValue; 22 | 23 | -(CGFloat) floatValueForKey:(NSString *)key of:(CGFloat) of; 24 | 25 | -(BOOL) booleanValueForKey:(NSString *) key defaultValue:(BOOL) defaultValue; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTElementStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTElementStyle.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-2. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTElementStyle : NSObject 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTElementStyle.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTElementStyle.m 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-2. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTElementStyle.h" 10 | 11 | @implementation VTElementStyle 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTElementXMLParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTElementXMLParser.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTElementXMLParser : NSObject 14 | 15 | -(void) loadLibrarys; 16 | 17 | -(void) setElementClass:(Class) clazz forName:(NSString *) name; 18 | 19 | -(VTElement *) parse:(NSXMLParser *) parser; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/VTLayoutElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTLayoutElement.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-2. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | @interface VTLayoutElement : VTElement 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/vDocument-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #import 10 | 11 | #ifndef DEBUG 12 | 13 | #define NSLog(...) {} 14 | 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/vDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // vDocument.h 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | -------------------------------------------------------------------------------- /v2/vDocument/vDocument/vDocument.m: -------------------------------------------------------------------------------- 1 | // 2 | // vDocument.m 3 | // vDocument 4 | // 5 | // Created by zhang hailong on 14-7-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "vDocument.h" 10 | 11 | -------------------------------------------------------------------------------- /v2/vElement/doc/docset-installed.txt: -------------------------------------------------------------------------------- 1 | Documentation set was installed to Xcode! 2 | 3 | Path: /Users/hailongz/Library/Developer/Shared/Documentation/DocSets/org.hailong.vElement.docset 4 | Time: 2014-07-01 03:45:28 +0000 -------------------------------------------------------------------------------- /v2/vElement/vElement.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v2/vElement/vElement/VTElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTElement.h 3 | // vElement 4 | // 5 | // Created by zhang hailong on 14-6-30. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTElement : NSObject 12 | 13 | @property(nonatomic,retain) NSString * ns; 14 | @property(nonatomic,retain) NSString * name; 15 | @property(nonatomic,retain) NSString * text; 16 | @property(nonatomic,readonly) NSDictionary * attributes; 17 | @property(nonatomic,weak) VTElement * parentElement; 18 | @property(nonatomic,readonly) NSArray * childs; 19 | 20 | -(void) setAttributeValue:(NSString *) value forKey:(NSString *) key; 21 | 22 | -(void) removeAttributeForKey:(NSString *) key; 23 | 24 | -(void) removeAllAttributes; 25 | 26 | -(NSString *) attributeValueForKey:(NSString *) key; 27 | 28 | -(void) addElement:(VTElement *) element; 29 | 30 | -(void) insertElement:(VTElement *) element atIndex:(NSUInteger) index; 31 | 32 | -(void) removeFromParentElement; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /v2/vElement/vElement/VTElementParser.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTElementParser.h 3 | // vElement 4 | // 5 | // Created by zhang hailong on 14-6-30. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTElementParser : NSObject 14 | 15 | -(BOOL) parseXML:(NSString *) xmlContent url:(NSURL *) url toElement:(VTElement *) element atIndex:(NSUInteger) index; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /v2/vElement/vElement/VTElementParser.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTElementParser.m 3 | // vElement 4 | // 5 | // Created by zhang hailong on 14-6-30. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTElementParser.h" 10 | 11 | #include 12 | 13 | #include 14 | 15 | @implementation VTElementParser 16 | 17 | -(BOOL) parseXML:(NSString *) xmlContent url:(NSURL *) url toElement:(VTElement *) element atIndex:(NSUInteger) index{ 18 | 19 | 20 | NSXMLParser 21 | xmlDocPtr doc; 22 | 23 | doc = xmlReadDoc((const xmlChar *)[xmlContent UTF8String], [[url absoluteString] UTF8String] 24 | , "utf-8", XML_PARSE_RECOVER); 25 | 26 | if(doc == nil){ 27 | return NO; 28 | } 29 | 30 | 31 | return YES; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /v2/vElement/vElement/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /v2/vElement/vElement/vElement-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /v2/vService/vService.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v2/vService/vService/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /v2/vService/vService/vService-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #import 10 | 11 | #ifndef DEBUG 12 | 13 | #define NSLog(...) {} 14 | 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /v2/vStyleSheet/vStyleSheet.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v2/vStyleSheet/vStyleSheet/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /v2/vStyleSheet/vStyleSheet/vStyleSheet-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #import 10 | 11 | #ifndef DEBUG 12 | 13 | #define NSLog(...) {} 14 | 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /v2/vTeam 2.0.mmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theron-dev/vTeam/2883cece61e878c4299c7dc90ceca8a65853d0aa/v2/vTeam 2.0.mmap -------------------------------------------------------------------------------- /v2/vTool/vTool.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v2/vTool/vTool/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /v2/vTool/vTool/vTool-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #import 10 | 11 | #ifndef DEBUG 12 | 13 | #define NSLog(...) {} 14 | 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /v2/vTool/vTool/vTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // vTool.h 3 | // vTool 4 | // 5 | // Created by zhang hailong on 14-7-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | -------------------------------------------------------------------------------- /v2/vTool/vTool/vTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // vTool.m 3 | // vTool 4 | // 5 | // Created by zhang hailong on 14-7-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "vTool.h" 10 | -------------------------------------------------------------------------------- /v2/vUI/vUI.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /v2/vUI/vUI/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /v2/vUI/vUI/vUI-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | 9 | #import 10 | 11 | #ifndef DEBUG 12 | 13 | #define NSLog(...) {} 14 | 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /vTeam.dmg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theron-dev/vTeam/2883cece61e878c4299c7dc90ceca8a65853d0aa/vTeam.dmg -------------------------------------------------------------------------------- /vTeam/Framework.sh: -------------------------------------------------------------------------------- 1 | #/bin/sh 2 | 3 | rm -rf build 4 | 5 | 6 | if [ $1 ] 7 | then 8 | 9 | target=$1 10 | 11 | else 12 | 13 | target=Release 14 | 15 | fi 16 | 17 | 18 | xcodebuild -configuration $target 19 | xcodebuild -sdk iphonesimulator7.1 -configuration $target 20 | cp -a build/$target-iphoneos build/$target 21 | lipo -create build/$target-iphoneos/vTeam.framework/vTeam build/$target-iphonesimulator/vTeam.framework/vTeam -output build/$target/vTeam.framework/vTeam 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /vTeam/doc/docset-installed.txt: -------------------------------------------------------------------------------- 1 | Documentation set was installed to Xcode! 2 | 3 | Path: /Users/hailongz/Library/Developer/Shared/Documentation/DocSets/org.hailong.vTeam.docset 4 | Time: 2014-07-01 03:54:02 +0000 -------------------------------------------------------------------------------- /vTeam/vTeam.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/IVTChart.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTChart.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTChart 14 | 15 | @property(nonatomic,retain) IBOutlet id dataSource; 16 | 17 | -(id) initWithSize:(CGSize) size; 18 | 19 | -(void) reloadData; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/IVTChartAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTChartAnimation.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTChartAnimation 12 | 13 | @property(nonatomic,assign) double animationValue; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/IVTChartComponent.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTChartComponent.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @protocol IVTChartComponent 15 | 16 | @property(nonatomic,assign) CGPoint position; 17 | @property(nonatomic,assign) CGSize size; 18 | @property(nonatomic,assign) CGPoint anchor; 19 | 20 | -(CGRect) frameInRect:(CGRect) rect; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/IVTChartContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTChartContainer.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTChartContainer 14 | 15 | @property(nonatomic,readonly) NSArray * components; 16 | @property(nonatomic,assign,getter = isClips) BOOL clips; 17 | 18 | -(void) addComponent:(id) component; 19 | 20 | -(void) removeComponent:(id) component; 21 | 22 | -(void) removeAllComponents; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/IVTChartDraw.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTChartDraw.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTChartDraw 12 | 13 | -(void) drawToContext:(CGContextRef) ctx rect:(CGRect) rect; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/IVTChartView.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTChartView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTChartView 14 | 15 | @property(nonatomic,retain) id chart; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChart.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTChart.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTChart : VTChartContainer 15 | 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChart.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTChart.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTChart.h" 10 | 11 | #import 12 | 13 | 14 | @implementation VTChart 15 | 16 | @synthesize dataSource = _dataSource; 17 | 18 | -(void) dealloc{ 19 | [_dataSource release]; 20 | [super dealloc]; 21 | } 22 | 23 | -(void) reloadData{ 24 | 25 | } 26 | 27 | -(id) initWithSize:(CGSize) size{ 28 | if((self = [super init])){ 29 | self.anchor = CGPointZero; 30 | self.position = CGPointZero; 31 | self.size = size; 32 | } 33 | return self; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartArc.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartArc.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTChartArc : VTChartComponent 12 | 13 | @property(nonatomic,assign) CGFloat borderWidth; 14 | @property(nonatomic,retain) UIColor * borderColor; 15 | @property(nonatomic,retain) UIColor * backgroundColor; 16 | @property(nonatomic,assign) CGFloat radius; 17 | @property(nonatomic,assign) CGFloat startAngle; 18 | @property(nonatomic,assign) CGFloat endAngle; 19 | 20 | @property(nonatomic,readonly) CGPoint vertex; 21 | 22 | @property(nonatomic,readonly) CGFloat angle; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartComponent.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartComponent.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTChartComponent : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartComponent.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartComponent.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTChartComponent.h" 10 | 11 | @implementation VTChartComponent 12 | 13 | @synthesize position = _position; 14 | @synthesize size = _size; 15 | @synthesize anchor = _anchor; 16 | @synthesize animationValue = _animationValue; 17 | 18 | -(id) init{ 19 | if((self = [super init])){ 20 | _anchor = CGPointMake(0.5, 0.5); 21 | _animationValue = 1.0; 22 | } 23 | return self; 24 | } 25 | 26 | -(CGRect) frameInRect:(CGRect)rect{ 27 | return CGRectMake(_position.x - _size.width * _anchor.x, _position.y - _size.height * _anchor.y 28 | , _size.width, _size.height); 29 | } 30 | 31 | 32 | -(void) drawToContext:(CGContextRef) ctx rect:(CGRect) rect{ 33 | 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartContainer.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTChartContainer : VTChartComponent 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartDataReader.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartDataReader.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTChartDataReader : NSObject 12 | 13 | @property(nonatomic,retain) NSString * dataKeyPath; 14 | @property(nonatomic,retain) id defaultValue; 15 | 16 | -(double) doubleValue:(id) dataItem; 17 | 18 | -(int) intValue:(id) dataItem; 19 | 20 | -(float) floatValue:(id) dataItem; 21 | 22 | -(NSString *) stringValue:(id) dataItem; 23 | 24 | -(NSDictionary *) dictionaryValue:(id) dataItem; 25 | 26 | -(NSArray *) arrayValue:(id) dataItem; 27 | 28 | -(id) objectValue:(id) dataItem; 29 | 30 | -(NSArray *) dataItemsValue:(id) dataSource; 31 | 32 | -(UIColor *) colorValue:(id) dataItem; 33 | 34 | -(id) initWithDataKeyPath:(NSString *) dataKeyPath; 35 | 36 | -(id) initWithDataKeyPath:(NSString *) dataKeyPath defaultValue:(id)defaultValue; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartLabel.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTChartLabel : VTChartComponent 12 | 13 | @property(nonatomic,retain) NSString * title; 14 | @property(nonatomic,retain) UIColor * titleColor; 15 | @property(nonatomic,retain) UIFont * font; 16 | 17 | -(void) sizeToFit; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartLabel.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartLabel.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTChartLabel.h" 10 | 11 | @implementation VTChartLabel 12 | 13 | 14 | -(void) dealloc{ 15 | [_font release]; 16 | [_title release]; 17 | [_titleColor release]; 18 | [super dealloc]; 19 | } 20 | 21 | -(void) drawToContext:(CGContextRef)ctx rect:(CGRect)rect{ 22 | [super drawToContext:ctx rect:rect]; 23 | 24 | CGContextSetStrokeColorWithColor(ctx, _titleColor.CGColor); 25 | CGContextSetFillColorWithColor(ctx, _titleColor.CGColor); 26 | 27 | UIGraphicsPushContext(ctx); 28 | 29 | [_title drawInRect:rect withFont:_font lineBreakMode:NSLineBreakByTruncatingTail]; 30 | 31 | UIGraphicsPopContext(); 32 | 33 | } 34 | 35 | -(void) sizeToFit{ 36 | CGSize size = [_title sizeWithFont:_font]; 37 | [self setSize:size]; 38 | } 39 | 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartRectangle.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartRectangle.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTChartRectangle : VTChartComponent 12 | 13 | @property(nonatomic,retain) UIColor * borderColor; 14 | @property(nonatomic,retain) UIColor * backgroundColor; 15 | @property(nonatomic,assign) CGFloat borderWidth; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartRectangle.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartRectangle.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTChartRectangle.h" 10 | 11 | @implementation VTChartRectangle 12 | 13 | -(void) dealloc{ 14 | [_backgroundColor release]; 15 | [_borderColor release]; 16 | [super dealloc]; 17 | } 18 | 19 | -(void) drawToContext:(CGContextRef)ctx rect:(CGRect)rect{ 20 | 21 | CGContextSetStrokeColorWithColor(ctx, _borderColor.CGColor); 22 | CGContextSetFillColorWithColor(ctx, _backgroundColor.CGColor); 23 | CGContextSetLineWidth(ctx, _borderWidth); 24 | 25 | CGContextAddRect(ctx, rect); 26 | 27 | CGContextDrawPath(ctx, kCGPathFillStroke); 28 | 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartTipLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartTipLabel.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTChartTipLabel : VTChartComponent 12 | 13 | @property(nonatomic,retain) NSString * title; 14 | @property(nonatomic,retain) UIColor * titleColor; 15 | @property(nonatomic,retain) UIFont * font; 16 | @property(nonatomic,retain) UIColor * backgroundColor; 17 | @property(nonatomic,retain) UIColor * lineColor; 18 | @property(nonatomic,assign) CGFloat lineWidth; 19 | @property(nonatomic,assign) UIEdgeInsets padding; 20 | @property(nonatomic,retain) UIColor * borderColor; 21 | @property(nonatomic,assign) CGFloat borderWidth; 22 | @property(nonatomic,assign) CGPoint toLocation; 23 | 24 | -(void) sizeToFit; 25 | 26 | -(void) setToPosition:(CGPoint) position; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTChartView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTChartView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTChartView : UIView 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTPieChart.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTPieChart.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-8. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface VTPieChart : VTChart 13 | 14 | @property(nonatomic,assign) CGFloat borderWidth; 15 | @property(nonatomic,retain) IBOutlet VTChartDataReader * dataItemsReader; 16 | @property(nonatomic,retain) IBOutlet VTChartDataReader * titleReader; 17 | @property(nonatomic,retain) IBOutlet VTChartDataReader * valueReader; 18 | @property(nonatomic,retain) IBOutlet VTChartDataReader * colorReader; 19 | @property(nonatomic,retain) IBOutlet VTChartDataReader * borderColorReader; 20 | @property(nonatomic,retain) IBOutlet VTChartDataReader * totalValueReader; 21 | 22 | @property(nonatomic,retain) UIFont * font; 23 | @property(nonatomic,retain) UIColor * titleColor; 24 | @property(nonatomic,retain) UIColor * lineColor; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /vTeam/vTeam/Chart/VTPillarChart.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTPillarChart.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface VTPillarChart : VTChart 13 | 14 | @property(nonatomic,retain) IBOutlet VTChartDataReader * dataItemsReader; 15 | @property(nonatomic,retain) IBOutlet VTChartDataReader * titleReader; 16 | @property(nonatomic,retain) IBOutlet VTChartDataReader * valueReader; 17 | @property(nonatomic,retain) IBOutlet VTChartDataReader * colorReader; 18 | @property(nonatomic,retain) IBOutlet VTChartDataReader * borderColorReader; 19 | @property(nonatomic,retain) UIFont * font; 20 | @property(nonatomic,retain) UIColor * titleColor; 21 | 22 | @property(nonatomic,retain) UIColor * lineColor; 23 | @property(nonatomic,assign) CGFloat lineWidth; 24 | @property(nonatomic,assign) CGFloat borderWidth; 25 | @property(nonatomic,assign) UIEdgeInsets padding; 26 | @property(nonatomic,assign) CGFloat minHeight; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/NSString+VTDOMSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+VTDOMSource.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (VTDOMSource) 12 | 13 | -(NSString *) htmlEncodeString; 14 | 15 | -(NSString *) htmlDecodeString; 16 | 17 | -(NSString *) htmlStringByDOMSource:(id) data; 18 | 19 | -(NSString *) htmlStringByDOMSource:(id) data htmlEncoded:(BOOL) htmlEncoded; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/UIActivityIndicatorView+VTDOMElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIActivityIndicatorView+VTDOMElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-2-19. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIActivityIndicatorView (VTDOMElement) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/UIActivityIndicatorView+VTDOMElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIActivityIndicatorView+VTDOMElement.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-2-19. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "UIActivityIndicatorView+VTDOMElement.h" 10 | 11 | 12 | #import 13 | 14 | @implementation UIActivityIndicatorView (VTDOMElement) 15 | 16 | -(id) initWithFrame:(CGRect)frame{ 17 | return [self initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; 18 | } 19 | 20 | -(void) setElement:(VTDOMElement *)element{ 21 | [super setElement:element]; 22 | if([element isHidden]){ 23 | [self stopAnimating]; 24 | [self setHidden:YES]; 25 | } 26 | else{ 27 | [self setHidden:NO]; 28 | [self startAnimating]; 29 | } 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/UIButton+VTDOMElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+VTDOMElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-29. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIButton (VTDOMElement) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/UIControl+VTDOMElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+VTDOMElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-2-20. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIControl (VTDOMElement) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/UILabel+VTDOMElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // UILabel+VTDOMElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-28. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UILabel (VTDOMElement) 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/UILabel+VTDOMElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // UILabel+VTDOMElement.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-28. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "UILabel+VTDOMElement.h" 10 | 11 | #import "UIView+VTDOMElement.h" 12 | 13 | #import "VTDOMElement+Style.h" 14 | 15 | @implementation UILabel (VTDOMElement) 16 | 17 | -(void) setElement:(VTDOMElement *)element{ 18 | [super setElement:element]; 19 | 20 | self.font = [element fontValueForKey:@"font"]; 21 | self.textColor = [element colorValueForKey:@"color"]; 22 | 23 | NSTextAlignment alignment = NSTextAlignmentCenter; 24 | 25 | 26 | NSString * align = [element stringValueForKey:@"align"]; 27 | 28 | if([align isEqualToString:@"left"]){ 29 | alignment = NSTextAlignmentLeft; 30 | } 31 | else if([align isEqualToString:@"right"]){ 32 | alignment = NSTextAlignmentRight; 33 | } 34 | 35 | self.textAlignment = alignment; 36 | 37 | self.text = [element stringValueForKey:@"text"]; 38 | 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/UIView+VTDOMElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+VTDOMElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface UIView (VTDOMElement) 14 | 15 | -(void) setElement:(VTDOMElement *) element; 16 | 17 | -(void) element:(VTDOMElement *) element attributeChangedValue:(NSString *) value forKey:(NSString *) key; 18 | 19 | -(void) element:(VTDOMElement *) element valueChangedValue:(id)value forKey:(NSString *)key; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOM.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOM.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTDOM.h" 10 | 11 | @implementation VTDOM 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMActionElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMActionElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTDOMActionElement : VTDOMElement 14 | 15 | @property(nonatomic,readonly,getter = isAllowLongTapAction) BOOL allowLongTapAction; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMActionViewElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMActionViewElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-8-3. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMActionViewElement : VTDOMViewElement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMBRElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMBRElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-6. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMBRElement : VTDOMElement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMBRElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMBRElement.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-6. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTDOMBRElement.h" 10 | 11 | @implementation VTDOMBRElement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMContainerElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMContainerElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-2-16. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMContainerElement : VTDOMViewElement 12 | 13 | @property(nonatomic,readonly) UIScrollView * contentView; 14 | 15 | -(void) reloadData; 16 | 17 | -(BOOL) isVisableRect:(CGRect) frame; 18 | 19 | -(CGRect) frameInElement:(VTDOMElement *) element; 20 | 21 | -(void) didVisableItemView:(UIView *) itemView element:(VTDOMElement *) element atIndex:(NSInteger) index; 22 | 23 | -(void) didContainerDidAppera; 24 | 25 | -(void) didContainerDidDispaaer; 26 | 27 | -(void) didViewLoaded; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMDocument.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-13. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | #define VTDOMDocumentVersion @"1.0.0" 15 | 16 | @interface VTDOMDocument : NSObject 17 | 18 | @property(nonatomic,retain) NSBundle * bundle; 19 | @property(nonatomic,retain) VTDOMElement * rootElement; 20 | @property(nonatomic,retain) VTDOMStyleSheet * styleSheet; 21 | @property(nonatomic,retain) NSIndexPath * indexPath; 22 | @property(nonatomic,retain) NSURL * documentURL; 23 | 24 | -(VTDOMElement *) elementById:(NSString *) eid; 25 | 26 | -(NSArray *) elementsByClass:(Class) clazz inherit:(BOOL)inherit; 27 | 28 | -(void) applyStyleSheet:(VTDOMElement *) element; 29 | 30 | -(void) applyStyleSheet; 31 | 32 | -(void) elementDidAppera:(VTDOMElement *) element; 33 | 34 | -(void) elementWillDisappera:(VTDOMElement *) element; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMElement+Control.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMElement+Control.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-15. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMElement (Control) 12 | 13 | @property(nonatomic,assign,getter = isEnabled) BOOL enabled; 14 | @property(nonatomic,assign,getter = isHighlighted) BOOL highlighted; 15 | @property(nonatomic,assign,getter = isSelected) BOOL selected; 16 | 17 | - (BOOL)touchesBegan:(CGPoint) location; 18 | - (void)touchesMoved:(CGPoint) location; 19 | - (void)touchesEnded:(CGPoint) location; 20 | - (void)touchesCancelled:(CGPoint) location; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMElement+Frame.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMElement+Frame.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMElement (Frame) 12 | 13 | @property(nonatomic,assign) CGRect frame; 14 | 15 | - (CGRect)convertRect:(CGRect)rect superElement:(VTDOMElement *) element; 16 | 17 | - (void) elementDidFrameChanged:(VTDOMElement *) element; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMElement+Layout.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMElement+Layout.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMElement (Layout) 12 | 13 | @property(nonatomic,assign) CGSize contentSize; 14 | @property(nonatomic,readonly) UIEdgeInsets padding; 15 | @property(nonatomic,readonly) UIEdgeInsets margin; 16 | 17 | -(CGSize) layoutChildren:(UIEdgeInsets) padding; 18 | 19 | -(CGSize) layout:(CGSize) size; 20 | 21 | -(CGSize) layout; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMElement+Render.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMElement+Render.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMElement (Render) 12 | 13 | @property(nonatomic,readonly,getter = isHidden) BOOL hidden; 14 | @property(nonatomic,readonly) CALayer * layer; 15 | @property(nonatomic,readonly) UIColor * backgroundColor; 16 | 17 | -(void) render:(CGRect) rect context:(CGContextRef) context; 18 | 19 | -(void) draw:(CGRect) rect context:(CGContextRef) context; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMElement+Style.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMElement+Style.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMElement (Style) 12 | 13 | -(NSString *) stringValueForKey:(NSString *) key; 14 | 15 | -(float) floatValueForKey:(NSString *) key; 16 | 17 | -(BOOL) booleanValueForKey:(NSString *) key; 18 | 19 | -(UIImage *) imageValueForKey:(NSString *) key bundle:(NSBundle *) bundle; 20 | 21 | -(UIColor *) colorValueForKey:(NSString *) key; 22 | 23 | -(UIFont *) fontValueForKey:(NSString *) key; 24 | 25 | -(UIEdgeInsets) edgeInsetsValueForKey:(NSString *) key; 26 | 27 | -(float) floatValueForKey:(NSString *) key of:(CGFloat) baseValue defaultValue:(CGFloat) defaultValue; 28 | 29 | -(UIFont *) elementFont:(UIFont *) defaultFont; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMHScrollElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMHScrollElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMHScrollElement : VTDOMContainerElement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMImageElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMImageElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTDOMImageElement : VTDOMElement 14 | 15 | @property(nonatomic,retain) UIImage * image; 16 | @property(nonatomic,retain) UIImage * defaultImage; 17 | @property(nonatomic,readonly,getter = isPreload) BOOL preload; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMLabel.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-3. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMLabel : UILabel 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMLabelElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMLabelElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMLabelElement : VTDOMElement 12 | 13 | @property(nonatomic,readonly) UIFont * font; 14 | @property(nonatomic,readonly) UIColor * textColor; 15 | @property(nonatomic,readonly) NSLineBreakMode lineBreakMode; 16 | @property(nonatomic,readonly) NSTextAlignment alignment; 17 | @property(nonatomic,readonly) CGFloat minFontSize; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMLinkElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMLinkElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-6. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | #import 13 | 14 | @interface VTDOMLinkElement : VTDOMLabelElement 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMPageScrollElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMPageScrollElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMPageScrollElement : VTDOMContainerElement 12 | 13 | @property(nonatomic,readonly) NSInteger pageIndex; 14 | @property(nonatomic,readonly) NSInteger pageSize; 15 | 16 | -(void) setPageIndex:(NSInteger)pageIndex animated:(BOOL) animated; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMParse.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMParse.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-13. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @class VTDOMElement; 13 | @class VTDOMDocument; 14 | @class VTDOMStyleSheet; 15 | 16 | @interface VTDOMParse : NSObject 17 | 18 | -(VTDOMElement *) newElement:(NSString *) name ns:(NSString *) ns; 19 | 20 | -(BOOL) parseHTML:(NSString *) html toElement:(VTDOMElement *) element atIndex:(NSInteger) index; 21 | 22 | -(BOOL) parseHTML:(NSString *) html toElement:(VTDOMElement *) element; 23 | 24 | -(BOOL) parseHTML:(NSString *) html toDocument:(VTDOMDocument *) document; 25 | 26 | -(BOOL) parseCSS:(NSString *) css toStyleSheet:(VTDOMStyleSheet *) styleSheet; 27 | 28 | -(BOOL) parseXML:(NSString *) xml toElement:(VTDOMElement *) element atIndex:(NSInteger) index; 29 | 30 | -(BOOL) parseXML:(NSString *) xml toElement:(VTDOMElement *) element; 31 | 32 | -(BOOL) parseXML:(NSString *) xml toDocument:(VTDOMDocument *) document; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMRichElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMRichElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTDOMRichElement : VTDOMElement 15 | 16 | @property(nonatomic,readonly) UIFont * font; 17 | @property(nonatomic,readonly) UIColor * textColor; 18 | @property(nonatomic,retain) VTRich * rich; 19 | 20 | -(BOOL) willAppendText:(NSString *)text attributes:(NSDictionary *)attributes rich:(VTRich *) rich; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMScrollView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-16. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTDOMScrollView : UIScrollView 14 | 15 | @property(nonatomic,assign) CGFloat pageScale; 16 | @property(nonatomic,retain) VTDOMElement * element; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMStatusElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMStatusElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-2-19. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMStatusElement : VTDOMActionElement 12 | 13 | @property(nonatomic,retain) NSString * status; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMStyle.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMStyle : NSObject 12 | 13 | @property(nonatomic,retain) NSString * name; 14 | @property(nonatomic,readonly) NSArray * allKeys; 15 | 16 | -(void) setStringValue:(NSString *) value forKey:(NSString *) key; 17 | 18 | -(NSString *) stringValueForKey:(NSString *) key; 19 | 20 | -(float) floatValueForKey:(NSString *) key; 21 | 22 | -(BOOL) booleanValueForKey:(NSString *) key; 23 | 24 | -(UIImage *) imageValueForKey:(NSString *) key bundle:(NSBundle *) bundle; 25 | 26 | -(UIColor *) colorValueForKey:(NSString *) key; 27 | 28 | -(UIFont *) fontValueForKey:(NSString *) key; 29 | 30 | +(float) floatValue:(NSString *) value; 31 | 32 | +(BOOL) booleanValue:(NSString *) value; 33 | 34 | +(UIImage *) imageValue:(NSString *) value bundle:(NSBundle *) bundle; 35 | 36 | +(UIColor *) colorValue:(NSString *) value; 37 | 38 | +(UIFont *) fontValue:(NSString *) value; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMStyleSheet.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMStyleSheet.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTDOMStyleSheet : NSObject 14 | 15 | @property(nonatomic,assign) NSInteger version; 16 | 17 | @property(nonatomic,readonly) NSArray * styles; 18 | 19 | -(void) addStyle:(VTDOMStyle *) style; 20 | 21 | -(void) removeStyle:(VTDOMStyle *) style; 22 | 23 | -(void) removeAllStyles; 24 | 25 | -(VTDOMStyle *) selectorStyleName:(NSString *) styleName; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMTableElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMTableElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-2-23. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMTableElement : VTDOMViewElement 12 | 13 | @property(nonatomic,readonly) UITableView * tableView; 14 | 15 | -(VTDOMElement *) elementByIndexPath:(NSIndexPath *) indexPath; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMTipElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMTipElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-8-13. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMTipElement : VTDOMContainerElement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMVScrollElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMVScrollElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMVScrollElement : VTDOMContainerElement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTDOMView : UIView 14 | 15 | @property(nonatomic,assign) IBOutlet id delegate; 16 | @property(nonatomic,retain) VTDOMElement * element; 17 | @property(nonatomic,assign,getter = isAllowAutoLayout) BOOL allowAutoLayout; 18 | 19 | @end 20 | 21 | @protocol VTDOMViewDelegate 22 | 23 | @optional 24 | 25 | -(void) vtDOMView:(VTDOMView *) view doActionElement:(VTDOMElement *) element; 26 | 27 | -(void) vtDOMView:(VTDOMView *)view downloadImagesForElement:(VTDOMElement *) element; 28 | 29 | -(void) vtDOMView:(VTDOMView *)view downloadImagesForView:(UIView *) forView; 30 | 31 | -(UIView *) vtDOMView:(VTDOMView *)view elementView:(VTDOMElement *)element viewClass:(Class) viewClass; 32 | 33 | -(void) vtDOMView:(VTDOMView *)view loadContentForElement:(VTDOMElement *) element; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMViewElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMViewElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-15. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface VTDOMViewElement : VTDOMElement 13 | 14 | @property(nonatomic,retain) UIView * view; 15 | 16 | @property(nonatomic,readonly,getter = isViewLoaded) BOOL viewLoaded; 17 | 18 | -(Class) viewClass; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMWebContainerElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMWebContainerElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-8-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMWebContainerElement : VTDOMContainerElement 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/DOM/VTDOMWebViewElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDOMWebViewElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-8-1. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDOMWebViewElement : VTDOMViewElement 12 | 13 | @property(nonatomic,readonly) UIWebView * webView; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/GIFView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GIFView.h 3 | // SinaFramework 4 | // 5 | // Created by zhang hailong on 12-11-15. 6 | // Copyright (c) 2012年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GIFView : UIView 12 | 13 | @property(nonatomic,retain) id imageSource; 14 | @property(nonatomic,retain) NSURL * gifURL; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/Grid.h: -------------------------------------------------------------------------------- 1 | // 2 | // Grid.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface Grid : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/GridApposeDataView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GridApposeDataView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface GridApposeDataView : UIView 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/GridApposeDataView.m: -------------------------------------------------------------------------------- 1 | // 2 | // GridApposeDataView.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "GridApposeDataView.h" 10 | 11 | @implementation GridApposeDataView 12 | 13 | 14 | @synthesize grid = _grid; 15 | 16 | -(void) dealloc{ 17 | [_grid release]; 18 | [super dealloc]; 19 | } 20 | 21 | - (id)initWithFrame:(CGRect)frame 22 | { 23 | self = [super initWithFrame:frame]; 24 | if (self) { 25 | // Initialization code 26 | } 27 | return self; 28 | } 29 | 30 | - (void)drawRect:(CGRect)rect 31 | { 32 | [super drawRect:rect]; 33 | [_grid drawApposeDataToContext:UIGraphicsGetCurrentContext() rect:rect]; 34 | } 35 | 36 | 37 | -(void) setGrid:(Grid *)grid{ 38 | if(_grid != grid){ 39 | [_grid release]; 40 | _grid = [grid retain]; 41 | } 42 | [self setNeedsDisplay]; 43 | } 44 | 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/GridApposeHeadView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GridApposeHeadView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface GridApposeHeadView : UIView 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/GridApposeHeadView.m: -------------------------------------------------------------------------------- 1 | // 2 | // GridApposeHeadView.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "GridApposeHeadView.h" 10 | 11 | @implementation GridApposeHeadView 12 | 13 | @synthesize grid = _grid; 14 | 15 | -(void) dealloc{ 16 | [_grid release]; 17 | [super dealloc]; 18 | } 19 | 20 | - (id)initWithFrame:(CGRect)frame 21 | { 22 | self = [super initWithFrame:frame]; 23 | if (self) { 24 | // Initialization code 25 | } 26 | return self; 27 | } 28 | 29 | - (void)drawRect:(CGRect)rect 30 | { 31 | [super drawRect:rect]; 32 | [_grid drawApposeHeadToContext:UIGraphicsGetCurrentContext() rect:rect]; 33 | } 34 | 35 | 36 | -(void) setGrid:(Grid *)grid{ 37 | if(_grid != grid){ 38 | [_grid release]; 39 | _grid = [grid retain]; 40 | } 41 | [self setNeedsDisplay]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/GridDataView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GridDataView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface GridDataView : UIView 15 | 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/GridHeadView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GridHeadView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface GridHeadView : UIView 15 | 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/GridHeadView.m: -------------------------------------------------------------------------------- 1 | // 2 | // GridHeadView.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "GridHeadView.h" 10 | 11 | @implementation GridHeadView 12 | 13 | @synthesize grid = _grid; 14 | 15 | - (id)initWithFrame:(CGRect)frame 16 | { 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | // Initialization code 20 | } 21 | return self; 22 | } 23 | 24 | -(void) dealloc{ 25 | [_grid release]; 26 | [super dealloc]; 27 | } 28 | 29 | // Only override drawRect: if you perform custom drawing. 30 | // An empty implementation adversely affects performance during animation. 31 | - (void)drawRect:(CGRect)rect 32 | { 33 | [super drawRect:rect]; 34 | [_grid drawHeadToContext:UIGraphicsGetCurrentContext() rect:rect]; 35 | } 36 | 37 | 38 | -(void) setGrid:(Grid *)grid{ 39 | if(_grid != grid){ 40 | [_grid release]; 41 | _grid = [grid retain]; 42 | } 43 | [self setNeedsDisplay]; 44 | } 45 | 46 | -(void) sizeToFit{ 47 | CGRect r = self.frame; 48 | r.size.width = [_grid size].width; 49 | [self setFrame:r]; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/GridScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GridScrollView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface GridScrollView : VTScrollView 13 | 14 | @property(nonatomic,retain) UIView * gridView; 15 | @property(nonatomic,retain) UIView * apposeView; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/IGridCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // IGridCell.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @protocol IGridCell 15 | 16 | @property(nonatomic,retain) NSString * title; 17 | @property(nonatomic,assign) CGFloat width; 18 | @property(nonatomic,retain) UIColor * titleColor; 19 | @property(nonatomic,retain) UIFont * titleFont; 20 | @property(nonatomic,assign) CGFloat titleMinFontSize; 21 | @property(nonatomic,assign) NSTextAlignment titleAlignment; 22 | @property(nonatomic,retain) UIColor * backgroundColor; 23 | @property(nonatomic,retain) NSString * keyPath; 24 | @property(nonatomic,assign,getter = isClipsLastTitle) BOOL clipsLastTitle; 25 | @property(nonatomic,assign) NSUInteger colSpan; 26 | @property(nonatomic,retain) UIView * view; 27 | @property(nonatomic,assign) UIEdgeInsets padding; 28 | @property(nonatomic,assign) NSLineBreakMode lineBreakMode; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/IGridColumn.h: -------------------------------------------------------------------------------- 1 | // 2 | // IGridColumn.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @protocol IGridColumn 13 | 14 | @property(nonatomic,assign,getter = isHidden) BOOL hidden; 15 | 16 | @property(nonatomic,assign) UIEdgeInsets dataPadding; 17 | @property(nonatomic,assign) NSLineBreakMode dataLineBreakMode; 18 | @property(nonatomic,assign) NSTextAlignment dataTitleAlignment; 19 | @property(nonatomic,assign) CGFloat dataTitleMinFontSize; 20 | 21 | -(id) newDataCell:(id) data; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/IGridDraw.h: -------------------------------------------------------------------------------- 1 | // 2 | // IGridDraw.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @protocol IGridDraw 13 | 14 | -(void) drawToContext:(CGContextRef) ctx rect:(CGRect) rect; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/IGridRow.h: -------------------------------------------------------------------------------- 1 | // 2 | // IGridRow.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @protocol IGridRow 15 | 16 | @property(nonatomic,assign) CGFloat height; 17 | @property(nonatomic,readonly) NSArray * cells; 18 | @property(nonatomic,retain) UIColor * backgroundColor; 19 | @property(nonatomic,retain) UIColor * nextSplitColor; 20 | 21 | -(void) applyCellViewTo:(UIView *) superview rect:(CGRect) rect; 22 | 23 | -(void) heightToFit; 24 | 25 | -(void) updateData:(id) data; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/IGridValue.h: -------------------------------------------------------------------------------- 1 | // 2 | // IGridValue.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-15. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IGridValue 12 | 13 | -(id) valueForKey:(NSString *) key; 14 | 15 | -(void) setValue:(id) value forKey:(NSString *) key; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/IGridView.h: -------------------------------------------------------------------------------- 1 | // 2 | // IGridView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "Grid.h" 12 | 13 | 14 | @protocol IGridView 15 | 16 | @property(nonatomic,retain) Grid * grid; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/Grid/NSString+Grid.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Grid.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (Grid) 12 | 13 | -(NSString *) expressionOfKeyPath:(NSString *) keyPath data:(id) data; 14 | 15 | -(NSString *) expressionOfData:(id) data; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTAPICancelTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTAPICancelTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTAPICancelTask 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTAPITask.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTAPITask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTAPITask 14 | 15 | @property(nonatomic,retain) id task; 16 | @property(nonatomic,assign) Protocol * taskType; 17 | @property(nonatomic,retain) id userInfo; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTAction.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-3. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTAction 12 | 13 | @property(nonatomic,retain) NSString * actionName; 14 | @property(nonatomic,retain) id userInfo; 15 | @property(nonatomic,retain) IBOutletCollection(UIView) NSArray * actionViews; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTAuthContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTAuthContext.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-12-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTAuthContext 14 | 15 | @property(nonatomic,retain) id uid; 16 | @property(nonatomic,retain) NSString * token; 17 | @property(nonatomic,readonly) NSString * domain; 18 | 19 | -(void) setAuthValue:(id) value forKey:(NSString *)key; 20 | 21 | -(id) authValueForKey:(NSString *) key; 22 | 23 | -(NSArray *) authKeys; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTContext.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-24. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTContext 12 | 13 | -(NSBundle *) resourceBundle; 14 | 15 | -(NSBundle *) temporaryBundle; 16 | 17 | -(NSBundle *) documentBundle; 18 | 19 | -(NSBundle *) applicationBundle; 20 | 21 | // res:// tmp:// doc:// app:// 22 | -(NSString *) filePathWithFileURI:(NSString *) fileURI; 23 | 24 | -(NSString *) fileURIWithFilePath:(NSString *) filePath; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTController.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-27. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTUIContext; 12 | 13 | @protocol IVTController 14 | 15 | @property(nonatomic,assign) id context; 16 | @property(nonatomic,assign) IBOutlet id delegate; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTDownlinkPageTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTDownlinkPageTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTDownlinkPageTask 14 | 15 | -(NSInteger) vtDownlinkPageTaskPageSize; 16 | 17 | -(NSInteger) vtDownlinkPageTaskPageIndex; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTDownlinkTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTDownlinkTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTDownlinkTask 14 | 15 | @property(nonatomic,assign,getter = isSkipCached) BOOL skipCached; 16 | @property(nonatomic,assign,getter = isDataChanged) BOOL dataChanged; 17 | 18 | @optional 19 | 20 | -(void) vtDownlinkTaskDidLoadedFromCache:(id) data timestamp:(NSDate *) timestamp forTaskType:(Protocol *) taskType; 21 | 22 | -(void) vtDownlinkTaskDidLoaded:(id) data forTaskType:(Protocol *) taskType; 23 | 24 | -(void) vtDownlinkTaskDidFitalError:(NSError *) error forTaskType:(Protocol *) taskType; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTFormEditor.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTFormEditor.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTFormEditor 14 | 15 | @property(nonatomic,retain) NSString * editorType; 16 | @property(nonatomic,retain) VTFormItem * formItem; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTFormItemView.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTFormItemView.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTFormItemView 12 | 13 | @property(nonatomic,retain) id value; 14 | @property(nonatomic,retain) NSString * text; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTImageTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTImageTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTImageTask 14 | 15 | @property(nonatomic,assign,getter = isLoaded) BOOL loaded; 16 | @property(nonatomic,retain) NSString * defaultSrc; 17 | @property(nonatomic,retain) NSString * src; 18 | @property(nonatomic,assign,getter = isLoading) BOOL loading; 19 | @property(nonatomic,retain) NSString * reuseFileURI; 20 | @property(nonatomic,assign,getter = isLocalAsyncLoad) BOOL localAsyncLoad; 21 | 22 | -(void) setImage:(UIImage *) image; 23 | 24 | -(void) setImage:(UIImage *) image isLocal:(BOOL) isLocal; 25 | 26 | -(void) setDefaultImage:(UIImage *) image; 27 | 28 | @end 29 | 30 | @protocol IVTLocalImageTask 31 | 32 | 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTService.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-24. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | 14 | @protocol IVTService 15 | 16 | @property(nonatomic,retain) id config; 17 | 18 | @property(nonatomic,assign) id context; 19 | 20 | -(BOOL) handle:(Protocol *)taskType task:(id)task priority:(NSInteger)priority; 21 | 22 | -(BOOL) cancelHandle:(Protocol *)taskType task:(id)task; 23 | 24 | -(BOOL) cancelHandleForSource:(id) source; 25 | 26 | -(void) didReceiveMemoryWarning; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTServiceContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTServiceContainer.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTServiceContainer 14 | 15 | @property(nonatomic,readonly) id instance; 16 | @property(nonatomic,retain) id config; 17 | @property(nonatomic,assign) id context; 18 | @property(nonatomic,assign,getter=isInherit) BOOL inherit; 19 | 20 | -(BOOL) hasTaskType:(Protocol *) taskType; 21 | 22 | -(void) addTaskType:(Protocol *) taskType; 23 | 24 | -(void) didReceiveMemoryWarning; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTServiceContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTServiceContext.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-24. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @protocol IVTServiceContext 15 | 16 | -(BOOL) handle:(Protocol *)taskType task:(id)task priority:(NSInteger)priority; 17 | 18 | -(BOOL) cancelHandle:(Protocol *)taskType task:(id)task; 19 | 20 | -(BOOL) cancelHandleForSource:(id) source; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-24. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTTask 12 | 13 | @property(nonatomic,assign) id source; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTURLDownlinkTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTURLDownlinkTask.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-6-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTURLDownlinkTask 14 | 15 | @property(nonatomic,retain) NSString * url; 16 | @property(nonatomic,retain) NSString * urlKey; 17 | 18 | @property(nonatomic,retain) NSString * errorCodeKeyPath; 19 | @property(nonatomic,retain) NSString * errorKeyPath; 20 | @property(nonatomic,assign) Class httpClass; 21 | 22 | @property(nonatomic,retain) id queryValues; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /vTeam/vTeam/IVTUplinkTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // IVTUplinkTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @protocol IVTUplinkTask 14 | 15 | @property(nonatomic,assign) IBOutlet id delegate; 16 | 17 | @end 18 | 19 | @protocol IVTUplinkTaskDelegate 20 | 21 | 22 | @optional 23 | 24 | -(void) vtUploadTask:(id) uplinkTask didSuccessResults:(id) results forTaskType:(Protocol *) taskType; 25 | 26 | -(void) vtUploadTask:(id) uplinkTask didFailWithError:(NSError *)error forTaskType:(Protocol *)taskType; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontage.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontage.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | #import 14 | #import 15 | #import 16 | #import 17 | 18 | @interface VTMontage : NSObject 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontage.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontage.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTMontage.h" 10 | 11 | @implementation VTMontage 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontageElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontageElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class VTMontageScenes; 12 | 13 | @interface VTMontageElement : NSObject 14 | 15 | @property(nonatomic,retain) NSString * locusName; 16 | @property(nonatomic,assign) NSTimeInterval afterDelay; 17 | @property(nonatomic,assign) NSTimeInterval duration; 18 | @property(nonatomic,retain) IBOutlet VTMontageElement * nextElement; 19 | 20 | -(void) scenes:(VTMontageScenes *) scehes onValueChanged:(float) value; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontageElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontageElement.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTMontageElement.h" 10 | 11 | #import "VTMontageScenes.h" 12 | 13 | @implementation VTMontageElement 14 | 15 | @synthesize locusName = _locusName; 16 | @synthesize afterDelay = _afterDelay; 17 | @synthesize duration = _duration; 18 | @synthesize nextElement = _nextElement; 19 | 20 | -(void) dealloc{ 21 | [_nextElement release]; 22 | [_locusName release]; 23 | [super dealloc]; 24 | } 25 | 26 | -(void) scenes:(VTMontageScenes *) scehes onValueChanged:(float) value{ 27 | 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontageGroupElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontageGroupElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-13. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTMontageGroupElement : VTMontageElement 12 | 13 | @property(nonatomic,retain) IBOutletCollection(VTMontageElement) NSArray * elements; 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontageLocus.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontageLocus.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef struct _VTMontageLocusPoint { 12 | float x; 13 | float y; 14 | float z; 15 | } VTMontageLocusPoint; 16 | 17 | @class VTMontageElement; 18 | 19 | @class VTMontageScenes; 20 | 21 | @interface VTMontageLocus : NSObject 22 | 23 | @property(nonatomic,retain) NSString * name; 24 | @property(nonatomic,assign) VTMontageScenes * scenes; 25 | 26 | -(VTMontageLocusPoint) locusPoint:(float) value element:(VTMontageElement *) element; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontageLocus.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontageLocus.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTMontageLocus.h" 10 | 11 | @implementation VTMontageLocus 12 | 13 | @synthesize scenes = _scenes; 14 | @synthesize name = _name; 15 | 16 | -(void) dealloc{ 17 | [_name release]; 18 | [super dealloc]; 19 | } 20 | 21 | -(VTMontageLocusPoint) locusPoint:(float) value element:(VTMontageElement *) element{ 22 | VTMontageLocusPoint p = {value,value,value}; 23 | return p; 24 | } 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontagePlayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontagePlayer.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTMontagePlayer : NSObject 14 | 15 | @property(nonatomic,retain) IBOutletCollection(VTMontageScenes) NSArray * scenes; 16 | @property(nonatomic,assign,readonly,getter = isPlaying) BOOL playing; 17 | @property(nonatomic,assign) IBOutlet id delegate; 18 | 19 | -(void) play; 20 | 21 | -(void) stop; 22 | 23 | -(void) addPlayingScehes:(VTMontageScenes * )scenes; 24 | 25 | -(void) removePlayingScenes:(VTMontageScenes *) scenes; 26 | 27 | @end 28 | 29 | @protocol VTMontagePlayerDelegate 30 | 31 | @optional 32 | 33 | -(void) montagePlayer:(VTMontagePlayer *) player didPlayScenes:(VTMontageScenes *) scenes; 34 | 35 | -(void) montagePlayer:(VTMontagePlayer *) player didStopScenes:(VTMontageScenes *) scenes; 36 | 37 | @end -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontageScenes.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontageScenes.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTMontageScenes : NSObject 15 | 16 | @property(nonatomic,assign) NSTimeInterval startTimeInterval; 17 | @property(nonatomic,assign) NSUInteger repeatCount; 18 | @property(nonatomic,assign,getter = isRepeatAutoreverses) BOOL repeatAutoreverses; 19 | @property(nonatomic,retain) IBOutlet id contentView; 20 | @property(nonatomic,assign) NSTimeInterval current; 21 | @property(nonatomic,assign) NSTimeInterval duration; 22 | @property(nonatomic,retain) IBOutletCollection(VTMontageLocus) NSArray * locuss; 23 | @property(nonatomic,retain) IBOutlet VTMontageElement * rootElement; 24 | @property(nonatomic,assign) NSTimeInterval value; 25 | 26 | -(VTMontageLocus *) locusForName:(NSString *) name; 27 | 28 | @end 29 | 30 | -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontageViewElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontageViewElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTMontageViewElement : VTMontageElement 14 | 15 | @property(nonatomic,retain) IBOutlet UIView * view; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/Montage/VTMontageViewElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTMontageViewElement.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTMontageViewElement.h" 10 | 11 | #import "VTMontageScenes.h" 12 | 13 | @implementation VTMontageViewElement 14 | 15 | @synthesize view = _view; 16 | 17 | -(void) dealloc{ 18 | [_view release]; 19 | [super dealloc]; 20 | } 21 | 22 | -(void) scenes:(VTMontageScenes *) scehes onValueChanged:(float) value{ 23 | 24 | if(value >=0 && value <=1.0){ 25 | 26 | VTMontageLocusPoint p = [[scehes locusForName:self.locusName] locusPoint:value element:self]; 27 | 28 | UIView * contentView = [scehes contentView]; 29 | 30 | if([contentView isKindOfClass:[UIView class]]){ 31 | 32 | CGSize size = contentView.bounds.size; 33 | 34 | CGRect r = _view.frame; 35 | 36 | _view.center = CGPointMake(size.width * 0.5 , (size.height - r.size.height) * (1.0 - p.y) + r.size.height / 2.0); 37 | 38 | [contentView addSubview:_view]; 39 | } 40 | } 41 | 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSData+CCCryptor.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+CCCryptor.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface NSData (CCCryptor) 14 | 15 | -(NSData *) CCCryptorEncryptedUsingAlgorithm: (CCAlgorithm) algorithm key:(id) key; 16 | 17 | -(NSData *) CCCryptorDecryptedUsingAlgorithm: (CCAlgorithm) algorithm key:(id) key; 18 | 19 | -(NSData *) AES256EncryptWithKey:(NSString *)key; 20 | 21 | -(NSString*) toHexString; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSData+GZIP.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+GZIP.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-23. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSData (GZIP) 12 | 13 | -(NSData *) GZIPEncode; 14 | 15 | -(NSData *) GZIPDecode; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSData+VTBASE64String.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+VTBASE64String.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSData (VTBASE64String) 12 | 13 | -(NSString *) vtBASE64String; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSData+VTBASE64String.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+VTBASE64String.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "NSData+VTBASE64String.h" 10 | 11 | #include "hconfig.h" 12 | #include "hbase64.h" 13 | 14 | @implementation NSData (VTBASE64String) 15 | 16 | -(NSString *) vtBASE64String{ 17 | InvokeTickBegin 18 | huint32 size = (huint32) [self length] * 4 / 3 + 1; 19 | hbuffer_t buf = buffer_alloc(MAX(size, 512), 1024); 20 | 21 | hbase64_encode((hbyte *)[self bytes], (hint32)[self length], buf); 22 | 23 | NSString * rs = [NSString stringWithCString:buffer_to_str(buf) encoding:NSUTF8StringEncoding]; 24 | 25 | buffer_dealloc(buf); 26 | 27 | return rs; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSData+VTMD5String.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+VTMD5String.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSData (VTMD5String) 12 | 13 | -(NSString *) vtMD5String; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSData+VTMD5String.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSData+VTMD5String.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "NSData+VTMD5String.h" 10 | 11 | #import 12 | 13 | @implementation NSData (VTMD5String) 14 | 15 | -(NSString *) vtMD5String{ 16 | unsigned char md[16]; 17 | CC_MD5([self bytes], (unsigned int) [self length], md); 18 | return [NSString stringWithFormat: 19 | @"%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X", 20 | md[0], md[1], md[2], md[3], 21 | md[4], md[5], md[6], md[7], 22 | md[8], md[9], md[10], md[11], 23 | md[12], md[13], md[14], md[15] 24 | ]; 25 | } 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSFileManager+VTMD5String.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSFileManager+VTMD5String.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-2-26. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSFileManager (VTMD5String) 12 | 13 | -(NSString *) vtMD5StringAtPath:(NSString *) filePath; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSString+Pinyin.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+Pinyin.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-23. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (Pinyin) 12 | 13 | -(NSString *) pinyinInitials; 14 | 15 | -(NSString *) pinyin; 16 | 17 | -(NSString *) pinyinInitialsChar; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSString+TextLength.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+TextLength.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-9-3. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (TextLength) 12 | 13 | -(NSUInteger) textLength; 14 | 15 | -(NSUInteger) textIndexOfLength:(NSUInteger) textLength; 16 | 17 | -(NSString *) reverseString; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSString+VTBASE64Decode.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+VTBASE64Decode.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (VTBASE64Decode) 12 | 13 | -(NSData *) vtBASE64Decode; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSString+VTBASE64Decode.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+VTBASE64Decode.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "NSString+VTBASE64Decode.h" 10 | 11 | #include "hconfig.h" 12 | #include "hbase64.h" 13 | 14 | @implementation NSString (VTBASE64Decode) 15 | 16 | -(NSData *) vtBASE64Decode{ 17 | 18 | InvokeTickBegin 19 | huint32 size = (huint32) [self length] * 3 / 4 + 1; 20 | hbuffer_t buf = buffer_alloc(MAX(size, 512), 1024); 21 | 22 | hbase64_decode([self UTF8String], buf); 23 | 24 | NSData * rs = [NSData dataWithBytes:buffer_data(buf) length:buffer_length(buf)]; 25 | 26 | buffer_dealloc(buf); 27 | 28 | return rs; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSString+VTBASE64String.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+VTBASE64String.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (VTBASE64String) 12 | 13 | -(NSString *) vtBASE64String; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSString+VTBASE64String.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+VTBASE64String.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "NSString+VTBASE64String.h" 10 | 11 | #import "NSData+VTBASE64String.h" 12 | 13 | @implementation NSString (VTBASE64String) 14 | 15 | -(NSString *) vtBASE64String{ 16 | return [[self dataUsingEncoding:NSUTF8StringEncoding] vtBASE64String]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSString+VTMD5String.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+VTMD5String.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (VTMD5String) 12 | 13 | -(NSString *) vtMD5String; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSString+VTMD5String.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+VTMD5String.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "NSString+VTMD5String.h" 10 | 11 | #import "NSData+VTMD5String.h" 12 | 13 | @implementation NSString (VTMD5String) 14 | 15 | -(NSString *) vtMD5String{ 16 | return [[self dataUsingEncoding:NSUTF8StringEncoding] vtMD5String]; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/NSURL+QueryValue.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSURL+QueryValue.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSURL (QueryValue) 12 | 13 | @property(nonatomic,readonly) NSDictionary * queryValues; 14 | 15 | 16 | + (id)URLWithString:(NSString *)URLString relativeToURL:(NSURL *)baseURL queryValues:(id) queryValues; 17 | 18 | + (id)URLWithString:(NSString *)URLString queryValues:(id) queryValues; 19 | 20 | + (NSString *) decodeQueryValue:(NSString *) queryValue; 21 | 22 | + (NSString *) encodeQueryValue:(NSString *) queryValue; 23 | 24 | + (NSDictionary *) decodeQuery:(NSString *) query; 25 | 26 | + (NSString *) encodeQueryValues:(NSDictionary *) queryValues; 27 | 28 | -(NSString *) firstPathComponent; 29 | 30 | -(NSString *) firstPathComponent:(NSString *) basePath; 31 | 32 | -(NSArray *) pathComponents:(NSString *) basePath; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /vTeam/vTeam/Rich/VTRichImageElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTRichImageElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-17. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTRichImageElement : VTRichElement 14 | 15 | @property(nonatomic,retain) UIImage * image; 16 | @property(nonatomic,assign) CGSize size; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/Rich/VTRichImageElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTRichImageElement.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-17. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTRichImageElement.h" 10 | 11 | @implementation VTRichImageElement 12 | 13 | @synthesize image = _image; 14 | @synthesize width = _width; 15 | @synthesize ascent = _ascent; 16 | @synthesize descent = _descent; 17 | 18 | -(void) dealloc{ 19 | [_image release]; 20 | [super dealloc]; 21 | } 22 | 23 | -(CGSize) size{ 24 | return CGSizeMake(_width, _ascent + _descent); 25 | } 26 | 27 | -(void) setSize:(CGSize)size{ 28 | _width = size.width; 29 | _ascent = size.height; 30 | _descent = 0; 31 | } 32 | 33 | -(void) drawRect:(CGRect)rect context:(CGContextRef)context{ 34 | CGContextDrawImage(context, rect, _image.CGImage); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /vTeam/vTeam/Rich/VTRichLinkElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTRichLinkElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-15. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTRichLinkElement : VTRichElement 12 | 13 | @property(nonatomic,retain) NSString * href; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/Rich/VTRichLinkElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTRichLinkElement.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-15. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTRichLinkElement.h" 10 | 11 | @implementation VTRichLinkElement 12 | 13 | @synthesize href = _href; 14 | 15 | -(void) dealloc{ 16 | [_href release]; 17 | [super dealloc]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/Rich/VTRichView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTRichView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-17. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTRichView : UIView 14 | 15 | @property(nonatomic,retain) VTRich * rich; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/Rich/VTRichViewElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTRichViewElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-15. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTRichViewElement : VTRichElement 12 | 13 | @property(nonatomic,assign) CGSize size; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/Rich/VTRichViewElement.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTRichViewElement.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-15. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTRichViewElement.h" 10 | 11 | @implementation VTRichViewElement 12 | 13 | @synthesize width = _width; 14 | @synthesize ascent = _ascent; 15 | @synthesize descent = _descent; 16 | @synthesize view = _view; 17 | 18 | -(CGSize) size{ 19 | return CGSizeMake(_width, _ascent + _descent); 20 | } 21 | 22 | -(void) setSize:(CGSize)size{ 23 | _width = size.width; 24 | _ascent = size.height; 25 | _descent = 0; 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIColor+UIImage.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+UIImage.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-24. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (UIImage) 12 | 13 | -(UIImage *) imageWithSize:(CGSize) size; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIColor+UIImage.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+UIImage.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-24. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "UIColor+UIImage.h" 10 | 11 | @implementation UIColor (UIImage) 12 | 13 | -(UIImage *) imageWithSize:(CGSize) size{ 14 | 15 | UIGraphicsBeginImageContext(size); 16 | 17 | [self set]; 18 | [self setFill]; 19 | 20 | CGContextFillRect(UIGraphicsGetCurrentContext() 21 | , CGRectMake(0, 0, size.width, size.height)); 22 | 23 | UIImage * img = UIGraphicsGetImageFromCurrentImageContext(); 24 | 25 | UIGraphicsEndImageContext(); 26 | 27 | return img; 28 | 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIControl+VTDataOutlet.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+VTDataOutlet.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIControl (VTDataOutlet) 12 | 13 | @property(nonatomic,assign,getter=isDisabled) BOOL disabled; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIControl+VTDataOutlet.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIControl+VTDataOutlet.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "UIControl+VTDataOutlet.h" 10 | 11 | @implementation UIControl (VTDataOutlet) 12 | 13 | -(BOOL) isDisabled{ 14 | return ![self isEnabled]; 15 | } 16 | 17 | -(void) setDisabled:(BOOL)disabled{ 18 | [self setEnabled:!disabled]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIDevice+VTUUID.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIDevice+VTUUID.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIDevice (VTUUID) 12 | 13 | @property(nonatomic,readonly,retain) NSString * vtUniqueIdentifier; 14 | @property(nonatomic,readonly,retain) NSString * MACAddress; 15 | @property(nonatomic,readonly,retain) NSString * WIFIAddress; 16 | @property(nonatomic,readonly,assign,getter = isActiveWWAN) BOOL activeWWAN; 17 | @property(nonatomic,readonly,assign,getter = isNetworkAvailable) BOOL networkAvailable; 18 | @property(nonatomic,readonly,assign,getter = isActiveWLAN) BOOL activeWLAN; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIImage+GaussianBlur.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+GaussianBlur.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-10-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (GaussianBlur) 12 | 13 | -(UIImage *) imageByGaussianBlurRadius:(CGFloat) radius; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIView+Hidden.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Hidden.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (Hidden) 12 | 13 | -(void) setHidden:(BOOL)hidden animated:(BOOL) animated; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIView+Image.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Image.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-3. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (Image) 12 | 13 | -(UIImage *) toImage; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIView+Image.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Image.m 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-3. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "UIView+Image.h" 10 | 11 | #import 12 | 13 | @implementation UIView (Image) 14 | 15 | -(UIImage *) toImage{ 16 | 17 | CGSize size = self.bounds.size; 18 | 19 | UIGraphicsBeginImageContext(size); 20 | 21 | [self.layer renderInContext:UIGraphicsGetCurrentContext()]; 22 | 23 | UIImage * image = UIGraphicsGetImageFromCurrentImageContext(); 24 | 25 | UIGraphicsEndImageContext(); 26 | 27 | return image; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIView+Search.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Search.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (Search) 12 | 13 | -(NSArray *) searchViewForClass:(Class) clazz; 14 | 15 | -(NSArray *) searchViewForProtocol:(Protocol *) protocol; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIView+VTDataOutlet.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+VTDataOutlet.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-24. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (VTDataOutlet) 12 | 13 | @property(nonatomic,assign,getter = isVisable) BOOL visable; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIView+VTDataOutlet.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+VTDataOutlet.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-24. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "UIView+VTDataOutlet.h" 10 | 11 | @implementation UIView (VTDataOutlet) 12 | 13 | -(void) setVisable:(BOOL)visable{ 14 | [self setHidden:!visable]; 15 | } 16 | 17 | -(BOOL) isVisable{ 18 | return ![self isHidden]; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/UIView+VTStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+VTStyle.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (VTStyle) 12 | 13 | @property(nonatomic,assign) CGFloat cornerRadius; 14 | @property(nonatomic,retain) UIColor * shadowColor; 15 | @property(nonatomic,assign) float shadowOpacity; 16 | @property(nonatomic,assign) CGSize shadowOffset; 17 | @property(nonatomic,assign) CGFloat shadowRadius; 18 | @property(nonatomic,retain) UIImage * backgroundImage; 19 | @property(nonatomic,retain) UIColor * borderColor; 20 | @property(nonatomic,assign) float borderWidth; 21 | @property(nonatomic,retain) NSString * fontName; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAPIRequestTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAPIRequestTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import 13 | 14 | @protocol IVTAPIWillRequestTask 15 | 16 | @property(nonatomic,retain) NSString * apiKey; 17 | @property(nonatomic,retain) NSString * apiUrl; 18 | @property(nonatomic,retain) NSDictionary * queryValues; 19 | @property(nonatomic,retain) VTHttpFormBody * body; 20 | @property(nonatomic,retain) NSString * httpMethod; 21 | @property(nonatomic,retain) NSDictionary * httpHeaders; 22 | 23 | @end 24 | 25 | @protocol IVTAPIRequestTask 26 | 27 | @end 28 | 29 | @interface VTAPIRequestTask : VTAPITask 30 | 31 | 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAPIRequestTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTAPIRequestTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTAPIRequestTask.h" 10 | 11 | @implementation VTAPIRequestTask 12 | 13 | @synthesize apiKey = _apiKey; 14 | @synthesize apiUrl = _apiUrl; 15 | @synthesize queryValues = _queryValues; 16 | @synthesize body = _body; 17 | @synthesize httpHeaders = _httpHeaders; 18 | @synthesize httpMethod = _httpMethod; 19 | 20 | -(void) dealloc{ 21 | [_apiKey release]; 22 | [_apiUrl release]; 23 | [_queryValues release]; 24 | [_body release]; 25 | [_httpMethod release]; 26 | [_httpHeaders release]; 27 | [super dealloc]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAPIResponseTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAPIResponseTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @protocol IVTAPIResponseTask 13 | 14 | @property(nonatomic,retain) id resultsData; 15 | @property(nonatomic,retain) NSError * error; 16 | @property(nonatomic,retain) NSURL * url; 17 | @property(nonatomic,assign) NSInteger statusCode; 18 | @property(nonatomic,retain) NSString * responseUUID; 19 | 20 | @end 21 | 22 | @interface VTAPIResponseTask : VTAPITask 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAPIResponseTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTAPIResponseTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTAPIResponseTask.h" 10 | 11 | @implementation VTAPIResponseTask 12 | 13 | @synthesize resultsData = _resultsData; 14 | @synthesize error = _error; 15 | @synthesize url = _url; 16 | @synthesize statusCode = _statusCode; 17 | @synthesize responseUUID = _responseUUID; 18 | 19 | -(void) dealloc{ 20 | [_resultsData release]; 21 | [_error release]; 22 | [_url release]; 23 | [_responseUUID release]; 24 | [super dealloc]; 25 | } 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAPIService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAPIService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface VTAPIService : VTService 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAPITask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAPITask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | @interface VTAPITask : VTTask 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAPITask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTAPITask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTAPITask.h" 10 | 11 | @implementation VTAPITask 12 | 13 | @synthesize task = _task; 14 | @synthesize taskType = _taskType; 15 | @synthesize userInfo = _userInfo; 16 | 17 | -(void) dealloc{ 18 | [_task release]; 19 | [_userInfo release]; 20 | [super dealloc]; 21 | } 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAction.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-9-7. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTAction : NSObject 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTAction.m 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-9-7. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTAction.h" 10 | 11 | @implementation VTAction 12 | 13 | @synthesize actionName = _actionName; 14 | @synthesize userInfo = _userInfo; 15 | @synthesize actionViews = _actionViews; 16 | 17 | -(void) dealloc{ 18 | [_actionViews release]; 19 | [_actionName release]; 20 | [_userInfo release]; 21 | [super dealloc]; 22 | } 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTActionView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTActionView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-6. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTActionView : UIControl 14 | 15 | @property(nonatomic,retain) UIColor * maskColor; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAlertView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAlertView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTAlertView : UIView 12 | 13 | -(id) initWithTitle:(NSString *) title font:(UIFont *)font size:(CGSize) size edgeInsets:(UIEdgeInsets) edgeInsets; 14 | 15 | -(id) initWithTitle:(NSString *) title; 16 | 17 | -(id) initWithTitle:(NSString *) title edgeInsets:(UIEdgeInsets)edgeInsets; 18 | 19 | -(void) showDuration:(NSTimeInterval) duration; 20 | 21 | -(void) show; 22 | 23 | -(void) close; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAnimationView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAnimationView.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-7-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTAnimationView : UIView 12 | 13 | 14 | - (void)startAnimating; 15 | - (void)stopAnimating; 16 | - (BOOL)isAnimating; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAnimationView.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTAnimationView.m 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-7-14. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTAnimationView.h" 10 | 11 | #import 12 | 13 | @implementation VTAnimationView 14 | 15 | - (id)initWithFrame:(CGRect)frame 16 | { 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | // Initialization code 20 | } 21 | return self; 22 | } 23 | 24 | /* 25 | // Only override drawRect: if you perform custom drawing. 26 | // An empty implementation adversely affects performance during animation. 27 | - (void)drawRect:(CGRect)rect 28 | { 29 | // Drawing code 30 | } 31 | */ 32 | 33 | 34 | - (void)startAnimating{ 35 | 36 | } 37 | 38 | - (void)stopAnimating{ 39 | 40 | } 41 | 42 | - (BOOL)isAnimating{ 43 | return [[self.layer animationKeys] count] >0 ; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAppService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAppService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTAppService : VTUplinkService 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAppStatusView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAppStatusView.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-5. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTAppStatusView : UIWindow 12 | 13 | -(void) show:(BOOL) animated; 14 | 15 | -(void) show:(BOOL) animated duration:(NSTimeInterval) duration; 16 | 17 | -(void) close:(BOOL) animated; 18 | 19 | @end 20 | 21 | @interface VTAppStatusMessageView : VTAppStatusView 22 | 23 | -(id) initWithTitle:(NSString *) title; 24 | 25 | 26 | 27 | @end -------------------------------------------------------------------------------- /vTeam/vTeam/VTAppVersionTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAppVersionTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum _VTAppVersionTaskLevel{ 12 | VTAppVersionTaskLevelNone = 0,VTAppVersionTaskLevelSuggest = 1,VTAppVersionTaskLevelForce = 2 13 | } VTAppVersionTaskLevel; 14 | 15 | @protocol IVTAppVersionTask 16 | 17 | @property(nonatomic,assign) VTAppVersionTaskLevel level; 18 | @property(nonatomic,retain) NSString * content; 19 | @property(nonatomic,retain) NSString * uri; 20 | @property(nonatomic,retain) NSString * version; 21 | 22 | 23 | @end 24 | 25 | @interface VTAppVersionTask : VTUplinkTask 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAppVersionTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTAppVersionTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTAppVersionTask.h" 10 | 11 | @implementation VTAppVersionTask 12 | 13 | @synthesize level = _level; 14 | @synthesize content = _content; 15 | @synthesize uri = _uri; 16 | @synthesize version = _version; 17 | 18 | -(void) dealloc{ 19 | [_version release]; 20 | [_content release]; 21 | [_uri release]; 22 | [super dealloc]; 23 | } 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAudioService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAudioService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-3. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | #import 14 | 15 | @interface VTAudioService : VTService 16 | 17 | -(NSString *) absoluteURL:(NSString *)url; 18 | 19 | -(NSString *) audioLocalFilePath:(NSString *) url; 20 | 21 | -(BOOL) isPlaying:(id) playTask; 22 | 23 | -(BOOL) play:(id) playTask; 24 | 25 | -(void) stop:(id) playTask; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAudioTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTAudioTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-3. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum _VTAudioTaskStatus{ 12 | VTAudioTaskStatusNone,VTAudioTaskStatusLoaded,VTAudioTaskStatusLoading,VTAudioTaskStatusPlaying 13 | } VTAudioTaskStatus; 14 | 15 | @protocol IVTAudioTask 16 | 17 | @property(nonatomic,retain) NSString * url; 18 | @property(nonatomic,assign) VTAudioTaskStatus status; 19 | 20 | @end 21 | 22 | @protocol IVTAudioPlayTask 23 | 24 | @property(nonatomic,assign,getter = isCancelPlay) BOOL cancelPlay; 25 | 26 | @end 27 | 28 | 29 | @interface VTAudioTask : VTTask 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTAudioTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTAudioTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-3. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTAudioTask.h" 10 | 11 | @implementation VTAudioTask 12 | 13 | @synthesize url = _url; 14 | @synthesize status = _status; 15 | @synthesize cancelPlay = _cancelPlay; 16 | 17 | -(void) dealloc{ 18 | [_url release]; 19 | [super dealloc]; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBEEventObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTBEEventObject.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTBEEventObject : VTBehaviorObject 12 | 13 | @property(nonatomic,retain) NSString * session; 14 | @property(nonatomic,retain) NSString * eventId; 15 | @property(nonatomic,retain) NSString * tag; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBEEventObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTBEEventObject.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTBEEventObject.h" 10 | 11 | @implementation VTBEEventObject 12 | 13 | @synthesize session = _session; 14 | @synthesize eventId = _eventId; 15 | @synthesize tag = _tag; 16 | 17 | -(void) dealloc{ 18 | [_session release]; 19 | [_eventId release]; 20 | [_tag release]; 21 | [super dealloc]; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBESessionObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTBESessionObject.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-6. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTBESessionObject : VTBehaviorObject 12 | 13 | @property(nonatomic,retain) NSString * session; 14 | @property(nonatomic,assign) double startTimestamp; 15 | 16 | +(NSString *) genSession; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBESessionObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTBESessionObject.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-6. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTBESessionObject.h" 10 | 11 | #import "NSString+VTMD5String.h" 12 | 13 | @implementation VTBESessionObject 14 | 15 | @synthesize session = _session; 16 | @synthesize startTimestamp = _startTimestamp; 17 | 18 | -(void) dealloc{ 19 | [_session release]; 20 | [super dealloc]; 21 | } 22 | 23 | +(NSString *) genSession{ 24 | return [[[NSUUID UUID] UUIDString] vtMD5String]; 25 | } 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBarButtonItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTBarButtonItem.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface VTBarButtonItem : UIBarButtonItem 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBarButtonItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTBarButtonItem.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTBarButtonItem.h" 10 | 11 | @implementation VTBarButtonItem 12 | 13 | @synthesize actionName = _actionName; 14 | @synthesize userInfo = _userInfo; 15 | @synthesize actionViews = _actionViews; 16 | 17 | -(void) dealloc{ 18 | [_actionViews release]; 19 | [_actionName release]; 20 | [_userInfo release]; 21 | [super dealloc]; 22 | } 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBehaviorObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTBehaviorObject.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-1. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // 行为记录实体 12 | 13 | @interface VTBehaviorObject : VTDBObject 14 | 15 | @property(nonatomic,assign) double timestamp; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBehaviorObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTBehaviorObject.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-1. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTBehaviorObject.h" 10 | 11 | @implementation VTBehaviorObject 12 | 13 | @synthesize timestamp = _timestamp; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBehaviorService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTBehaviorService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-1. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // 行为记录服务 12 | 13 | @interface VTBehaviorService : VTService 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBehaviorTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTBehaviorTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-1. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // 行为记录任务 12 | 13 | @protocol IVTBehaviorTask 14 | 15 | @property(nonatomic,retain) VTBehaviorObject * dataObject; 16 | 17 | @end 18 | 19 | @interface VTBehaviorTask : VTTask 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBehaviorTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTBehaviorTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-1. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTBehaviorTask.h" 10 | 11 | @implementation VTBehaviorTask 12 | 13 | @synthesize dataObject = _dataObject; 14 | 15 | -(void) dealloc{ 16 | [_dataObject release]; 17 | [super dealloc]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTBehaviorTransactionTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTBehaviorTransactionTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-1. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTBehaviorTransactionTask 12 | 13 | -(void) onBehaviorDBContext:(VTDBContext *) dbContext; 14 | 15 | @end 16 | 17 | @interface VTBehaviorTransactionTask : VTTask 18 | 19 | +(id) behaviorTransactionTask:(void (^)(VTDBContext * dbContext)) onBehaviorDBContext; 20 | 21 | +(id) behaviorCleanupTask:(long long) maxRowid tableClass:(Class) tableClass; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTButton.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTButton : UIButton 14 | 15 | @property(nonatomic,retain) UIColor * backgroundColorHighlighted; 16 | @property(nonatomic,retain) UIColor * backgroundColorDisabled; 17 | @property(nonatomic,retain) UIColor * backgroundColorSelected; 18 | 19 | -(UIColor *) backgroundColorForState:(UIControlState) state; 20 | 21 | -(void) setBackgroundColor:(UIColor *) backgroundColor forState:(UIControlState)state; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTCleanupTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTCleanupTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-12-30. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTCleanupTask 12 | 13 | 14 | @end 15 | 16 | @interface VTCleanupTask : VTTask 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTCleanupTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTCleanupTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-12-30. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTCleanupTask.h" 10 | 11 | @implementation VTCleanupTask 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTContainerLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTContainerLayout.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTContainerLayout : NSObject 12 | 13 | @property(nonatomic,assign) IBOutlet id delegate; 14 | @property(nonatomic,retain) NSArray * itemRects; 15 | @property(nonatomic,assign) CGSize size; 16 | @property(nonatomic,assign) CGSize itemSize; 17 | 18 | -(void) reloadData; 19 | 20 | -(CGRect) itemRectAtIndex:(NSInteger) index; 21 | 22 | @end 23 | 24 | @protocol VTContainerLayoutDelegate 25 | 26 | -(NSInteger) numberOfVTContainerLayout:(VTContainerLayout *) containerLayout; 27 | 28 | @optional 29 | 30 | -(CGSize) vtContainerLayout:(VTContainerLayout *) containerLayout itemSizeAtIndex:(NSInteger) index; 31 | 32 | -(UIEdgeInsets) vtContainerLayout:(VTContainerLayout *) containerLayout itemMarginAtIndex:(NSInteger) index; 33 | 34 | @end -------------------------------------------------------------------------------- /vTeam/vTeam/VTContainerLayout.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTContainerLayout.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTContainerLayout.h" 10 | 11 | @implementation VTContainerLayout 12 | 13 | @synthesize itemRects = _itemRects; 14 | @synthesize delegate = _delegate; 15 | @synthesize size = _size; 16 | @synthesize itemSize = _itemSize; 17 | 18 | -(void) dealloc{ 19 | [_itemRects release]; 20 | [super dealloc]; 21 | } 22 | 23 | -(void) reloadData{ 24 | 25 | } 26 | 27 | -(CGRect) itemRectAtIndex:(NSInteger) index{ 28 | if(index >=0 && index < [_itemRects count]){ 29 | return [[_itemRects objectAtIndex:index] CGRectValue]; 30 | } 31 | return CGRectZero; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTContentViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTContentViewController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTContentViewController : VTViewController 12 | 13 | @property(nonatomic,retain) IBOutlet UIView * contentView; 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-10-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTController : NSObject 14 | 15 | @property(nonatomic,assign) NSInteger tag; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTController.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTController.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-10-9. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTController.h" 10 | 11 | @implementation VTController 12 | 13 | @synthesize context = _context; 14 | @synthesize delegate = _delegate; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTCrashService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTCrashService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-15. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTCrashService : VTService 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTCrashTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTCrashTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-15. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTCrashTask 12 | 13 | @property(nonatomic,retain) NSException * exception; 14 | 15 | @end 16 | 17 | @interface VTCrashTask : VTTask 18 | 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTCrashTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTCrashTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-15. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTCrashTask.h" 10 | 11 | @implementation VTCrashTask 12 | 13 | @synthesize exception = _exception; 14 | 15 | -(void) dealloc{ 16 | [_exception release]; 17 | [super dealloc]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTCreatorViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTCreatorViewController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-5. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTCreatorViewController : UIViewController 12 | 13 | @property(nonatomic,retain) IBOutlet id viewController; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTCreatorViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTCreatorViewController.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-5. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTCreatorViewController.h" 10 | 11 | @interface VTCreatorViewController () 12 | 13 | @end 14 | 15 | @implementation VTCreatorViewController 16 | 17 | @synthesize viewController = _viewController; 18 | 19 | -(void) dealloc{ 20 | [_viewController release]; 21 | [super dealloc]; 22 | } 23 | 24 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 25 | { 26 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 27 | if (self) { 28 | // Custom initialization 29 | } 30 | return self; 31 | } 32 | 33 | - (void)viewDidLoad 34 | { 35 | [super viewDidLoad]; 36 | // Do any additional setup after loading the view. 37 | } 38 | 39 | - (void)didReceiveMemoryWarning 40 | { 41 | [super didReceiveMemoryWarning]; 42 | // Dispose of any resources that can be recreated. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTDBContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDBContext.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTDBContext : NSObject 15 | 16 | @property(nonatomic,retain) VTSqlite * db; 17 | 18 | -(void) regDBObjectClass:(Class) dbObjectClass; 19 | 20 | -(NSString *) insertObjectSQL:(Class) dbObjectClass; 21 | 22 | -(NSString *) deleteObjectSQL:(Class) dbObjectClass; 23 | 24 | -(NSString *) updateObjectSQL:(Class) dbObjectClass; 25 | 26 | -(BOOL) insertObject:(VTDBObject *) dbObject; 27 | 28 | -(BOOL) deleteObject:(VTDBObject *) dbObject; 29 | 30 | -(BOOL) updateObject:(VTDBObject *) dbObject; 31 | 32 | -(void) setObject:(VTDBObject *) dbObject; 33 | 34 | -(void) removeObject:(VTDBObject *) dbObject; 35 | 36 | -(void) removeObjects:(Class) dbObjectClass; 37 | 38 | -(NSSet *) queryObjects:(Class) dbObjectClass; 39 | 40 | -(id) query:(Class) dbObjectClass sql:(NSString *) sql data:(id) data; 41 | 42 | -(id) valueForKey:(NSString *)key; 43 | 44 | -(void) setValue:(id)value forKey:(NSString *)key; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTDBDataContext.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDBDataContext.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-4-3. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | extern NSString * VTDBDataObjectChangedNotification; 14 | extern NSString * VTDBDataObjectSetKey; 15 | 16 | @interface VTDBDataContext : VTDBContext 17 | 18 | -(id) dataObjectForKey:(NSString *) key tableClass:(Class) tableClass; 19 | 20 | -(id) dataObjectForCacheKey:(NSString *) key tableClass:(Class) tableClass; 21 | 22 | -(void) setDataObject:(VTDBDataObject *) dataObject; 23 | 24 | -(BOOL) fillDataObject:(VTDBDataObject *) dataObject; 25 | 26 | -(NSSet *) dataObjects:(Class) tableClass; 27 | 28 | -(NSArray *) dataKeys:(Class) tableClass query:(NSString *) query data:(id) data; 29 | 30 | -(void) beginUpdate; 31 | 32 | -(void) endUpdate; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTDBDataObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDBDataObject.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-4-3. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDBDataObject : VTDBObject 12 | 13 | +(NSString *) dataKey; 14 | 15 | -(NSString *) dataKey; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTDBDataObject.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTDBDataObject.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-4-3. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTDBDataObject.h" 10 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTDBObject.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDBObject.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | typedef struct _VTDBObjectIndex{ 13 | char name[NAME_MAX]; 14 | char desc; 15 | } VTDBObjectIndex; 16 | 17 | @interface VTDBObject : NSObject 18 | 19 | @property(nonatomic,assign) long long rowid; 20 | 21 | +(Class) tableClass; 22 | 23 | +(VTDBObjectIndex *) tableIndexs:(int *) length; 24 | 25 | -(NSMutableDictionary *) toDictionary; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTDataOutletContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDataOutletContainer.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTDataOutletContainer : NSObject 14 | 15 | @property(nonatomic,retain) NSString * status; 16 | @property(nonatomic,retain) IBOutletCollection(VTDataOutlet) NSArray * dataOutlets; 17 | 18 | -(void) applyDataOutlet:(id) data; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTDocumentViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDocumentViewController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-8-15. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTDocumentViewController : VTViewController 12 | 13 | @property(nonatomic,retain) NSString * html; 14 | @property(nonatomic,retain) IBOutlet VTDOMView * documentView; 15 | @property(nonatomic,retain) VTDOMDocument * document; 16 | 17 | -(void) reloadData; 18 | 19 | -(NSString *) htmlContent; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTDownlinkService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTDownlinkService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTService.h" 10 | 11 | #import 12 | 13 | @interface VTDownlinkService : VTService 14 | 15 | 16 | -(void) vtDownlinkTaskDidLoadedFromCache:(id) downlinkTask forTaskType:(Protocol *) taskType; 17 | 18 | -(void) vtDownlinkTask:(id) downlinkTask didResponse:(id) data isCache:(BOOL) isCache forTaskType:(Protocol *) taskType; 19 | 20 | -(void) vtDownlinkTask:(id) downlinkTask didResponse:(id) data isCache:(BOOL) isCache responseUUID:(NSString *) responseUUID forTaskType:(Protocol *) taskType; 21 | 22 | -(void) vtDownlinkTask:(id) downlinkTask didFitalError:(NSError *) error forTaskType:(Protocol *) taskType; 23 | 24 | -(NSString *) dataKey:(id) task forTaskType:(Protocol *) taskType; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFallsContainerLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFallsContainerLayout.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define VTFallsContainerLayoutMaxColumns 10 12 | 13 | @interface VTFallsContainerLayout : VTContainerLayout 14 | 15 | @property(nonatomic,assign) NSInteger numberOfColumn; 16 | @property(nonatomic,assign) CGFloat columnSplitWidth; 17 | @property(nonatomic,assign) CGFloat columnTopHeight; 18 | @property(nonatomic,readonly) CGFloat columnWidth; 19 | 20 | @end 21 | 22 | @protocol VTFallsContainerLayoutDelegate 23 | 24 | @optional 25 | 26 | -(BOOL) vtFallsContainerLayout:(VTFallsContainerLayout *) containerLayout isFillWidthAtIndex:(NSInteger) index; 27 | 28 | @end -------------------------------------------------------------------------------- /vTeam/vTeam/VTFeedbackService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFeedbackService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTFeedbackService : VTUplinkService 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFeedbackTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFeedbackTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTFeedbackTask 12 | 13 | @property(nonatomic,retain) NSString * body; 14 | 15 | @end 16 | 17 | @interface VTFeedbackTask : VTUplinkTask 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFeedbackTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTFeedbackTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-3-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTFeedbackTask.h" 10 | 11 | @implementation VTFeedbackTask 12 | 13 | @synthesize body = _body; 14 | 15 | -(void) dealloc{ 16 | [_body release]; 17 | [super dealloc]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFlowContainerLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFlowContainerLayout.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTFlowContainerLayout : VTContainerLayout 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFlowViewLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFlowViewLayout.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-24. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTViewLayout.h" 10 | 11 | @interface VTFlowViewLayout : VTViewLayout 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFoldViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFoldViewController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString * VTFoldViewControllerToCenterNotification; 12 | 13 | @interface VTFoldViewController : VTViewController 14 | 15 | @property(nonatomic,readonly,getter = isAnimating) BOOL animating; 16 | @property(nonatomic,readonly,getter=isDragging) BOOL dragging; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFormButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFormButton.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTFormButton : UIButton 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFormButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTFormButton.m 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTFormButton.h" 10 | 11 | @implementation VTFormButton 12 | 13 | @synthesize value = _value; 14 | 15 | - (id)initWithFrame:(CGRect)frame 16 | { 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | // Initialization code 20 | } 21 | return self; 22 | } 23 | 24 | /* 25 | // Only override drawRect: if you perform custom drawing. 26 | // An empty implementation adversely affects performance during animation. 27 | - (void)drawRect:(CGRect)rect 28 | { 29 | // Drawing code 30 | } 31 | */ 32 | 33 | -(NSString *)text{ 34 | return [self titleForState:UIControlStateNormal]; 35 | } 36 | 37 | -(void) setText:(NSString *)text{ 38 | [self setTitle:text forState:UIControlStateNormal]; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFormController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFormController.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTFormController : NSObject 15 | 16 | @property(nonatomic,retain) VTFormItem * focusFormItem; 17 | @property(nonatomic,retain) id focusEditor; 18 | @property(nonatomic,retain) IBOutletCollection(VTFormItem) NSArray * formItems; 19 | @property(nonatomic,retain) IBOutletCollection(id) NSArray * editors; 20 | 21 | @property(nonatomic,copy) id formValues; 22 | 23 | @end -------------------------------------------------------------------------------- /vTeam/vTeam/VTFormDateEditor.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFormDateEditor.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTFormDateEditor : NSObject 14 | 15 | @property(nonatomic,retain) IBOutlet UIView * view; 16 | @property(nonatomic,retain) IBOutlet UIDatePicker * datePicker; 17 | @property(nonatomic,retain) NSString * dateFormat; 18 | 19 | -(IBAction) doOKAction:(id)sender; 20 | 21 | -(IBAction) doCancelAction:(id)sender; 22 | 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFormItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFormItem.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTFormItem : NSObject 14 | 15 | @property(nonatomic,retain) IBOutlet UIView * view; 16 | @property(nonatomic,assign) NSUInteger length; 17 | @property(nonatomic,assign) IBOutlet id delegate; 18 | @property(nonatomic,retain) NSString * editorType; 19 | @property(nonatomic,retain) id value; 20 | @property(nonatomic,retain) NSString * text; 21 | @property(nonatomic,readonly,getter = isEmpty) BOOL empty; 22 | @property(nonatomic,assign,getter = isFocus) BOOL focus; 23 | @property(nonatomic,retain) NSString * tip; 24 | @property(nonatomic,retain) NSString * field; 25 | 26 | -(IBAction) doFocusAction:(id)sender; 27 | 28 | -(void) focusCancel; 29 | 30 | @end 31 | 32 | @protocol VTFormItemDelegate 33 | 34 | @optional 35 | 36 | -(void) vtFormItemOnFocusAction:(VTFormItem *) formItem; 37 | 38 | -(void) vtFormItemOnFocusCancel:(VTFormItem *) formItem; 39 | 40 | @end -------------------------------------------------------------------------------- /vTeam/vTeam/VTFormKeyboardEditor.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFormKeyboardEditor.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTFormKeyboardEditor : NSObject 15 | 16 | @property(nonatomic,retain) IBOutlet UIView * view; 17 | @property(nonatomic,retain) IBOutlet UILabel * tipLabel; 18 | @property(nonatomic,retain) IBOutlet UILabel * lengthLabel; 19 | 20 | -(IBAction) doCloseAction:(id)sender; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFormPickerEditor.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFormPickerEditor.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTFormPickerEditor : NSObject 15 | 16 | @property(nonatomic,assign) NSUInteger numberOfColumns; 17 | @property(nonatomic,retain) IBOutletCollection(VTFormPickerEditorItem) NSArray * items; 18 | @property(nonatomic,retain) IBOutlet UIView * view; 19 | @property(nonatomic,retain) IBOutlet UIPickerView * pickerView; 20 | 21 | -(IBAction) doOKAction:(id)sender; 22 | 23 | -(IBAction) doCancelAction:(id)sender; 24 | 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFormPickerEditorItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTFormPickerEditorItem.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTFormPickerEditorItem : NSObject 12 | 13 | @property(nonatomic,retain) id value; 14 | @property(nonatomic,retain) NSString * text; 15 | @property(nonatomic,retain) IBOutletCollection(VTFormPickerEditorItem) NSArray * items; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTFormPickerEditorItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTFormPickerEditorItem.m 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTFormPickerEditorItem.h" 10 | 11 | @implementation VTFormPickerEditorItem 12 | 13 | @synthesize value = _value; 14 | @synthesize text = _text; 15 | @synthesize items = _items; 16 | 17 | -(void) dealloc{ 18 | [_value release]; 19 | [_text release]; 20 | [_items release]; 21 | [super dealloc]; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTGatherService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTGatherService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-4-3. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTGatherService : VTUplinkService 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTGatherTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTGatherTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-4-3. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol IVTGatherTask 12 | 13 | // 主任务 14 | @property(nonatomic,assign) Protocol * taskType; 15 | @property(nonatomic,retain) id task; 16 | 17 | // 子任务 18 | @property(nonatomic,readonly) NSArray * taskTypes; 19 | @property(nonatomic,readonly) NSArray * tasks; 20 | 21 | -(void) addTask:(id) task taskType:(Protocol *) taskType; 22 | 23 | @end 24 | 25 | @interface VTGatherTask : VTUplinkTask 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTGatherTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTGatherTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-4-3. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTGatherTask.h" 10 | 11 | 12 | @implementation VTGatherTask 13 | 14 | @synthesize taskType = _taskType; 15 | @synthesize task = _task; 16 | @synthesize taskTypes = _taskTypes; 17 | @synthesize tasks = _tasks; 18 | 19 | -(void) dealloc{ 20 | [_task release]; 21 | [_tasks release]; 22 | [_taskTypes release]; 23 | [super dealloc]; 24 | } 25 | 26 | -(void) addTask:(id)task taskType:(Protocol *)taskType{ 27 | 28 | if(task && taskType){ 29 | 30 | if(_taskTypes == nil){ 31 | _taskTypes = [[NSMutableArray alloc] initWithCapacity:4]; 32 | } 33 | 34 | if(_tasks == nil){ 35 | _tasks = [[NSMutableArray alloc] initWithCapacity:4]; 36 | } 37 | 38 | [(NSMutableArray *) _taskTypes addObject:[NSValue valueWithPointer:taskType]]; 39 | [(NSMutableArray *) _tasks addObject:task]; 40 | 41 | [task setSource:self.source]; 42 | [task setDelegate:self]; 43 | } 44 | 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTHeapViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTHeapViewController.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTHeapViewController : VTViewController 12 | 13 | @property(nonatomic,assign,getter = isAnimating) BOOL animating; 14 | 15 | @property(nonatomic,readonly) UIViewController * topViewController; 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTHtmlDataController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTHtmlDataController.h 3 | // vTeam 4 | // 5 | // Created by shenyu on 13-9-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTHtmlDataController : VTDataController 12 | 13 | @property(nonatomic,retain) IBOutlet UIWebView * webView; 14 | 15 | - (void)setShowShadows:(BOOL)bShow; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTHtmlDataController.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTHtmlDataController.m 3 | // vTeam 4 | // 5 | // Created by shenyue on 13-9-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTHtmlDataController.h" 10 | 11 | @implementation VTHtmlDataController 12 | @synthesize webView = _webView; 13 | 14 | -(void)dealloc 15 | { 16 | [_webView setDelegate:nil]; 17 | [_webView stopLoading]; 18 | [_webView release]; 19 | [super dealloc]; 20 | } 21 | 22 | - (void)setShowShadows:(BOOL)bShow; 23 | { 24 | // Reference: http://stackoverflow.com/questions/1074320/remove-uiwebview-shadow 25 | 26 | // 遍历UIScrollView隐藏阴影. 27 | for (UIView *inScrollView in [_webView subviews]) 28 | { 29 | if ([inScrollView isKindOfClass:[UIImageView class]]) 30 | { 31 | inScrollView.hidden = !bShow; 32 | } 33 | } 34 | 35 | for (UIView *inScrollView in [[_webView subviews][0] subviews]) 36 | { 37 | if ([inScrollView isKindOfClass:[UIImageView class]]) 38 | { 39 | inScrollView.hidden = !bShow; 40 | } 41 | } 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTHttpService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTHttpService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTHttpService : VTService 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTImageService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTImageService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTImageService : VTService 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTImageView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTImageView : UIImageView 14 | 15 | @property(nonatomic,retain) UIImage * defaultImage; 16 | @property(nonatomic,assign,getter = isFitWidth) BOOL fitWidth; 17 | @property(nonatomic,assign,getter = isFitHeight) BOOL fitHeight; 18 | @property(nonatomic,assign) CGFloat maxWidth; 19 | @property(nonatomic,assign) CGFloat maxHeight; 20 | @property(nonatomic,assign) CGFloat minWidth; 21 | @property(nonatomic,assign) CGFloat minHeight; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTJSON.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTJSON.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTJSON : NSObject 12 | 13 | +(id) decodeText:(NSString *) text; 14 | 15 | +(NSString *) encodeObject:(id) object; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTKeyboardController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTKeyboardController.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTKeyboardController : VTController 14 | 15 | @end 16 | 17 | @protocol VTKeyboardControllerDelegate 18 | 19 | @optional 20 | 21 | -(void) vtKeyboardController:(VTKeyboardController * )controller willShowFrame:(CGRect) frame; 22 | -(void) vtKeyboardController:(VTKeyboardController * )controller didShowFrame:(CGRect) frame; 23 | -(void) vtKeyboardController:(VTKeyboardController * )controller willHideFrame:(CGRect) frame; 24 | -(void) vtKeyboardController:(VTKeyboardController * )controller didHideFrame:(CGRect) frame; 25 | -(void) vtKeyboardController:(VTKeyboardController * )controller willChangedFrame:(CGRect) frame; 26 | -(void) vtKeyboardController:(VTKeyboardController * )controller didChangedFrame:(CGRect) frame; 27 | 28 | @end -------------------------------------------------------------------------------- /vTeam/vTeam/VTLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTLayout.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTLayout : NSObject{ 14 | 15 | } 16 | 17 | @property(nonatomic,assign) CGSize contentSize; 18 | 19 | -(void) layout; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTLayout.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTLayout.m 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTLayout.h" 10 | 11 | @implementation VTLayout 12 | 13 | @synthesize contentSize = _contentSize; 14 | 15 | -(void) layout{ 16 | 17 | } 18 | 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTLayoutContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTLayoutContainer.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTLayoutContainer : NSObject 14 | 15 | @property(nonatomic,retain) VTLayout * rootLayout; 16 | @property(nonatomic,retain) IBOutletCollection(VTLayout) NSArray * layouts; 17 | 18 | -(void) layout; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTLayoutContainer.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTLayoutContainer.m 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTLayoutContainer.h" 10 | 11 | @implementation VTLayoutContainer 12 | 13 | @synthesize layouts = _layouts; 14 | @synthesize rootLayout = _rootLayout; 15 | 16 | -(void) dealloc{ 17 | [_layouts release]; 18 | [_rootLayout release]; 19 | [super dealloc]; 20 | } 21 | 22 | -(void) layout{ 23 | for(id layout in _layouts){ 24 | [layout layout]; 25 | } 26 | } 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTLayoutData.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTLayoutData.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTLayoutData : NSObject 12 | 13 | @property(nonatomic,retain) IBOutlet UIView * view; 14 | @property(nonatomic,retain) id width; 15 | @property(nonatomic,retain) id height; 16 | @property(nonatomic,retain) id left; 17 | @property(nonatomic,retain) id right; 18 | @property(nonatomic,retain) id top; 19 | @property(nonatomic,retain) id bottom; 20 | @property(nonatomic,retain) id minWidth; 21 | @property(nonatomic,retain) id maxWidth; 22 | @property(nonatomic,retain) id minHeight; 23 | @property(nonatomic,retain) id maxHeight; 24 | @property(nonatomic,assign) BOOL widthToFit; 25 | @property(nonatomic,assign) BOOL heightToFit; 26 | 27 | -(CGRect) frameOfSize:(CGSize) size; 28 | 29 | -(CGFloat) value:(id) value ofBase:(CGFloat) baseValue; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTMonitorService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTMonitorService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-19. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | // Task 监测服务 12 | 13 | @interface VTMonitorService : VTService 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTNavigationBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTNavigationBar.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTNavigationBar : UINavigationBar 12 | 13 | @property(nonatomic,retain) UIImage * backgroundImage; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTNavigationBar.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTNavigationBar.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTNavigationBar.h" 10 | 11 | @implementation VTNavigationBar 12 | 13 | @synthesize backgroundImage = _backgroundImage; 14 | 15 | -(void) dealloc{ 16 | [_backgroundImage release]; 17 | [super dealloc]; 18 | } 19 | 20 | 21 | -(void) drawRect:(CGRect)rect{ 22 | [super drawRect:rect]; 23 | if(_backgroundImage){ 24 | [_backgroundImage drawInRect:rect]; 25 | } 26 | } 27 | 28 | 29 | -(void) setBackgroundImage:(UIImage *)backgroundImage{ 30 | if(_backgroundImage != backgroundImage){ 31 | [_backgroundImage release]; 32 | _backgroundImage = [backgroundImage retain]; 33 | [self setNeedsDisplay]; 34 | } 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTNavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTNavigationController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTNavigationController : UINavigationController 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTPageContainerLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTPageContainerLayout.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTPageContainerLayout : VTContainerLayout 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTPageContainerLayout.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTPageContainerLayout.m 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTPageContainerLayout.h" 10 | 11 | @implementation VTPageContainerLayout 12 | 13 | -(void) reloadData{ 14 | 15 | NSMutableArray * itemRects = [NSMutableArray arrayWithCapacity:4]; 16 | 17 | NSInteger c = [self.delegate numberOfVTContainerLayout:self]; 18 | 19 | CGSize size = self.size; 20 | 21 | for(int i=0;i 10 | 11 | #import 12 | 13 | @interface VTPageDataSource : VTDataSource 14 | 15 | @property(nonatomic,assign) NSInteger pageIndex; 16 | @property(nonatomic,assign) NSInteger pageSize; 17 | @property(nonatomic,assign) BOOL hasMoreData; 18 | 19 | -(void) loadMoreData; 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTPopWindow.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTWindow.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-31. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTPopWindow : UIWindow 12 | 13 | @property(nonatomic,readonly,getter = isAnimating) BOOL animating; 14 | 15 | +(VTPopWindow *) popWindow; 16 | 17 | +(VTPopWindow *) topPopWindow; 18 | 19 | -(void) showAnimated:(BOOL) animated; 20 | 21 | -(void) closeAnimated:(BOOL) animated; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTReportDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTReportDocument.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-8. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | struct _ReportDocument; 12 | 13 | @interface VTReportDocument : NSObject 14 | 15 | @property(nonatomic,readonly) struct _ReportDocument * cDocument; 16 | 17 | -(id) initWithFilePath:(NSString *) filePath; 18 | 19 | -(id) initWithData:(NSData *) data; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTScrollView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTScrollView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTScrollView : UIScrollView 12 | 13 | @end 14 | 15 | @protocol VTScrollViewDelegate 16 | 17 | @optional 18 | 19 | -(void) scrollView:(UIScrollView *) scrollView didContentOffsetChanged:(CGPoint) contentOffset; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTScrollView.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTScrollView.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTScrollView.h" 10 | 11 | @implementation VTScrollView 12 | 13 | - (id)initWithFrame:(CGRect)frame 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) { 17 | // Initialization code 18 | } 19 | return self; 20 | } 21 | 22 | /* 23 | // Only override drawRect: if you perform custom drawing. 24 | // An empty implementation adversely affects performance during animation. 25 | - (void)drawRect:(CGRect)rect 26 | { 27 | // Drawing code 28 | } 29 | */ 30 | 31 | -(void) setContentOffset:(CGPoint)contentOffset{ 32 | [super setContentOffset:contentOffset]; 33 | if([self.delegate respondsToSelector:@selector(scrollView:didContentOffsetChanged:)]){ 34 | [(id)self.delegate scrollView:self didContentOffsetChanged:self.contentOffset]; 35 | } 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTService : NSObject 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTService.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTService.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTService.h" 10 | 11 | @implementation VTService 12 | 13 | @synthesize config = _config; 14 | @synthesize context = _context; 15 | 16 | -(void) dealloc{ 17 | [_config release]; 18 | [super dealloc]; 19 | } 20 | 21 | -(BOOL) handle:(Protocol *)taskType task:(id)task priority:(NSInteger)priority{ 22 | return NO; 23 | } 24 | 25 | -(BOOL) cancelHandle:(Protocol *)taskType task:(id)task{ 26 | return NO; 27 | } 28 | 29 | -(BOOL) cancelHandleForSource:(id) source{ 30 | return NO; 31 | } 32 | 33 | -(void) didReceiveMemoryWarning{ 34 | 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTShell.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTShell.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-24. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTShell : NSObject 15 | 16 | @property(nonatomic,readonly) id config; 17 | 18 | -(id) initWithConfig:(id) config bundle:(NSBundle *) bundle; 19 | 20 | -(id) rootViewController; 21 | 22 | -(void) didReceiveMemoryWarning; 23 | 24 | -(id) addService:(Class) serviceClass; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStatusDataSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTStatusDataSource.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-6. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface VTStatusDataSource : VTPageDataSource 13 | 14 | @property(nonatomic,retain) NSString * status; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStatusDataSource.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTStatusDataSource.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-6. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTStatusDataSource.h" 10 | 11 | @implementation VTStatusDataSource 12 | 13 | @synthesize status = _status; 14 | 15 | -(void) dealloc{ 16 | [_status release]; 17 | [super dealloc]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStatusGatherDataSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTStatusGatherDataSource.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-6. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTStatusGatherDataSource : VTStatusDataSource 12 | 13 | @property(nonatomic,retain) IBOutletCollection(VTStatusDataSource) NSArray * dataSources; 14 | @property(nonatomic,readonly) VTStatusDataSource * dataSource; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStatusView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTStatusView.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-6-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTStatusViewItem : NSObject 12 | 13 | @property(nonatomic,retain) NSString * status; 14 | @property(nonatomic,retain) IBOutletCollection(UIView) NSArray * views; 15 | 16 | @end 17 | 18 | @interface VTStatusView : UIView 19 | 20 | @property(nonatomic,retain) NSString * status; 21 | @property(nonatomic,retain) IBOutletCollection(VTStatusViewItem) NSArray * statusItems; 22 | 23 | -(void) setStatus:(NSString *)status animated:(BOOL) animated; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTStyle.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class VTStyleSheet; 12 | 13 | @interface VTStyle : NSObject 14 | 15 | @property(nonatomic,retain) NSString * name; 16 | @property(nonatomic,retain) NSString * key; 17 | @property(nonatomic,retain) id value; 18 | @property(nonatomic,retain) NSString * imageValue; 19 | @property(nonatomic,retain) NSString * fontValue; 20 | @property(nonatomic,retain) NSString * edgeValue; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStyle.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTStyle.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @implementation VTStyle 12 | 13 | 14 | @synthesize name = _name; 15 | @synthesize key = _key; 16 | @synthesize value = _value; 17 | @synthesize imageValue = _imageValue; 18 | @synthesize fontValue = _fontValue; 19 | @synthesize edgeValue = _edgeValue; 20 | 21 | -(void) dealloc{ 22 | [_name release]; 23 | [_key release]; 24 | [_value release]; 25 | [_imageValue release]; 26 | [_fontValue release]; 27 | [super dealloc]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStyleController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTStyleSheetController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-31. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTStyleController : UIViewController 14 | 15 | @property(nonatomic,retain) IBOutletCollection(VTStyle) NSArray * styles; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStyleController.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTStyleSheetController.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-31. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTStyleController.h" 10 | 11 | @interface VTStyleController () 12 | 13 | @end 14 | 15 | @implementation VTStyleController 16 | 17 | @synthesize styles = _styles; 18 | 19 | -(void) dealloc{ 20 | [_styles release]; 21 | [super dealloc]; 22 | } 23 | 24 | 25 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 26 | { 27 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 28 | if (self) { 29 | // Custom initialization 30 | } 31 | return self; 32 | } 33 | 34 | - (void)viewDidLoad 35 | { 36 | [super viewDidLoad]; 37 | // Do any additional setup after loading the view. 38 | } 39 | 40 | - (void)didReceiveMemoryWarning 41 | { 42 | [super didReceiveMemoryWarning]; 43 | // Dispose of any resources that can be recreated. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStyleOutlet.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTStyleOutlet.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class VTStyleSheet; 12 | 13 | @interface VTStyleOutlet : NSObject 14 | 15 | @property(nonatomic,retain) NSString * status; 16 | @property(nonatomic,assign) VTStyleSheet * styleSheet; 17 | @property(nonatomic,retain) IBOutletCollection(NSObject) NSArray * views; 18 | @property(nonatomic,retain) NSString * styleName; 19 | @property(nonatomic,assign) NSInteger version; 20 | 21 | -(void) applyStyle; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStyleOutletContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTStyleContainer.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTStyleOutletContainer : NSObject 15 | 16 | @property(nonatomic,retain) NSString * status; 17 | @property(nonatomic,retain) IBOutletCollection(VTStyleOutlet) NSArray * styles; 18 | @property(nonatomic,retain) VTStyleSheet * styleSheet; 19 | 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTStyleSheet.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTStyleSheet.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTStyleSheet : NSObject 15 | 16 | @property(nonatomic,assign) NSInteger version; 17 | @property(nonatomic,retain) VTStyleController * styleController; 18 | 19 | -(NSDictionary *) selectorStyle:(NSString *) styleName; 20 | 21 | -(UIColor *) styleValueColor:(NSString *) value; 22 | 23 | -(UIFont *) styleValueFont:(NSString *) value; 24 | 25 | -(CGFloat) styleValueFloat:(NSString *) value; 26 | 27 | -(UIImage *) styleValueImage:(NSString *) image; 28 | 29 | -(void) didReceiveMemoryWarning; 30 | 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTabBar.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTTabBar.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-5. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTTabBar : UITabBar 12 | 13 | @property(nonatomic,retain) UIImage * backgroundImage; 14 | @property(nonatomic,assign) NSUInteger selectedIndex; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTabBar.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTTabBar.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-5. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTTabBar.h" 10 | 11 | @implementation VTTabBar 12 | 13 | @synthesize backgroundImage = _backgroundImage; 14 | 15 | -(void) dealloc{ 16 | [_backgroundImage release]; 17 | [super dealloc]; 18 | } 19 | 20 | 21 | -(void) drawRect:(CGRect)rect{ 22 | [super drawRect:rect]; 23 | if(_backgroundImage){ 24 | [_backgroundImage drawInRect:rect]; 25 | } 26 | } 27 | 28 | 29 | -(void) setBackgroundImage:(UIImage *)backgroundImage{ 30 | if(_backgroundImage != backgroundImage){ 31 | [_backgroundImage release]; 32 | _backgroundImage = [backgroundImage retain]; 33 | [self setNeedsDisplay]; 34 | } 35 | } 36 | 37 | -(NSUInteger) selectedIndex{ 38 | return [[self items] indexOfObject:self.selectedItem]; 39 | } 40 | 41 | -(void) setSelectedIndex:(NSUInteger)selectedIndex{ 42 | if(selectedIndex < [self.items count]){ 43 | [self setSelectedItem:[self.items objectAtIndex:selectedIndex]]; 44 | } 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTabBarController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTTabBarController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-5. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTTabBarController : UITabBarController 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTabBarItem.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTTabBarItem.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-5. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | 14 | @interface VTTabBarItem : UITabBarItem 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTabBarItem.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTTabBarItem.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-5. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTTabBarItem.h" 10 | 11 | @implementation VTTabBarItem 12 | 13 | @synthesize actionName = _actionName; 14 | @synthesize userInfo = _userInfo; 15 | @synthesize actionViews = _actionViews; 16 | 17 | -(void) dealloc{ 18 | [_actionViews release]; 19 | [_actionName release]; 20 | [_userInfo release]; 21 | [super dealloc]; 22 | } 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTabPageDataController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTTabPageDataController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-12. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTTabPageDataController : VTTabDataController 12 | 13 | @property(nonatomic,retain) IBOutlet UIScrollView * pageContentView; 14 | @property(nonatomic,retain) IBOutlet UIView * tabBackgroundView; 15 | @property(nonatomic,assign) CGFloat leftSpaceWidth; 16 | @property(nonatomic,assign) CGFloat rightSpaceWidth; 17 | 18 | -(void) scrollToTabButton:(NSUInteger) index; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTabViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTTabViewController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-7-5. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTTabViewController : VTViewController 12 | 13 | @property(nonatomic,retain) IBOutlet UIView * contentView; 14 | @property(nonatomic,retain) IBOutlet UIView * tabView; 15 | @property(nonatomic,retain) IBOutletCollection(UIButton) NSArray * tabButtons; 16 | @property(nonatomic,readonly) UIViewController * selectedViewController; 17 | @property(nonatomic,retain) NSArray * viewControllers; 18 | @property(nonatomic,assign) NSUInteger selectedIndex; 19 | @property(nonatomic,readonly) UIButton * selectedTabButton; 20 | 21 | -(IBAction) doTabAction:(id) sender; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTableSection.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTTableSection.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTTableSection : NSObject 12 | 13 | @property(nonatomic,retain) NSString * title; 14 | @property(nonatomic,assign) CGFloat height; 15 | @property(nonatomic,retain) IBOutlet UIView * view; 16 | @property(nonatomic,retain) IBOutlet UIView * footerView; 17 | @property(nonatomic,retain) IBOutletCollection(UITableViewCell) NSArray * cells; 18 | @property(nonatomic,assign) NSInteger tag; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTableSection.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTTableSection.m 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTTableSection.h" 10 | 11 | @implementation VTTableSection 12 | 13 | @synthesize height= _height; 14 | @synthesize title = _title; 15 | @synthesize view = _view; 16 | @synthesize cells = _cells; 17 | @synthesize footerView = _footerView; 18 | @synthesize tag = _tag; 19 | 20 | -(void) dealloc{ 21 | [_title release]; 22 | [_view release]; 23 | [_cells release]; 24 | [_footerView release]; 25 | [super dealloc]; 26 | } 27 | 28 | -(void) setCells:(NSArray *)cells{ 29 | NSArray * c = [cells sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) { 30 | NSInteger tag1 = [(UIView *) obj1 tag]; 31 | NSInteger tag2 = [(UIView *) obj2 tag]; 32 | NSInteger r = tag1 - tag2; 33 | 34 | if(r < 0){ 35 | return NSOrderedAscending; 36 | } 37 | if(r > 0){ 38 | return NSOrderedDescending; 39 | } 40 | return NSOrderedSame; 41 | }]; 42 | [_cells release]; 43 | _cells = [c retain]; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTableSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTTableSource.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-4. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | 14 | @interface VTTableSource : VTController 15 | 16 | @property(nonatomic,retain) IBOutletCollection(VTTableSection) NSArray * sections; 17 | 18 | @end 19 | 20 | @protocol VTTableSourceDelegate 21 | 22 | @optional 23 | 24 | -(void) vtTableSource:(VTTableSource *) tableSource tableView:(UITableView *) tableView didSelectRowAtIndexPath:(NSIndexPath *) indexPath; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTableView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTTableView.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-7-6. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTTableView : UITableView 12 | 13 | @end 14 | 15 | @protocol VTTableViewDelegate 16 | 17 | @optional 18 | 19 | -(void) tableView:(UITableView *) tableView didContentOffsetChanged:(CGPoint) contentOffset; 20 | 21 | -(void) tableView:(UITableView *) tableView willMoveToWindow:(UIWindow *) window; 22 | 23 | -(void) tableView:(UITableView *) tableView didMoveToWindow:(UIWindow *) window; 24 | 25 | @end -------------------------------------------------------------------------------- /vTeam/vTeam/VTTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTTask : NSObject 14 | 15 | -(id) initWithSource:(id) source; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @implementation VTTask 12 | 13 | @synthesize source = _source; 14 | 15 | -(id) initWithSource:(id) source{ 16 | if((self = [super init])){ 17 | _source = source; 18 | } 19 | return self; 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTToolbar.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTToolbar.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTToolbar : UIToolbar 12 | 13 | @property(nonatomic,retain) UIImage * backgroundImage; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTToolbar.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTToolbar.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-26. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTToolbar.h" 10 | 11 | #import 12 | 13 | @implementation VTToolbar 14 | 15 | @synthesize backgroundImage = _backgroundImage; 16 | 17 | -(void) dealloc{ 18 | [_backgroundImage release]; 19 | [super dealloc]; 20 | } 21 | 22 | 23 | -(void) drawRect:(CGRect)rect{ 24 | [super drawRect:rect]; 25 | if(_backgroundImage){ 26 | [_backgroundImage drawInRect:rect]; 27 | } 28 | } 29 | 30 | 31 | -(void) setBackgroundImage:(UIImage *)backgroundImage{ 32 | if(_backgroundImage != backgroundImage){ 33 | [_backgroundImage release]; 34 | _backgroundImage = [backgroundImage retain]; 35 | [self setNeedsDisplay]; 36 | } 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTURLDataSource.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTURLDataSource.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-6-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTURLDataSource : VTPageDataSource 14 | 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTURLService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTURLService.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-6-22. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTURLService : VTDownlinkService 12 | 13 | -(NSError *) errorByResponseBody:(id) body task:(id) task; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTUnZip.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTUnZip.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-6-6. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString * kVTUnZipFileName; 12 | extern NSString * kVTUnZipFileSize; 13 | 14 | 15 | @interface VTUnZip : NSObject 16 | 17 | -(id) initWithZipFile:(NSString *) filePath; 18 | 19 | -(BOOL) nextZipEntity; 20 | 21 | -(NSDictionary *) entityAttributes; 22 | 23 | -(NSString *) entityFileName; 24 | 25 | -(NSUInteger) entityFileSize; 26 | 27 | -(BOOL) openZipEntity; 28 | 29 | -(BOOL) closeZipEntity; 30 | 31 | -(NSUInteger) read:(void *) buffer length:(NSUInteger) length; 32 | 33 | -(void) unZipToDirectory:(NSString *) directory; 34 | 35 | @end 36 | 37 | @interface NSString(VTUnZip) 38 | 39 | +(id) stringWithZipFile:(NSString *) filePath fileName:(NSString *) fileName; 40 | 41 | @end 42 | 43 | @interface NSData(VTUnZip) 44 | 45 | +(id) dataWithZipFile:(NSString *) filePath fileName:(NSString *) fileName; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTUplinkService.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTUplinkService.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTUplinkService : VTService 14 | 15 | -(void) vtUplinkTask:(id) uplinkTask didSuccessResults:(id) data forTaskType:(Protocol *) taskType; 16 | 17 | -(void) vtUplinkTask:(id) uplinkTask didFailWithError:(NSError *) error forTaskType:(Protocol *) taskType; 18 | 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTUplinkTask.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTUplinkTask.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface VTUplinkTask : VTTask 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTUplinkTask.m: -------------------------------------------------------------------------------- 1 | // 2 | // VTUplinkTask.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-2. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "VTUplinkTask.h" 10 | 11 | @implementation VTUplinkTask 12 | 13 | @synthesize delegate = _delegate; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTViewController.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-25. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTViewController : UIViewController 14 | 15 | -(IBAction) doAction:(id)sender; 16 | 17 | -(void) downloadImagesForView:(UIView *) view; 18 | 19 | -(void) loadImagesForView:(UIView *) view; 20 | 21 | -(void) cancelDownloadImagesForView:(UIView *) view; 22 | 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTViewLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTViewLayout.h 3 | // vTeam 4 | // 5 | // Created by Zhang Hailong on 13-5-11. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTViewLayout : VTLayout 14 | 15 | @property(nonatomic,retain) IBOutletCollection(VTLayoutData) NSArray * layoutDatas; 16 | @property(nonatomic,retain) IBOutlet UIView * view; 17 | @property(nonatomic,assign) CGSize size; 18 | @property(nonatomic,assign) UIEdgeInsets padding; 19 | 20 | -(void) setNeedsLayout; 21 | 22 | -(void) doLayout; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTWebView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTWebView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-11-7. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VTWebView : UIWebView 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /vTeam/vTeam/VTZoomView.h: -------------------------------------------------------------------------------- 1 | // 2 | // VTZoomView.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-5-3. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | @interface VTZoomView : UIControl 14 | 15 | @property(nonatomic,assign) CGFloat highlightedZoom; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/Vermin/vmDOMDocument.h: -------------------------------------------------------------------------------- 1 | // 2 | // vmDOMDocument.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | #include "hvermin_runtime.h" 14 | 15 | @interface vmVTDOMDocument : VTDOMDocument 16 | 17 | @property(nonatomic,assign) vmObject * vmObject; 18 | 19 | @end 20 | 21 | extern vmClassBase vmDOMDocumentClass; 22 | 23 | typedef struct _vmDOMDocument{ 24 | vmObject base; 25 | vmVTDOMDocument * document; 26 | struct{ 27 | vmUniqueKey rootElement; 28 | vmUniqueKey getElementById; 29 | vmUniqueKey applySheetStyle; 30 | }uniqueKeys; 31 | }vmDOMDocument; 32 | 33 | vmVariant vmDOMDocumentAlloc(vmRuntimeContext context,VTDOMDocument * element,InvokeTickDeclare); 34 | 35 | -------------------------------------------------------------------------------- /vTeam/vTeam/Vermin/vmDOMElement.h: -------------------------------------------------------------------------------- 1 | // 2 | // vmDOMElement.h 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 14-1-9. 6 | // Copyright (c) 2014年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | 13 | #include "hvermin_runtime.h" 14 | 15 | extern vmClassBase vmDOMElementClass; 16 | 17 | typedef struct _vmDOMElement{ 18 | vmObject base; 19 | VTDOMElement * element; 20 | struct{ 21 | vmUniqueKey attr; 22 | vmUniqueKey css; 23 | vmUniqueKey val; 24 | vmUniqueKey append; 25 | vmUniqueKey remove; 26 | vmUniqueKey length; 27 | vmUniqueKey childAt; 28 | vmUniqueKey parent; 29 | }uniqueKeys; 30 | }vmDOMElement; 31 | 32 | vmVariant vmDOMElementAlloc(vmRuntimeContext context,VTDOMElement * element,InvokeTickDeclare); -------------------------------------------------------------------------------- /vTeam/vTeam/Vermin/vmVariant.h: -------------------------------------------------------------------------------- 1 | // 2 | // vmVariant.h 3 | // vmRuntimeLib 4 | // 5 | // Created by 张海龙 张海龙 on 11-11-14. 6 | // Copyright (c) 2011年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #include "hvermin.h" 12 | 13 | NSString * vmVariantToNSString(vmRuntimeContext context,vmVariant value); 14 | 15 | vmVariant NSObjectToVariant(vmRuntimeContext context,id object); 16 | 17 | CGSize vmVariantToCGSize(vmRuntimeContext context,vmVariant value); 18 | 19 | CGPoint vmVariantToCGPoint(vmRuntimeContext context,vmVariant value); 20 | -------------------------------------------------------------------------------- /vTeam/vTeam/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /vTeam/vTeam/pinyin/hpinyin.h: -------------------------------------------------------------------------------- 1 | // 2 | // hpinyin.h 3 | // SinaFramework 4 | // 5 | // Created by 张海龙 张海龙 on 12-1-4. 6 | // Copyright (c) 2012年 hailong.org. All rights reserved. 7 | // 8 | 9 | #ifndef _HPINYIN_H 10 | #define _HPINYIN_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | HANDLER(hpinyin_t) 17 | 18 | hpinyin_t pinyin_find(hwchar word,InvokeTickDeclare); 19 | 20 | hint32 pinyin_count(hpinyin_t pinyin,InvokeTickDeclare); 21 | 22 | hcchar * pinyin_get(hpinyin_t pinyin,hint32 index,InvokeTickDeclare); 23 | 24 | #ifdef __cplusplus 25 | 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /vTeam/vTeam/vTeam-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'vTeam' target in the 'vTeam' project 3 | // 4 | 5 | 6 | #ifdef __OBJC__ 7 | 8 | #import 9 | 10 | #ifndef DEBUG 11 | 12 | #define NSLog(...) {} 13 | 14 | #endif 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /vTeam/vTeam/vTeam.m: -------------------------------------------------------------------------------- 1 | // 2 | // vTeam.m 3 | // vTeam 4 | // 5 | // Created by zhang hailong on 13-4-24. 6 | // Copyright (c) 2013年 hailong.org. All rights reserved. 7 | // 8 | 9 | #import "vTeam.h" 10 | -------------------------------------------------------------------------------- /vTeam/vTeam/zh-Hans.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | --------------------------------------------------------------------------------