├── .babelrc ├── .buckconfig ├── .flowconfig ├── .gitattributes ├── .gitignore ├── .npmrc ├── .watchmanconfig ├── LICENSE ├── README.md ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── cyq-release-key.keystore │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── reactnativecomponentdemos │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── drawable-hdpi │ │ ├── goods_placeholder.png │ │ ├── gps_stat1.png │ │ ├── poi_marker.png │ │ └── splash.png │ │ ├── drawable-mdpi │ │ ├── goods_placeholder.png │ │ ├── gps_stat1.png │ │ ├── poi_marker.png │ │ └── splash.png │ │ ├── drawable-xhdpi │ │ ├── goods_placeholder.png │ │ ├── gps_stat1.png │ │ ├── poi_marker.png │ │ └── splash.png │ │ ├── drawable-xxhdpi │ │ ├── goods_placeholder.png │ │ ├── gps_stat1.png │ │ ├── poi_marker.png │ │ └── splash.png │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── keystores │ ├── BUCK │ └── debug.keystore.properties └── settings.gradle ├── examples ├── android │ └── react-native-component-list.js ├── images │ ├── add.png │ ├── cart.png │ ├── cash.png │ ├── charge.png │ ├── credit.png │ ├── donate.png │ ├── eye_close.png │ ├── eye_open.png │ ├── liking.png │ ├── loan.png │ ├── locked.png │ ├── payment.png │ ├── remove.png │ ├── service.png │ ├── shopping.png │ └── transfer.png ├── ios │ └── react-native-component-list.js ├── react-native-payment │ └── alipay.js ├── react-native-smart-amap-location │ ├── amap-location-alone-android.js │ ├── amap-location-alone-ios.js │ ├── amap-location-serial-android.js │ └── amap-location-serial-ios.js ├── react-native-smart-amap │ ├── ListViewActivityIndicator.js │ ├── amap-alone.js │ └── amp-alone-nearby-list.js ├── react-native-smart-app-event-listener-enhance │ └── app-event-listener-enhance.js ├── react-native-smart-badge │ ├── custom-badge.js │ ├── empty-badge.js │ └── number-badge.js ├── react-native-smart-barcode │ └── fullscreen.js ├── react-native-smart-button │ ├── all-buttons.js │ ├── badge-button.js │ ├── basic-button.js │ ├── icon-button.js │ └── loading-button.js ├── react-native-smart-corner-label │ └── corner-label.js ├── react-native-smart-gesture-password │ └── gesture-password.js ├── react-native-smart-image-loader │ ├── imageUrls.js │ ├── react-native-smart-pull-to-refresh-listview+image-loader(android).js │ └── react-native-smart-pull-to-refresh-listview+image-loader.js ├── react-native-smart-loading-spinner-overlay │ └── loading-spinner-overlay.js ├── react-native-smart-parabola │ └── parabola-demo.js ├── react-native-smart-pull-to-refresh-listview │ ├── react-native-smart-pull-to-refresh-listview-demo.js │ ├── react-native-smart-pull-to-refresh-listview-demo10.js │ ├── react-native-smart-pull-to-refresh-listview-demo11.js │ ├── react-native-smart-pull-to-refresh-listview-demo12.js │ ├── react-native-smart-pull-to-refresh-listview-demo13.js │ ├── react-native-smart-pull-to-refresh-listview-demo2.js │ ├── react-native-smart-pull-to-refresh-listview-demo3.js │ ├── react-native-smart-pull-to-refresh-listview-demo4.js │ ├── react-native-smart-pull-to-refresh-listview-demo5.js │ ├── react-native-smart-pull-to-refresh-listview-demo6.js │ ├── react-native-smart-pull-to-refresh-listview-demo7.js │ ├── react-native-smart-pull-to-refresh-listview-demo8.js │ ├── react-native-smart-pull-to-refresh-listview-demo9.js │ ├── sticky-header-android-pull-to-refresh.js │ ├── sticky-header-android.js │ ├── sticky-header-ios-pull-to-refresh.js │ └── use-with-react-native-scrollable-tab-view.js ├── react-native-smart-security-text │ └── security-text.js ├── react-native-smart-sortable-sudoku-grid │ └── three-columns.js ├── react-native-smart-sudoku-grid │ └── three-columns.js ├── react-native-smart-toast │ └── toast-text.js └── react-native-smart-touch-id │ └── touch-id-test.js ├── index.android.js ├── index.ios.js ├── ios ├── AMapResources │ ├── gpsStat1@2x.png │ ├── icon_location@2x.png │ └── icon_location@3x.png ├── AliPayResouces │ └── AlipaySDK.bundle │ │ ├── bar@2x.png │ │ ├── refresh@2x.png │ │ ├── refresh_click@2x.png │ │ ├── shutdown@2x.png │ │ └── shutdown_click@2x.png ├── Frameworks │ ├── AMapFoundationKit.framework │ │ ├── 1.3.2.d4e0936 │ │ ├── AMapFoundationKit │ │ └── Headers │ │ │ ├── AMapFoundationKit.h │ │ │ ├── AMapFoundationVersion.h │ │ │ ├── AMapServices.h │ │ │ ├── AMapURLSearch.h │ │ │ ├── AMapURLSearchConfig.h │ │ │ ├── AMapURLSearchType.h │ │ │ └── AMapUtility.h │ ├── AMapLocationKit.framework │ │ ├── 2.2.0.3c0ed2d │ │ ├── AMapLocationKit │ │ └── Headers │ │ │ ├── AMapLocationCommonObj.h │ │ │ ├── AMapLocationKit.h │ │ │ ├── AMapLocationManager.h │ │ │ ├── AMapLocationRegionObj.h │ │ │ └── AMapLocationVersion.h │ ├── AMapSearchKit.framework │ │ ├── 4.4.0.5bd4275 │ │ ├── AMapSearchKit │ │ └── Headers │ │ │ ├── AMapCommonObj.h │ │ │ ├── AMapNearbySearchManager.h │ │ │ ├── AMapNearbyUploadInfo.h │ │ │ ├── AMapSearchAPI.h │ │ │ ├── AMapSearchError.h │ │ │ ├── AMapSearchKit.h │ │ │ ├── AMapSearchObj.h │ │ │ └── AMapSearchVersion.h │ ├── AlipaySDK.framework │ │ ├── AlipaySDK │ │ ├── Headers │ │ │ ├── APayAuthInfo.h │ │ │ └── AlipaySDK.h │ │ ├── Info.plist │ │ └── en.lproj │ │ │ └── InfoPlist.strings │ └── MAMapKit.framework │ │ ├── 4.4.0.cc00c67 │ │ ├── AMap.bundle │ │ └── images │ │ │ ├── greenPin.png │ │ │ ├── greenPin@2x.png │ │ │ ├── greenPin@3x.png │ │ │ ├── greenPin_lift.png │ │ │ ├── greenPin_lift@2x.png │ │ │ ├── greenPin_lift@3x.png │ │ │ ├── pin_shadow.png │ │ │ ├── pin_shadow@2x.png │ │ │ ├── pin_shadow@3x.png │ │ │ ├── purplePin.png │ │ │ ├── purplePin@2x.png │ │ │ ├── purplePin@3x.png │ │ │ ├── purplePin_lift.png │ │ │ ├── purplePin_lift@2x.png │ │ │ ├── purplePin_lift@3x.png │ │ │ ├── redPin.png │ │ │ ├── redPin@2x.png │ │ │ ├── redPin@3x.png │ │ │ ├── redPin_lift.png │ │ │ ├── redPin_lift@2x.png │ │ │ └── redPin_lift@3x.png │ │ ├── Headers │ │ ├── MAAnnotation.h │ │ ├── MAAnnotationView.h │ │ ├── MACircle.h │ │ ├── MACircleRenderer.h │ │ ├── MACircleView.h │ │ ├── MAGeodesicPolyline.h │ │ ├── MAGeometry.h │ │ ├── MAGroundOverlay.h │ │ ├── MAGroundOverlayRenderer.h │ │ ├── MAGroundOverlayView.h │ │ ├── MAHeatMapTileOverlay.h │ │ ├── MAMapKit.h │ │ ├── MAMapVersion.h │ │ ├── MAMapView.h │ │ ├── MAMultiColoredPolylineRenderer.h │ │ ├── MAMultiPoint.h │ │ ├── MAMultiPolyline.h │ │ ├── MAOverlay.h │ │ ├── MAOverlayPathRenderer.h │ │ ├── MAOverlayPathView.h │ │ ├── MAOverlayRenderer.h │ │ ├── MAOverlayView.h │ │ ├── MAPinAnnotationView.h │ │ ├── MAPointAnnotation.h │ │ ├── MAPolygon.h │ │ ├── MAPolygonRenderer.h │ │ ├── MAPolygonView.h │ │ ├── MAPolyline.h │ │ ├── MAPolylineRenderer.h │ │ ├── MAPolylineView.h │ │ ├── MAShape.h │ │ ├── MATileOverlay.h │ │ ├── MATileOverlayRenderer.h │ │ ├── MATileOverlayView.h │ │ ├── MAUserLocation.h │ │ └── MAUserLocationRepresentation.h │ │ └── MAMapKit ├── ImageLoaderResources │ └── goods-placeholder.png ├── ReactNativeComponentDemos.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── ReactNativeComponentDemos.xcscheme ├── ReactNativeComponentDemos │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── main.m ├── ReactNativeComponentDemosTests │ ├── Info.plist │ └── ReactNativeComponentDemosTests.m ├── SplashScreenResource │ ├── LaunchScreen.xib │ └── splash.png └── raw │ └── beep.wav ├── package.json ├── temp └── Demo.zip └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } -------------------------------------------------------------------------------- /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | .*/Libraries/react-native/ReactNative.js 16 | 17 | [include] 18 | 19 | [libs] 20 | node_modules/react-native/Libraries/react-native/react-native-interface.js 21 | node_modules/react-native/flow 22 | flow/ 23 | 24 | [options] 25 | module.system=haste 26 | 27 | experimental.strict_type_args=true 28 | 29 | munge_underscores=true 30 | 31 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 32 | 33 | suppress_type=$FlowIssue 34 | suppress_type=$FlowFixMe 35 | suppress_type=$FixMe 36 | 37 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-7]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 38 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-7]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 39 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 40 | 41 | unsafe.enable_getters_and_setters=true 42 | 43 | [version] 44 | ^0.37.0 45 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IntelliJ 26 | # 27 | build/ 28 | .idea 29 | .gradle 30 | local.properties 31 | *.iml 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | yarn-error.log 38 | 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | android/app/libs 43 | *.keystore 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/Preview.html 54 | fastlane/screenshots 55 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=http://registry.npmjs.org/ 2 | disturb=http://npmjs.org/dist 3 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 HISAME SHIZUMARU 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ReactNativeComponentDemos 2 | Demos for react-native components of [react-native-component][1] 3 | 4 | ## Preview 5 | 6 | ![ReactNativeComponentDemos IOS Preview][10000] 7 | ![ReactNativeComponentDemos Android Preview][10001] 8 | 9 | ## Installation 10 | 11 | * `git clone https://github.com/cyqresig/ReactNativeComponentDemos.git` 12 | * `cd ReactNativeComponentDemos && npm install` 13 | 14 | ## Installation(IOS) 15 | 16 | * [react-native-smart-splash-screen][2] 17 | * [react-native-smart-touch-id][3] 18 | * [react-native-smart-barcode][15] 19 | * [react-native-smart-image-loader][16] 20 | * [react-native-smart-amap-location][18] 21 | * [react-native-smart-amap][19] 22 | 23 | ## Installation(Android) 24 | 25 | * [react-native-smart-splash-screen][2] 26 | * [react-native-smart-pull-to-refresh-listview][4] 27 | * [react-native-smart-barcode][15] 28 | * [react-native-smart-image-loader][16] 29 | * [react-native-smart-amap-location][18] 30 | * [react-native-smart-amap][19] 31 | 32 | ## Usage 33 | 34 | * [react-native-smart-splash-screen][2] 35 | * [react-native-smart-touch-id][3] 36 | * [react-native-smart-pull-to-refresh-listview][4] 37 | * [react-native-smart-gesture-password][5] 38 | * [react-native-smart-timer-enhance][6] 39 | * [react-native-smart-security-text][7] 40 | * [react-native-smart-parabola][8] 41 | * [react-native-smart-badge][9] 42 | * [react-native-smart-button][10] 43 | * [react-native-smart-sudoku-grid][11] 44 | * [react-native-smart-corner-label][12] 45 | * [react-native-smart-toast][13] 46 | * [react-native-smart-loading-spinner-overlay][14] 47 | * [react-native-smart-barcode][15] 48 | * [react-native-smart-image-loader][16] 49 | * [react-native-smart-app-event-listener-enhance][17] 50 | * [react-native-smart-amap-location][18] 51 | * [react-native-smart-amap][19] 52 | 53 | [1]: https://github.com/react-native-component 54 | [2]: https://github.com/react-native-component/react-native-smart-splash-screen 55 | [3]: https://github.com/react-native-component/react-native-smart-touch-id 56 | [4]: https://github.com/react-native-component/react-native-smart-pull-to-refresh-listview 57 | [5]: https://github.com/react-native-component/react-native-smart-gesture-password 58 | [6]: https://github.com/react-native-component/react-native-smart-timer-enhance 59 | [7]: https://github.com/react-native-component/react-native-smart-security-text 60 | [8]: https://github.com/react-native-component/react-native-smart-parabola 61 | [9]: https://github.com/react-native-component/react-native-smart-badge 62 | [10]: https://github.com/react-native-component/react-native-smart-button 63 | [11]: https://github.com/react-native-component/react-native-smart-sudoku-grid 64 | [12]: https://github.com/react-native-component/react-native-smart-corner-label 65 | [13]: https://github.com/react-native-component/react-native-smart-toast 66 | [14]: https://github.com/react-native-component/react-native-smart-loading-spinner-overlay 67 | [15]: https://github.com/react-native-component/react-native-smart-barcode 68 | [16]: https://github.com/react-native-component/react-native-smart-image-loader 69 | [17]: https://github.com/react-native-component/react-native-smart-app-event-listener-enhance 70 | [18]: https://github.com/react-native-component/react-native-smart-amap-location 71 | [19]: https://github.com/react-native-component/react-native-smart-amap 72 | 73 | [10000]: http://cyqresig.github.io/img/react-native-component-demos-preview-ios-v0.0.1.gif 74 | [10001]: http://cyqresig.github.io/img/react-native-component-demos-preview-android-v0.0.1.gif 75 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # To learn about Buck see [Docs](https://buckbuild.com/). 4 | # To run your application with Buck: 5 | # - install Buck 6 | # - `npm start` - to start the packager 7 | # - `cd android` 8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 10 | # - `buck install -r android/app` - compile, install and run application 11 | # 12 | 13 | lib_deps = [] 14 | for jarfile in glob(['libs/*.jar']): 15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) 16 | lib_deps.append(':' + name) 17 | prebuilt_jar( 18 | name = name, 19 | binary_jar = jarfile, 20 | ) 21 | 22 | for aarfile in glob(['libs/*.aar']): 23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) 24 | lib_deps.append(':' + name) 25 | android_prebuilt_aar( 26 | name = name, 27 | aar = aarfile, 28 | ) 29 | 30 | android_library( 31 | name = 'all-libs', 32 | exported_deps = lib_deps 33 | ) 34 | 35 | android_library( 36 | name = 'app-code', 37 | srcs = glob([ 38 | 'src/main/java/**/*.java', 39 | ]), 40 | deps = [ 41 | ':all-libs', 42 | ':build_config', 43 | ':res', 44 | ], 45 | ) 46 | 47 | android_build_config( 48 | name = 'build_config', 49 | package = 'com.reactnativecomponentdemos', 50 | ) 51 | 52 | android_resource( 53 | name = 'res', 54 | res = 'src/main/res', 55 | package = 'com.reactnativecomponentdemos', 56 | ) 57 | 58 | android_binary( 59 | name = 'app', 60 | package_type = 'debug', 61 | manifest = 'src/main/AndroidManifest.xml', 62 | keystore = '//android/keystores:debug', 63 | deps = [ 64 | ':app-code', 65 | ], 66 | ) 67 | -------------------------------------------------------------------------------- /android/app/cyq-release-key.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/cyq-release-key.keystore -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 25 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativecomponentdemos/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactnativecomponentdemos; 2 | 3 | import android.os.Bundle; 4 | 5 | import com.facebook.react.ReactActivity; 6 | 7 | import com.reactnativecomponent.splashscreen.RCTSplashScreen; //import RCTSplashScreen 8 | 9 | public class MainActivity extends ReactActivity { 10 | 11 | /** 12 | * Returns the name of the main component registered from JavaScript. 13 | * This is used to schedule rendering of the component. 14 | */ 15 | @Override 16 | protected String getMainComponentName() { 17 | return "ReactNativeComponentDemos"; 18 | } 19 | 20 | @Override 21 | protected void onCreate(Bundle savedInstanceState) { 22 | RCTSplashScreen.openSplashScreen(this); //open splashscreen 23 | //RCTSplashScreen.openSplashScreen(this, true, ImageView.ScaleType.FIT_XY); //open splashscreen fullscreen 24 | super.onCreate(savedInstanceState); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/reactnativecomponentdemos/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.reactnativecomponentdemos; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.facebook.react.ReactApplication; 7 | import com.facebook.react.ReactInstanceManager; 8 | import com.facebook.react.ReactNativeHost; 9 | import com.facebook.react.ReactPackage; 10 | import com.facebook.react.shell.MainReactPackage; 11 | import com.facebook.soloader.SoLoader; 12 | 13 | import java.util.Arrays; 14 | import java.util.List; 15 | 16 | import com.reactnativecomponent.barcode.RCTCapturePackage; 17 | import com.reactnativecomponent.imageloader.RCTLoaderImageViewPackage; 18 | import com.reactnativecomponent.splashscreen.RCTSplashScreenPackage; //import package 19 | import com.reactnativecomponent.swiperefreshlayout.RCTSwipeRefreshLayoutPackage; 20 | 21 | public class MainApplication extends Application implements ReactApplication { 22 | 23 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 24 | @Override 25 | public boolean getUseDeveloperSupport() { 26 | return BuildConfig.DEBUG; 27 | } 28 | 29 | @Override 30 | protected List getPackages() { 31 | return Arrays.asList( 32 | new MainReactPackage(), 33 | new RCTSplashScreenPackage(), //register Module 34 | new RCTCapturePackage(), //register Module 35 | new RCTLoaderImageViewPackage(), //register Module 36 | new RCTSwipeRefreshLayoutPackage() //register Module 37 | ); 38 | } 39 | }; 40 | 41 | @Override 42 | public ReactNativeHost getReactNativeHost() { 43 | return mReactNativeHost; 44 | } 45 | 46 | @Override 47 | public void onCreate() { 48 | super.onCreate(); 49 | SoLoader.init(this, /* native exopackage */ false); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/goods_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-hdpi/goods_placeholder.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/gps_stat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-hdpi/gps_stat1.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/poi_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-hdpi/poi_marker.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-hdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/goods_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-mdpi/goods_placeholder.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/gps_stat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-mdpi/gps_stat1.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/poi_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-mdpi/poi_marker.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-mdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/goods_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-xhdpi/goods_placeholder.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/gps_stat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-xhdpi/gps_stat1.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/poi_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-xhdpi/poi_marker.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-xhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/goods_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-xxhdpi/goods_placeholder.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/gps_stat1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-xxhdpi/gps_stat1.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/poi_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-xxhdpi/poi_marker.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/drawable-xxhdpi/splash.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ReactNativeComponentDemos 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = 'debug', 3 | store = 'debug.keystore', 4 | properties = 'debug.keystore.properties', 5 | visibility = [ 6 | 'PUBLIC', 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ReactNativeComponentDemos' 2 | 3 | include ':app' 4 | include ':react-native-smart-splashscreen' 5 | project(':react-native-smart-splashscreen').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smart-splash-screen/android') 6 | include ':react-native-smart-barcode' 7 | project(':react-native-smart-barcode').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smart-barcode/android') 8 | include ':react-native-smart-image-loader' 9 | project(':react-native-smart-image-loader').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smart-image-loader/android') 10 | include ':react-native-smart-swipe-refresh-layout' 11 | project(':react-native-smart-swipe-refresh-layout').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-smart-pull-to-refresh-listview/android') -------------------------------------------------------------------------------- /examples/images/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/add.png -------------------------------------------------------------------------------- /examples/images/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/cart.png -------------------------------------------------------------------------------- /examples/images/cash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/cash.png -------------------------------------------------------------------------------- /examples/images/charge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/charge.png -------------------------------------------------------------------------------- /examples/images/credit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/credit.png -------------------------------------------------------------------------------- /examples/images/donate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/donate.png -------------------------------------------------------------------------------- /examples/images/eye_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/eye_close.png -------------------------------------------------------------------------------- /examples/images/eye_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/eye_open.png -------------------------------------------------------------------------------- /examples/images/liking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/liking.png -------------------------------------------------------------------------------- /examples/images/loan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/loan.png -------------------------------------------------------------------------------- /examples/images/locked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/locked.png -------------------------------------------------------------------------------- /examples/images/payment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/payment.png -------------------------------------------------------------------------------- /examples/images/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/remove.png -------------------------------------------------------------------------------- /examples/images/service.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/service.png -------------------------------------------------------------------------------- /examples/images/shopping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/shopping.png -------------------------------------------------------------------------------- /examples/images/transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/examples/images/transfer.png -------------------------------------------------------------------------------- /examples/react-native-smart-amap-location/amap-location-alone-android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/11/11. 6 | */ 7 | 8 | import React, { 9 | Component 10 | } from 'react' 11 | import { 12 | StyleSheet, 13 | View, 14 | Text, 15 | Alert, 16 | NativeAppEventEmitter, 17 | ActivityIndicator, 18 | ActivityIndicatorIOS, 19 | ProgressBarAndroid, 20 | } from 'react-native' 21 | 22 | import AMapLocation from 'react-native-smart-amap-location' 23 | import Button from 'react-native-smart-button' 24 | import AppEventListenerEnhance from 'react-native-smart-app-event-listener-enhance' 25 | 26 | class AMapLocationDemo extends Component { 27 | 28 | // 构造 29 | constructor(props) { 30 | super(props); 31 | // 初始状态 32 | this.state = {}; 33 | } 34 | 35 | componentDidMount() { 36 | let viewAppearCallBack = (event) => { 37 | //初始化及设置定位 38 | //AMapLocation.init({ 39 | // onceLocation: false, 40 | //}) 41 | AMapLocation.init(null) 42 | } 43 | this.addAppEventListener( 44 | this.props.navigator.navigationContext.addListener('didfocus', viewAppearCallBack), 45 | NativeAppEventEmitter.addListener('amap.location.onLocationResult', this._onLocationResult) 46 | ) 47 | } 48 | 49 | componentWillUnmount () { 50 | //停止并销毁定位服务 51 | AMapLocation.cleanUp() 52 | } 53 | 54 | render() { 55 | return ( 56 | 57 | 71 | 85 | 86 | ) 87 | } 88 | 89 | _onLocationResult = (result) => { 90 | if(result.error) { 91 | Alert.alert(`错误代码: ${result.error.code}, 错误信息: ${result.error.localizedDescription}`) 92 | } 93 | else { 94 | if(result.formattedAddress) { 95 | Alert.alert(`格式化地址 = ${result.formattedAddress}`) 96 | } 97 | else { 98 | Alert.alert(`纬度 = ${result.coordinate.latitude}, 经度 = ${result.coordinate.longitude}`) 99 | } 100 | } 101 | if(this._button_1.state.loading) { 102 | this._button_1.setState({ 103 | loading: false, 104 | }) 105 | } 106 | if(this._button_2.state.loading) { 107 | this._button_2.setState({ 108 | loading: false, 109 | }) 110 | } 111 | } 112 | 113 | //单次定位并返回逆地理编码信息 114 | _showReGeocode = () => { 115 | this._button_1.setState({ 116 | loading: true, 117 | }) 118 | AMapLocation.getReGeocode() 119 | } 120 | 121 | //单次定位并返回地理编码信息 122 | _showLocation = () => { 123 | this._button_2.setState({ 124 | loading: true, 125 | }) 126 | AMapLocation.getLocation() 127 | } 128 | 129 | _renderActivityIndicator() { 130 | return ActivityIndicator ? ( 131 | 136 | ) : Platform.OS == 'android' ? 137 | ( 138 | 142 | 143 | ) : ( 144 | 149 | ) 150 | } 151 | 152 | } 153 | 154 | export default AppEventListenerEnhance(AMapLocationDemo) -------------------------------------------------------------------------------- /examples/react-native-smart-amap-location/amap-location-alone-ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/11/11. 6 | */ 7 | 8 | import React, { 9 | Component 10 | } from 'react' 11 | import { 12 | StyleSheet, 13 | View, 14 | Text, 15 | Alert, 16 | NativeAppEventEmitter, 17 | ActivityIndicator, 18 | ActivityIndicatorIOS, 19 | ProgressBarAndroid, 20 | } from 'react-native' 21 | 22 | import AMapLocation from 'react-native-smart-amap-location' 23 | import Button from 'react-native-smart-button' 24 | import AppEventListenerEnhance from 'react-native-smart-app-event-listener-enhance' 25 | 26 | class AMapLocationDemo extends Component { 27 | 28 | // 构造 29 | constructor(props) { 30 | super(props); 31 | // 初始状态 32 | this.state = {}; 33 | } 34 | 35 | componentDidMount() { 36 | let viewAppearCallBack = (event) => { 37 | //初始化及设置定位 38 | //AMapLocation.init({ 39 | // //locationMode: AMapLocation.locationMode.hundredMeters, 40 | // //locationTimeout: 2, 41 | // //reGeocodeTimeout: 2, 42 | // 43 | // locationMode: AMapLocation.locationMode.best, 44 | // locationTimeout: 10, 45 | // reGeocodeTimeout: 10, 46 | //}) 47 | AMapLocation.init(null) 48 | 49 | } 50 | this.addAppEventListener( 51 | this.props.navigator.navigationContext.addListener('didfocus', viewAppearCallBack), 52 | NativeAppEventEmitter.addListener('amap.location.onLocationResult', this._onLocationResult) 53 | ) 54 | } 55 | 56 | componentWillUnmount () { 57 | //停止并销毁定位服务 58 | AMapLocation.cleanUp() 59 | } 60 | 61 | render() { 62 | return ( 63 | 64 | 78 | 92 | 93 | ) 94 | } 95 | 96 | _onLocationResult = (result) => { 97 | if(result.error) { 98 | Alert.alert(`错误代码: ${result.error.code}, 错误信息: ${result.error.localizedDescription}`) 99 | } 100 | else { 101 | if(result.formattedAddress) { 102 | Alert.alert(`格式化地址 = ${result.formattedAddress}`) 103 | } 104 | else { 105 | Alert.alert(`纬度 = ${result.coordinate.latitude}, 经度 = ${result.coordinate.longitude}`) 106 | } 107 | } 108 | if(this._button_1.state.loading) { 109 | this._button_1.setState({ 110 | loading: false, 111 | }) 112 | } 113 | if(this._button_2.state.loading) { 114 | this._button_2.setState({ 115 | loading: false, 116 | }) 117 | } 118 | } 119 | 120 | //单次定位并返回逆地理编码信息 121 | _showReGeocode = () => { 122 | this._button_1.setState({ 123 | loading: true, 124 | }) 125 | AMapLocation.getReGeocode() 126 | } 127 | 128 | //单次定位并返回地理编码信息 129 | _showLocation = () => { 130 | this._button_2.setState({ 131 | loading: true, 132 | }) 133 | AMapLocation.getLocation() 134 | } 135 | 136 | _renderActivityIndicator() { 137 | return ActivityIndicator ? ( 138 | 143 | ) : Platform.OS == 'android' ? 144 | ( 145 | 149 | 150 | ) : ( 151 | 156 | ) 157 | } 158 | } 159 | 160 | export default AppEventListenerEnhance(AMapLocationDemo) -------------------------------------------------------------------------------- /examples/react-native-smart-amap-location/amap-location-serial-android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/11/11. 6 | */ 7 | 8 | import React, { 9 | Component 10 | } from 'react' 11 | import { 12 | StyleSheet, 13 | View, 14 | Text, 15 | NativeAppEventEmitter, 16 | } from 'react-native' 17 | 18 | import AMapLocation from 'react-native-smart-amap-location' 19 | import Button from 'react-native-smart-button' 20 | import AppEventListenerEnhance from 'react-native-smart-app-event-listener-enhance' 21 | 22 | class AMapLocationDemo extends Component { 23 | 24 | // 构造 25 | constructor(props) { 26 | super(props); 27 | // 初始状态 28 | this.state = { 29 | updatedTime: null, 30 | locationResult: null, 31 | }; 32 | } 33 | 34 | componentDidMount() { 35 | //let viewAppearCallBack = (event) => { 36 | // //初始化及设置定位 37 | // //AMapLocation.init({ 38 | // // //locationMode: AMapLocation.locationMode.hundredMeters, 39 | // // //locationTimeout: 2, 40 | // // //reGeocodeTimeout: 2, 41 | // // 42 | // // locationMode: AMapLocation.locationMode.best, 43 | // // locationTimeout: 10, 44 | // // reGeocodeTimeout: 10, 45 | // //}) 46 | // AMapLocation.init(null) 47 | // 48 | //} 49 | this.addAppEventListener( 50 | //this.props.navigator.navigationContext.addListener('didfocus', viewAppearCallBack), 51 | NativeAppEventEmitter.addListener('amap.location.onLocationResult', this._onLocationResult) 52 | ) 53 | AMapLocation.init(null) 54 | AMapLocation.setOptions({ 55 | allowsBackgroundLocationUpdates: true, 56 | gpsFirst: false, 57 | onceLocation: false, 58 | onceLocationLatest: false, 59 | interval: 2000, 60 | }) 61 | } 62 | 63 | componentWillUnmount () { 64 | //停止并销毁定位服务 65 | AMapLocation.cleanUp() 66 | } 67 | 68 | render() { 69 | return ( 70 | 71 | 79 | 87 | 88 | 定位信息: 89 | 更新时间:{this.state.updatedTime} 90 | {this.state.locationResult} 91 | 92 | 93 | ) 94 | } 95 | 96 | _onLocationResult = (result) => { 97 | //console.log(`serial _onLocationResult...`) 98 | //console.log(result) 99 | let locationResult 100 | let updatedTime = (new Date()).toLocaleTimeString() 101 | if(result.error) { 102 | locationResult = `错误代码: ${result.error.code}, 错误信息: ${result.error.localizedDescription}` 103 | } 104 | else { 105 | if(result.formattedAddress) { 106 | locationResult = `格式化地址 = ${result.formattedAddress}` 107 | } 108 | else { 109 | locationResult = `纬度 = ${result.coordinate.latitude}, 经度 = ${result.coordinate.longitude}` 110 | } 111 | } 112 | this.setState({ 113 | locationResult, 114 | updatedTime, 115 | }) 116 | } 117 | 118 | //开始连续定位 119 | _startUpdatingLocation = () => { 120 | AMapLocation.startUpdatingLocation() 121 | } 122 | 123 | //结束连续定位 124 | _stopUpdatingLocation = () => { 125 | AMapLocation.stopUpdatingLocation() 126 | } 127 | } 128 | 129 | export default AppEventListenerEnhance(AMapLocationDemo) -------------------------------------------------------------------------------- /examples/react-native-smart-amap-location/amap-location-serial-ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/11/11. 6 | */ 7 | 8 | import React, { 9 | Component 10 | } from 'react' 11 | import { 12 | StyleSheet, 13 | View, 14 | Text, 15 | NativeAppEventEmitter, 16 | } from 'react-native' 17 | 18 | import AMapLocation from 'react-native-smart-amap-location' 19 | import Button from 'react-native-smart-button' 20 | import AppEventListenerEnhance from 'react-native-smart-app-event-listener-enhance' 21 | 22 | class AMapLocationDemo extends Component { 23 | 24 | // 构造 25 | constructor(props) { 26 | super(props); 27 | // 初始状态 28 | this.state = { 29 | updatedTime: null, 30 | locationResult: null, 31 | }; 32 | } 33 | 34 | componentDidMount() { 35 | //let viewAppearCallBack = (event) => { 36 | // //初始化及设置定位 37 | // //AMapLocation.init({ 38 | // // //locationMode: AMapLocation.locationMode.hundredMeters, 39 | // // //locationTimeout: 2, 40 | // // //reGeocodeTimeout: 2, 41 | // // 42 | // // locationMode: AMapLocation.locationMode.best, 43 | // // locationTimeout: 10, 44 | // // reGeocodeTimeout: 10, 45 | // //}) 46 | // AMapLocation.init(null) 47 | // 48 | //} 49 | this.addAppEventListener( 50 | //this.props.navigator.navigationContext.addListener('didfocus', viewAppearCallBack), 51 | NativeAppEventEmitter.addListener('amap.location.onLocationResult', this._onLocationResult) 52 | ) 53 | AMapLocation.init(null) 54 | AMapLocation.setOptions({ 55 | pausesLocationUpdatesAutomatically: false, 56 | allowsBackgroundLocationUpdates: true, 57 | }) 58 | } 59 | 60 | componentWillUnmount () { 61 | //停止并销毁定位服务 62 | AMapLocation.cleanUp() 63 | } 64 | 65 | render() { 66 | return ( 67 | 68 | 76 | 84 | 85 | 定位信息: 86 | 更新时间:{this.state.updatedTime} 87 | {this.state.locationResult} 88 | 89 | 90 | ) 91 | } 92 | 93 | _onLocationResult = (result) => { 94 | //console.log(`serial _onLocationResult...`) 95 | //console.log(result) 96 | let locationResult 97 | let updatedTime = (new Date()).toLocaleTimeString() 98 | if(result.error) { 99 | locationResult = `错误代码: ${result.error.code}, 错误信息: ${result.error.localizedDescription}` 100 | } 101 | else { 102 | if(result.formattedAddress) { 103 | locationResult = `格式化地址 = ${result.formattedAddress}` 104 | } 105 | else { 106 | locationResult = `纬度 = ${result.coordinate.latitude}, 经度 = ${result.coordinate.longitude}` 107 | } 108 | } 109 | this.setState({ 110 | locationResult, 111 | updatedTime, 112 | }) 113 | } 114 | 115 | //开始连续定位 116 | _startUpdatingLocation = () => { 117 | AMapLocation.startUpdatingLocation() 118 | } 119 | 120 | //结束连续定位 121 | _stopUpdatingLocation = () => { 122 | AMapLocation.stopUpdatingLocation() 123 | } 124 | } 125 | 126 | export default AppEventListenerEnhance(AMapLocationDemo) -------------------------------------------------------------------------------- /examples/react-native-smart-amap/ListViewActivityIndicator.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/11/21. 6 | */ 7 | 8 | import React, { 9 | PropTypes, 10 | Component, 11 | } from 'react' 12 | import { 13 | ActivityIndicator, 14 | ProgressBarAndroid, 15 | ActivityIndicatorIOS, 16 | Platform, 17 | View, 18 | } from 'react-native' 19 | 20 | export default class ListViewActivityIndicator extends Component { 21 | 22 | static defaultProps = { 23 | color: '#ccc', 24 | size: 'small', 25 | } 26 | 27 | static propTypes = { 28 | ...View.PropTypes, 29 | color: PropTypes.string, 30 | size: PropTypes.oneOf(['small', 'large']), 31 | } 32 | 33 | constructor(props) { 34 | super(props) 35 | this.state = { 36 | visible: true, 37 | } 38 | } 39 | 40 | render() { 41 | if(this.state.visible) { 42 | return ActivityIndicator ? ( 43 | 46 | ) : Platform.OS == 'android' ? 47 | ( 48 | 51 | 52 | ) : ( 53 | 56 | ) 57 | } 58 | else { 59 | return null 60 | } 61 | } 62 | 63 | } -------------------------------------------------------------------------------- /examples/react-native-smart-app-event-listener-enhance/app-event-listener-enhance.js: -------------------------------------------------------------------------------- 1 | import React, { 2 | Component, 3 | } from 'react' 4 | 5 | import AppEventListenerEnhance from 'react-native-smart-app-event-listener-enhance' 6 | 7 | class AppEventListenerEnhanceDemo extends Component { 8 | 9 | componentDidMount() { 10 | //you can use like this 11 | //this.addAppEventListener( 12 | // this.props.navigator.navigationContext.addListener('didfocus', this._didFocus) 13 | //).addAppEventListener( 14 | // this.props.navigator.navigationContext.addListener('didfocus', this._didFocus) 15 | //) 16 | 17 | //or you can use like this 18 | //this.addAppEventListener( 19 | // this.props.navigator.navigationContext.addListener('didfocus', this._didFocus), 20 | // this.props.navigator.navigationContext.addListener('didfocus', this._didFocus) 21 | //) 22 | 23 | this.addAppEventListener( 24 | this.props.navigator.navigationContext.addListener('didfocus', this._didFocus) 25 | ) 26 | } 27 | 28 | render() { 29 | return null 30 | } 31 | 32 | _didFocus = () => { 33 | console.log(`didfocus`) 34 | } 35 | } 36 | 37 | export default AppEventListenerEnhance(AppEventListenerEnhanceDemo) 38 | -------------------------------------------------------------------------------- /examples/react-native-smart-badge/custom-badge.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/18. 6 | */ 7 | 8 | import React, { 9 | Component, 10 | } from 'react' 11 | import { 12 | StyleSheet, 13 | View, 14 | Text, 15 | } from 'react-native' 16 | 17 | import Badge from 'react-native-smart-badge' 18 | 19 | export default class CustomBadge extends Component { 20 | 21 | render () { 22 | return ( 23 | 24 | 28 | ●●● 29 | 30 | 33 | 99+ 34 | 35 | 36 | ) 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /examples/react-native-smart-badge/empty-badge.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/18. 6 | */ 7 | 8 | import React, { 9 | Component, 10 | } from 'react' 11 | import { 12 | StyleSheet, 13 | View, 14 | Text, 15 | } from 'react-native' 16 | 17 | import Badge from 'react-native-smart-badge' 18 | 19 | export default class EmptyBadge extends Component { 20 | 21 | render () { 22 | return ( 23 | 24 | 26 | 27 | 29 | 30 | 32 | 33 | 34 | ) 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /examples/react-native-smart-badge/number-badge.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/18. 6 | */ 7 | 8 | import React, { 9 | Component, 10 | } from 'react' 11 | import { 12 | StyleSheet, 13 | View, 14 | Text, 15 | } from 'react-native' 16 | 17 | import Badge from 'react-native-smart-badge' 18 | import Button from 'react-native-smart-button' 19 | 20 | export default class NumberBadge extends Component { 21 | 22 | // 构造 23 | constructor (props) { 24 | super(props); 25 | // 初始状态 26 | this.state = { 27 | num1: 2, 28 | num2: 15, 29 | num3: 328, 30 | }; 31 | } 32 | 33 | render () { 34 | return ( 35 | 36 | 37 | {this.state.num1} 38 | 39 | 40 | {this.state.num2} 41 | 42 | 43 | {this.state.num3} 44 | 45 | 46 | 53 | 54 | ) 55 | } 56 | 57 | _addNum = () => { 58 | this.setState({ 59 | num1: this.state.num1 + 3, 60 | num2: this.state.num2 + 30, 61 | num3: this.state.num3 + 300, 62 | }) 63 | } 64 | 65 | } -------------------------------------------------------------------------------- /examples/react-native-smart-barcode/fullscreen.js: -------------------------------------------------------------------------------- 1 | import React, { 2 | Component, 3 | } from 'react' 4 | import { 5 | View, 6 | StyleSheet, 7 | Alert, 8 | ActivityIndicator, 9 | ProgressBarAndroid, 10 | ActivityIndicatorIOS, 11 | Dimensions, 12 | } from 'react-native' 13 | 14 | import Barcode from 'react-native-smart-barcode' 15 | import TimerEnhance from 'react-native-smart-timer-enhance' 16 | 17 | //const { width: deviceWidth, height: deviceHeight } = Dimensions.get('window') 18 | 19 | class BarcodeTest extends Component { 20 | 21 | // 构造 22 | constructor (props) { 23 | super(props); 24 | // 初始状态 25 | this.state = { 26 | viewAppear: false, 27 | }; 28 | } 29 | 30 | render () { 31 | 32 | return ( 33 | 34 | {this.state.viewAppear ? this._barCode = component } 36 | onBarCodeRead={this._onBarCodeRead}/> : null} 37 | 38 | {!this.state.viewAppear ? this._renderActivityIndicator() : null} 39 | 40 | ) 41 | } 42 | // 43 | //{!this.state.viewAppear ? 44 | // 45 | //{this._renderActivityIndicator()} 46 | // : null} 47 | 48 | componentDidMount () { 49 | let viewAppearCallBack = (event) => { 50 | this.setTimeout(() => { 51 | this.setState({ 52 | viewAppear: true, 53 | }) 54 | }, 255) 55 | 56 | } 57 | this._listeners = [ 58 | this.props.navigator.navigationContext.addListener('didfocus', viewAppearCallBack) 59 | ] 60 | 61 | } 62 | 63 | componentWillUnmount () { 64 | this._listeners && this._listeners.forEach(listener => listener.remove()); 65 | } 66 | 67 | _onBarCodeRead = (e) => { 68 | console.log(`e.nativeEvent.data.type = ${e.nativeEvent.data.type}, e.nativeEvent.data.code = ${e.nativeEvent.data.code}`) 69 | this._stopScan() 70 | Alert.alert(e.nativeEvent.data.type, e.nativeEvent.data.code, [ 71 | { text: 'OK', onPress: () => this._startScan() }, 72 | ]) 73 | } 74 | 75 | _startScan = (e) => { 76 | this._barCode.startScan() 77 | } 78 | 79 | _stopScan = (e) => { 80 | this._barCode.stopScan() 81 | } 82 | 83 | _renderActivityIndicator () { 84 | return ActivityIndicator ? ( 85 | 89 | ) : Platform.OS == 'android' ? 90 | ( 91 | 93 | 94 | ) : ( 95 | 98 | ) 99 | } 100 | } 101 | 102 | export default TimerEnhance(BarcodeTest) -------------------------------------------------------------------------------- /examples/react-native-smart-button/badge-button.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/4. 6 | */ 7 | 8 | import React, {Component} from 'react' 9 | import { 10 | ScrollView, 11 | View, 12 | StyleSheet, 13 | Image, 14 | Text, 15 | } from 'react-native' 16 | 17 | import Button from 'react-native-smart-button' 18 | import Badge from 'react-native-smart-badge' 19 | 20 | const styles = StyleSheet.create({ 21 | buttonStyle: { 22 | margin: 10, 23 | height: 40, 24 | backgroundColor: 'red', 25 | borderRadius: 3, 26 | borderWidth: StyleSheet.hairlineWidth, 27 | borderColor: 'red', 28 | justifyContent: 'center', 29 | }, 30 | buttonTextStyle: { 31 | fontSize: 17, 32 | color: 'white' 33 | }, 34 | }); 35 | 36 | export default class BadgeButton extends Component { 37 | 38 | render() { 39 | return ( 40 | 41 | 42 | 53 | 54 | 65 | 66 | 78 | 79 | 90 | 91 | 92 | 93 | ) 94 | } 95 | 96 | } 97 | 98 | -------------------------------------------------------------------------------- /examples/react-native-smart-button/basic-button.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/4. 6 | */ 7 | 8 | import React, {Component} from 'react' 9 | import { 10 | ScrollView, 11 | View, 12 | StyleSheet, 13 | Image, 14 | Text, 15 | NativeModules 16 | } from 'react-native' 17 | 18 | import Button from 'react-native-smart-button' 19 | 20 | const styles = StyleSheet.create({ 21 | buttonStyle: { 22 | margin: 10, 23 | height: 40, 24 | backgroundColor: 'red', 25 | borderRadius: 3, 26 | borderWidth: StyleSheet.hairlineWidth, 27 | borderColor: 'red', 28 | justifyContent: 'center', 29 | }, 30 | buttonTextStyle: { 31 | fontSize: 17, 32 | color: 'white' 33 | }, 34 | buttonDisabledStyle: { 35 | backgroundColor: '#DDDDDD', 36 | borderWidth: 0, 37 | }, 38 | buttonDisabledTextStyle: { 39 | color: '#BCBCBC', 40 | }, 41 | }); 42 | 43 | export default class BasicButton extends Component { 44 | 45 | render () { 46 | return ( 47 | 48 | 49 | 57 | 58 | 63 | 64 | 70 | 71 | 78 | 79 | 85 | 86 | 87 | ) 88 | } 89 | 90 | } -------------------------------------------------------------------------------- /examples/react-native-smart-button/icon-button.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/4. 6 | */ 7 | 8 | import React, {Component} from 'react' 9 | import { 10 | ScrollView, 11 | View, 12 | StyleSheet, 13 | Image, 14 | Text, 15 | } from 'react-native' 16 | 17 | import Button from 'react-native-smart-button' 18 | import image_liking from '../images/liking.png' 19 | 20 | const styles = StyleSheet.create({ 21 | buttonStyle: { 22 | margin: 10, 23 | height: 40, 24 | backgroundColor: 'red', 25 | borderRadius: 3, 26 | borderWidth: StyleSheet.hairlineWidth, 27 | borderColor: 'red', 28 | justifyContent: 'center', 29 | }, 30 | buttonTextStyle: { 31 | fontSize: 17, 32 | color: 'white' 33 | }, 34 | }); 35 | 36 | export default class BasicButton extends Component { 37 | 38 | render() { 39 | return ( 40 | 41 | 42 | 49 | 50 | 57 | 58 | 66 | 67 | 74 | 75 | 76 | 77 | ) 78 | } 79 | 80 | } -------------------------------------------------------------------------------- /examples/react-native-smart-corner-label/corner-label.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/22. 6 | */ 7 | 8 | import React, { 9 | Component, 10 | } from 'react' 11 | import { 12 | StyleSheet, 13 | View, 14 | Image, 15 | Text, 16 | } from 'react-native' 17 | 18 | import CornerLabel from 'react-native-smart-corner-label' 19 | 20 | import image_shopping from '../images/shopping.png' 21 | 22 | export default class CornerLabelDemo extends Component { 23 | 24 | render() { 25 | return ( 26 | 27 | 30 | 31 | shopping 32 | 36 | New 37 | 38 | 39 | 42 | 43 | 购物 44 | 49 | 新 50 | 51 | 52 | 55 | 56 | shopping 57 | 61 | 30% off 62 | 63 | 64 | 67 | 68 | 购物 69 | 74 | 7折优惠 75 | 76 | 77 | 78 | ) 79 | } 80 | 81 | } -------------------------------------------------------------------------------- /examples/react-native-smart-gesture-password/gesture-password.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/24. 6 | */ 7 | 8 | import React, { 9 | Component, 10 | } from 'react' 11 | import { 12 | StyleSheet, 13 | Alert, 14 | View, 15 | Text, 16 | Dimensions, 17 | } from 'react-native' 18 | 19 | import GesturePassword from 'react-native-smart-gesture-password' 20 | import Button from 'react-native-smart-button' 21 | 22 | export default class gesturePasswordDemo extends Component { 23 | 24 | // 构造 25 | constructor (props) { 26 | super(props); 27 | // 初始状态 28 | this.state = { 29 | isWarning: false, 30 | message: 'Verify your gesture password', 31 | messageColor: '#A9A9A9', 32 | password: '', 33 | thumbnails: [], 34 | }; 35 | this._cachedPassword = '' 36 | } 37 | 38 | componentDidMount () { 39 | this._cachedPassword = '13457' //get cached gesture password 40 | } 41 | 42 | render () { 43 | return ( 44 | 58 | ) 59 | } 60 | 61 | _renderThumbnails () { 62 | let thumbnails = [] 63 | for (let i = 0; i < 9; i++) { 64 | let active = ~this.state.password.indexOf(i) 65 | thumbnails.push(( 66 | 73 | )) 74 | } 75 | return ( 76 | 77 | {thumbnails} 78 | 79 | ) 80 | } 81 | 82 | _renderDescription = () => { 83 | return ( 84 | 85 | {this._renderThumbnails()} 86 | {this.state.message} 88 | 89 | ) 90 | } 91 | 92 | _renderActions = () => { 93 | return ( 94 | 96 | 101 | 106 | 107 | ) 108 | } 109 | 110 | _onReset = () => { 111 | let isWarning = false 112 | //let password = '' 113 | let message = 'Verify your gesture password' 114 | let messageColor = '#A9A9A9' 115 | this.setState({ 116 | isWarning, 117 | //password, 118 | message, 119 | messageColor, 120 | }) 121 | } 122 | 123 | _onFinish = (password) => { 124 | if (password === this._cachedPassword) { 125 | let isWarning = false 126 | let message = 'Verify succeed' 127 | let messageColor = '#00AAEF' 128 | this.setState({ 129 | isWarning, 130 | password, 131 | message, 132 | messageColor, 133 | }) 134 | } 135 | else { 136 | let isWarning = true 137 | let message 138 | let messageColor = 'red' 139 | if (password.length < 4) { 140 | message = 'Need to link at least 4 points' 141 | } 142 | else { 143 | message = 'Verify failed' 144 | } 145 | this.setState({ 146 | isWarning, 147 | password, 148 | message, 149 | messageColor, 150 | }) 151 | } 152 | Alert.alert('password is ' + password) 153 | } 154 | 155 | } 156 | -------------------------------------------------------------------------------- /examples/react-native-smart-pull-to-refresh-listview/use-with-react-native-scrollable-tab-view.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { 3 | Text, 4 | TouchableHighlight, 5 | ScrollView, 6 | View, 7 | } from 'react-native'; 8 | import TimerMixin from 'react-timer-mixin'; 9 | import ScrollableTabView, { ScrollableTabBar, } from 'react-native-scrollable-tab-view'; 10 | import PullToRefreshListViewDemo2 from './react-native-smart-pull-to-refresh-listview-demo2' 11 | 12 | const Child = React.createClass({ 13 | onEnter() { 14 | console.log('enter: ' + this.props.i); // eslint-disable-line no-console 15 | }, 16 | 17 | onLeave() { 18 | console.log('leave: ' + this.props.i); // eslint-disable-line no-console 19 | }, 20 | 21 | render() { 22 | const i = this.props.i; 23 | return ; 24 | }, 25 | }); 26 | 27 | const ScrollableTabViewDemo = React.createClass({ 28 | mixins: [TimerMixin, ], 29 | children: [], 30 | 31 | getInitialState() { 32 | return { 33 | tabs: [1, 2], 34 | enabled: true, 35 | }; 36 | }, 37 | 38 | componentDidMount() { 39 | this.setTimeout( 40 | () => { this.setState({ tabs: [1, 2, 3, 4, 5, 6, ], }); }, 41 | 100 42 | ); 43 | }, 44 | 45 | handleChangeTab({i, ref, from, }) { 46 | this.children[i].onEnter(); 47 | this.children[from].onLeave(); 48 | }, 49 | 50 | renderTab(name, page, isTabActive, onPressHandler, onLayoutHandler) { 51 | return onPressHandler(page)} 54 | onLayout={onLayoutHandler} 55 | style={{flex: 1, width: 100, }} 56 | underlayColor="#aaaaaa" 57 | > 58 | {name} 59 | ; 60 | }, 61 | 62 | render() { 63 | return } 66 | onChangeTab={this.handleChangeTab} 67 | locked={!this.state.enabled} 68 | > 69 | {this.state.tabs.map((tab, i) => { 70 | return (this.children[i] = ref)} 72 | tabLabel={`tab${i}`} 73 | i={i} 74 | key={i} 75 | />; 76 | })} 77 | ; 78 | }, 79 | 80 | }); 81 | 82 | export default ScrollableTabViewDemo 83 | -------------------------------------------------------------------------------- /examples/react-native-smart-security-text/security-text.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/22. 6 | */ 7 | 8 | import React, { 9 | Component, 10 | } from 'react' 11 | import { 12 | View, 13 | Text, 14 | Image, 15 | } from 'react-native' 16 | 17 | import SecurityText from 'react-native-smart-security-text' 18 | import Button from 'react-native-smart-button' 19 | import image_eye_open from '../images/eye_open.png' 20 | import image_eye_close from '../images/eye_close.png' 21 | 22 | export default class SecurityTextDemo extends Component { 23 | 24 | // 构造 25 | constructor(props) { 26 | super(props) 27 | // 初始状态 28 | this.state = { 29 | isSecurity: false, 30 | } 31 | } 32 | 33 | render() { 34 | return ( 35 | 36 | 42 | 49 | 15912390987 50 | 51 | 58 | 15912390987 59 | 60 | 67 | 15912390987 68 | 69 | 76 | 15912390987 77 | 78 | 85 | 15912390987 86 | 87 | 93 | username 94 | 95 | 101 | address 102 | 103 | 104 | ) 105 | } 106 | 107 | _onSecurityChange = () => { 108 | let isSecurity = !this.state.isSecurity 109 | this.setState({ 110 | isSecurity, 111 | }) 112 | } 113 | 114 | } -------------------------------------------------------------------------------- /examples/react-native-smart-sudoku-grid/three-columns.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/18. 6 | */ 7 | 8 | import React, { 9 | Component, 10 | } from 'react' 11 | import { 12 | ScrollView, 13 | StyleSheet, 14 | View, 15 | Image, 16 | Text, 17 | TouchableHighlight, 18 | Alert, 19 | } from 'react-native' 20 | 21 | import SudokuGrid from 'react-native-smart-sudoku-grid' 22 | import CornerLabel from 'react-native-smart-corner-label' 23 | 24 | import image_cash from '../images/cash.png' 25 | import image_credit from '../images/credit.png' 26 | import image_transfer from '../images/transfer.png' 27 | import image_loan from '../images/loan.png' 28 | import image_charge from '../images/charge.png' 29 | import image_payment from '../images/payment.png' 30 | import image_shopping from '../images/shopping.png' 31 | import image_service from '../images/service.png' 32 | import image_donate from '../images/donate.png' 33 | 34 | const dataList = [ 35 | { 36 | icon: image_cash, 37 | title: 'cash', 38 | }, 39 | { 40 | icon: image_credit, 41 | title: 'credit', 42 | }, 43 | { 44 | icon: image_transfer, 45 | title: 'transfer', 46 | }, 47 | { 48 | icon: image_loan, 49 | title: 'loan', 50 | }, 51 | { 52 | icon: image_charge, 53 | title: 'charge', 54 | }, 55 | { 56 | icon: image_payment, 57 | title: 'payment', 58 | }, 59 | { 60 | icon: image_shopping, 61 | title: 'shopping', 62 | }, 63 | { 64 | icon: image_service, 65 | title: 'service', 66 | }, 67 | { 68 | icon: image_donate, 69 | title: 'donate', 70 | }, 71 | ] 72 | 73 | const columnCount = 3 74 | 75 | export default class ThreeColumns extends Component { 76 | 77 | render () { 78 | return ( 79 | 80 | 81 | Services: 82 | 83 | 89 | 90 | ) 91 | } 92 | 93 | _renderGridCell = (data, index, list) => { 94 | return ( 95 | 96 | 100 | 101 | {data.title} 102 | { index == 6 ? 103 | 107 | 30% off 108 | : index == 3 ? 109 | 114 | 7折优惠 115 | : null 116 | } 117 | 118 | 119 | ) 120 | } 121 | 122 | _onPressCell (data, index) { 123 | Alert.alert('clicked ' + data.title) 124 | } 125 | 126 | } 127 | -------------------------------------------------------------------------------- /examples/react-native-smart-touch-id/touch-id-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @fileOverview 3 | * @author HISAME SHIZUMARU 4 | * @version 5 | * Created on 16/7/21. 6 | */ 7 | 8 | import React, { 9 | Component 10 | } from 'react' 11 | import { 12 | StyleSheet, 13 | View, 14 | Text, 15 | Alert, 16 | } from 'react-native' 17 | 18 | import TouchId from 'react-native-smart-touch-id' 19 | import Button from 'react-native-smart-button' 20 | 21 | export default class TouchIdTest extends Component { 22 | 23 | render () { 24 | return ( 25 | 26 | 33 | 40 | 41 | ) 42 | } 43 | 44 | //_isSupported = () => { 45 | // TouchId.isSupported( (error) => { 46 | // if (error) { 47 | // Alert.alert('TouchId is not supported!') 48 | // } else { 49 | // Alert.alert('TouchId is supported!') 50 | // } 51 | // }) 52 | //} 53 | 54 | _isSupported = async () => { 55 | try { 56 | await TouchId.isSupported() 57 | Alert.alert('TouchId is supported!') 58 | } catch (e) { 59 | Alert.alert('TouchId is not supported!') 60 | } 61 | } 62 | 63 | //_trggerTouchId = () => { 64 | // let description = 'Verify the existing mobile phone fingerprint using the home key' 65 | // //let title //fallback button title will be default as 'Enter Password'(localized) 66 | // //let title = "" //fallback button will be hidden 67 | // let title = "Verify Password" //fallback button title will be 'Verify Password'(unlocalized) 68 | // TouchId.verify(description, title, (error) => { 69 | // if (error) { 70 | // if (error.message == '-3') { 71 | // //fallback button is pressed 72 | // Alert.alert('errorCode: ' + error.message + ' verify failed, user wants to ' + title) 73 | // } 74 | // else { 75 | // Alert.alert('errorCode: ' + error.message + ' verify failed') 76 | // } 77 | // } else { 78 | // Alert.alert('verify succeeded') 79 | // } 80 | // }) 81 | //} 82 | 83 | _trggerTouchId = async () => { 84 | let description = 'Verify the existing mobile phone fingerprint using the home key' 85 | //let title //fallback button title will be default as 'Enter Password'(localized) 86 | //let title = "" //fallback button will be hidden 87 | let title = "Verify Password" //fallback button title will be 'Verify Password'(unlocalized) 88 | try { 89 | await TouchId.verify({ 90 | description, 91 | title, 92 | }); 93 | //await TouchId.verify("123123123123"); 94 | Alert.alert('verify succeeded') 95 | } catch (e) { 96 | if (e.code == '-3') { 97 | //fallback button is pressed 98 | Alert.alert('errorCode: ' + e.code + ' verify failed, user wants to ' + title) 99 | } 100 | else { 101 | Alert.alert('errorCode: ' + e.code + ' verify failed') 102 | } 103 | } 104 | } 105 | 106 | } -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Navigator, 12 | Text, 13 | TouchableOpacity, 14 | } from 'react-native'; 15 | 16 | import ReactNativeComponentList from './examples/android/react-native-component-list' 17 | 18 | import SplashScreen from 'react-native-smart-splash-screen' 19 | 20 | class ReactNativeComponentDemos extends Component { 21 | 22 | constructor (props, context) { 23 | super(props); 24 | } 25 | 26 | componentDidMount () { 27 | SplashScreen.close({ 28 | animationType: SplashScreen.animationType.scale, 29 | duration: 1000, 30 | delay: 500, 31 | }) 32 | } 33 | 34 | render () { 35 | return ( 36 | { 43 | let Component = route.component; 44 | return ( 45 | 49 | )}} 50 | navigationBar={ 51 | { 53 | this.navigationBar = navigationBar 54 | }} 55 | routeMapper={NavigationBarRouteMapper} 56 | style={styles.navBar} /> } 57 | /> 58 | ) 59 | } 60 | } 61 | 62 | let NavigationBarRouteMapper = { 63 | 64 | LeftButton: function (route, navigator, index, navState) { 65 | if (index === 0) { 66 | return null; 67 | } 68 | 69 | var previousRoute = navState.routeStack[ index - 1 ]; 70 | return ( 71 | navigator.pop()} 73 | style={styles.navBarLeftButton}> 74 | 75 | back 76 | 77 | 78 | ); 79 | }, 80 | 81 | RightButton: function (route, navigator, index, navState) { 82 | return null 83 | }, 84 | 85 | Title: function (route, navigator, index, navState) { 86 | return ( 87 | 88 | {route.title} 89 | 90 | ) 91 | }, 92 | 93 | }; 94 | 95 | const styles = StyleSheet.create({ 96 | navigatorBg: { 97 | backgroundColor: '#F4F4F4', 98 | }, 99 | navBar: { 100 | backgroundColor: 'black', 101 | }, 102 | navBarText: { 103 | fontSize: 16, 104 | margin: 10, 105 | color: 'white', 106 | }, 107 | navBarTitleText: { 108 | color: 'white', 109 | fontWeight: '500', 110 | marginVertical: 9, 111 | }, 112 | }) 113 | 114 | AppRegistry.registerComponent('ReactNativeComponentDemos', () => ReactNativeComponentDemos); 115 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Sample React Native App 3 | * https://github.com/facebook/react-native 4 | * @flow 5 | */ 6 | 7 | import React, { Component } from 'react'; 8 | import { 9 | AppRegistry, 10 | StyleSheet, 11 | Navigator, 12 | Text, 13 | TouchableOpacity, 14 | } from 'react-native'; 15 | 16 | import ReactNativeComponentList from './examples/ios/react-native-component-list' 17 | 18 | import SplashScreen from 'react-native-smart-splash-screen' 19 | 20 | class ReactNativeComponentDemos extends Component { 21 | 22 | constructor (props, context) { 23 | super(props); 24 | } 25 | 26 | componentDidMount () { 27 | SplashScreen.close({ 28 | animationType: SplashScreen.animationType.scale, 29 | duration: 850, 30 | delay: 500, 31 | }) 32 | } 33 | 34 | render () { 35 | return ( 36 | { 43 | let Component = route.component; 44 | return ( 45 | 49 | )}} 50 | navigationBar={ 51 | { 53 | this.navigationBar = navigationBar 54 | }} 55 | routeMapper={NavigationBarRouteMapper} 56 | style={styles.navBar} /> } 57 | /> 58 | ) 59 | } 60 | } 61 | 62 | let NavigationBarRouteMapper = { 63 | 64 | LeftButton: function (route, navigator, index, navState) { 65 | if (index === 0) { 66 | return null; 67 | } 68 | 69 | var previousRoute = navState.routeStack[ index - 1 ]; 70 | return ( 71 | navigator.pop()} 73 | style={styles.navBarLeftButton}> 74 | 75 | back 76 | 77 | 78 | ); 79 | }, 80 | 81 | RightButton: function (route, navigator, index, navState) { 82 | return null 83 | }, 84 | 85 | Title: function (route, navigator, index, navState) { 86 | return ( 87 | 88 | {route.title} 89 | 90 | ) 91 | }, 92 | 93 | }; 94 | 95 | const styles = StyleSheet.create({ 96 | navigatorBg: { 97 | backgroundColor: '#F4F4F4', 98 | }, 99 | navBar: { 100 | backgroundColor: 'black', 101 | }, 102 | navBarText: { 103 | fontSize: 16, 104 | margin: 10, 105 | color: 'white', 106 | }, 107 | navBarTitleText: { 108 | color: 'white', 109 | fontWeight: '500', 110 | marginVertical: 9, 111 | }, 112 | }) 113 | 114 | AppRegistry.registerComponent('ReactNativeComponentDemos', () => ReactNativeComponentDemos); 115 | -------------------------------------------------------------------------------- /ios/AMapResources/gpsStat1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/AMapResources/gpsStat1@2x.png -------------------------------------------------------------------------------- /ios/AMapResources/icon_location@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/AMapResources/icon_location@2x.png -------------------------------------------------------------------------------- /ios/AMapResources/icon_location@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/AMapResources/icon_location@3x.png -------------------------------------------------------------------------------- /ios/AliPayResouces/AlipaySDK.bundle/bar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/AliPayResouces/AlipaySDK.bundle/bar@2x.png -------------------------------------------------------------------------------- /ios/AliPayResouces/AlipaySDK.bundle/refresh@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/AliPayResouces/AlipaySDK.bundle/refresh@2x.png -------------------------------------------------------------------------------- /ios/AliPayResouces/AlipaySDK.bundle/refresh_click@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/AliPayResouces/AlipaySDK.bundle/refresh_click@2x.png -------------------------------------------------------------------------------- /ios/AliPayResouces/AlipaySDK.bundle/shutdown@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/AliPayResouces/AlipaySDK.bundle/shutdown@2x.png -------------------------------------------------------------------------------- /ios/AliPayResouces/AlipaySDK.bundle/shutdown_click@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/AliPayResouces/AlipaySDK.bundle/shutdown_click@2x.png -------------------------------------------------------------------------------- /ios/Frameworks/AMapFoundationKit.framework/1.3.2.d4e0936: -------------------------------------------------------------------------------- 1 | 1.3.2.d4e0936 2 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapFoundationKit.framework/AMapFoundationKit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/AMapFoundationKit.framework/AMapFoundationKit -------------------------------------------------------------------------------- /ios/Frameworks/AMapFoundationKit.framework/Headers/AMapFoundationKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapFoundationKit.h 3 | // AMapFoundationKit 4 | // 5 | // Created by xiaoming han on 15/10/28. 6 | // Copyright © 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | 15 | #import 16 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapFoundationKit.framework/Headers/AMapFoundationVersion.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapFoundationVersion.h 3 | // AMapFoundation 4 | // 5 | // Created by xiaoming han on 15/10/26. 6 | // Copyright © 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #ifndef AMapFoundationVersion_h 12 | #define AMapFoundationVersion_h 13 | 14 | #define AMapFoundationVersionNumber 10302 15 | 16 | FOUNDATION_EXTERN NSString * const AMapFoundationVersion; 17 | FOUNDATION_EXTERN NSString * const AMapFoundationName; 18 | 19 | #endif /* AMapFoundationVersion_h */ 20 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapFoundationKit.framework/Headers/AMapServices.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapSearchServices.h 3 | // AMapSearchKit 4 | // 5 | // Created by xiaoming han on 15/6/18. 6 | // Copyright (c) 2015年 xiaoming han. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AMapServices : NSObject 12 | 13 | + (AMapServices *)sharedServices; 14 | 15 | /** 16 | * APIkey。设置key,需要绑定对应的bundle id。 17 | */ 18 | @property (nonatomic, copy) NSString *apiKey; 19 | 20 | /** 21 | * 是否开启HTTPS,默认为NO。 22 | * 目前已支持服务:key鉴权、云图、搜索。 23 | */ 24 | @property (nonatomic, assign) BOOL enableHTTPS; 25 | 26 | /** 27 | * 是否启用崩溃日志上传。默认为YES, 只有在真机上设置有效。 28 | * 开启崩溃日志上传有助于我们更好的了解SDK的状况,可以帮助我们持续优化和改进SDK。 29 | * 需要注意的是,我是通过设置NSUncaughtExceptionHandler来捕获异常的,如果您的APP中使用了其他收集崩溃日志的SDK,或者自己有设置NSUncaughtExceptionHandler的话,请保证 AMapServices 的初始化是在其他设置NSUncaughtExceptionHandler操作之后进行的,我们的handler会再处理完异常后调用前一次设置的handler,保证之前设置的handler会被执行。 30 | */ 31 | @property (nonatomic, assign) BOOL crashReportEnabled; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapFoundationKit.framework/Headers/AMapURLSearch.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapURLSearch.h 3 | // AMapFoundation 4 | // 5 | // Created by xiaoming han on 15/10/28. 6 | // Copyright © 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AMapURLSearchConfig.h" 11 | 12 | /// 调起高德地图URL进行搜索,若是调起失败,可使用`+ (void)getLatestAMapApp;`方法获取最新版高德地图app. 13 | @interface AMapURLSearch : NSObject 14 | 15 | /// 打开高德地图AppStore页面 16 | + (void)getLatestAMapApp; 17 | 18 | /** 19 | * 调起高德地图app驾车导航. 20 | * 21 | * @param config 配置参数. 22 | * 23 | * @return 是否成功.若为YES则成功调起,若为NO则无法调起. 24 | */ 25 | + (BOOL)openAMapNavigation:(AMapNaviConfig *)config; 26 | 27 | /** 28 | * 调起高德地图app进行路径规划. 29 | * 30 | * @param config 配置参数. 31 | * 32 | * @return 是否成功. 33 | */ 34 | + (BOOL)openAMapRouteSearch:(AMapRouteConfig *)config; 35 | 36 | /** 37 | * 调起高德地图app进行POI搜索. 38 | * 39 | * @param config 配置参数. 40 | * 41 | * @return 是否成功. 42 | */ 43 | + (BOOL)openAMapPOISearch:(AMapPOIConfig *)config; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapFoundationKit.framework/Headers/AMapURLSearchConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAMapURLSearchConfig.h 3 | // MAMapKitNew 4 | // 5 | // Created by xiaoming han on 15/5/25. 6 | // Copyright (c) 2015年 xiaoming han. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "AMapURLSearchType.h" 12 | 13 | /// 导航配置信息 14 | @interface AMapNaviConfig : NSObject 15 | 16 | /// 应用返回的Scheme 17 | @property (nonatomic, copy) NSString *appScheme; 18 | 19 | /// 应用名称 20 | @property (nonatomic, copy) NSString *appName; 21 | 22 | /// 终点 23 | @property (nonatomic, assign) CLLocationCoordinate2D destination; 24 | 25 | /// 导航策略 26 | @property (nonatomic, assign) AMapDrivingStrategy strategy; 27 | 28 | @end 29 | 30 | #pragma mark - 31 | 32 | /// 路径搜索配置信息 33 | @interface AMapRouteConfig : NSObject 34 | 35 | /// 应用返回的Scheme 36 | @property (nonatomic, copy) NSString *appScheme; 37 | 38 | /// 应用名称 39 | @property (nonatomic, copy) NSString *appName; 40 | 41 | /// 起点坐标 42 | @property (nonatomic, assign) CLLocationCoordinate2D startCoordinate; 43 | 44 | /// 终点坐标 45 | @property (nonatomic, assign) CLLocationCoordinate2D destinationCoordinate; 46 | 47 | /// 驾车策略 48 | @property (nonatomic, assign) AMapDrivingStrategy drivingStrategy; 49 | 50 | /// 公交策略 51 | @property (nonatomic, assign) AMapTransitStrategy transitStrategy; 52 | 53 | /// 路径规划类型 54 | @property (nonatomic, assign) AMapRouteSearchType routeType; 55 | 56 | @end 57 | 58 | #pragma mark - 59 | 60 | /// POI搜索配置信息 61 | @interface AMapPOIConfig : NSObject 62 | 63 | /// 应用返回的Scheme 64 | @property (nonatomic, copy) NSString *appScheme; 65 | 66 | /// 应用名称 67 | @property (nonatomic, copy) NSString *appName; 68 | 69 | /// 搜索关键字 70 | @property (nonatomic, copy) NSString *keywords; 71 | 72 | /// 左上角坐标 73 | @property (nonatomic, assign) CLLocationCoordinate2D leftTopCoordinate; 74 | 75 | /// 右下角坐标 76 | @property (nonatomic, assign) CLLocationCoordinate2D rightBottomCoordinate; 77 | 78 | @end 79 | 80 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapFoundationKit.framework/Headers/AMapURLSearchType.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAMapURLSearchType.h 3 | // MAMapKitNew 4 | // 5 | // Created by xiaoming han on 15/5/25. 6 | // Copyright (c) 2015年 xiaoming han. All rights reserved. 7 | // 8 | 9 | /// 驾车策略 10 | typedef NS_ENUM(NSInteger, AMapDrivingStrategy) 11 | { 12 | AMapDrivingStrategyFastest = 0, //速度最快 13 | AMapDrivingStrategyMinFare = 1, //避免收费 14 | AMapDrivingStrategyShortest = 2, //距离最短 15 | 16 | AMapDrivingStrategyNoHighways = 3, //不走高速 17 | AMapDrivingStrategyAvoidCongestion = 4, //躲避拥堵 18 | 19 | AMapDrivingStrategyAvoidHighwaysAndFare = 5, //不走高速且避免收费 20 | AMapDrivingStrategyAvoidHighwaysAndCongestion = 6, //不走高速且躲避拥堵 21 | AMapDrivingStrategyAvoidFareAndCongestion = 7, //躲避收费和拥堵 22 | AMapDrivingStrategyAvoidHighwaysAndFareAndCongestion = 8 //不走高速躲避收费和拥堵 23 | }; 24 | 25 | /// 公交策略 26 | typedef NS_ENUM(NSInteger, AMapTransitStrategy) 27 | { 28 | AMapTransitStrategyFastest = 0,//最快捷 29 | AMapTransitStrategyMinFare = 1,//最经济 30 | AMapTransitStrategyMinTransfer = 2,//最少换乘 31 | AMapTransitStrategyMinWalk = 3,//最少步行 32 | AMapTransitStrategyMostComfortable = 4,//最舒适 33 | AMapTransitStrategyAvoidSubway = 5,//不乘地铁 34 | }; 35 | 36 | /// 路径规划类型 37 | typedef NS_ENUM(NSInteger, AMapRouteSearchType) 38 | { 39 | AMapRouteSearchTypeDriving = 0, //驾车 40 | AMapRouteSearchTypeTransit = 1, //公交 41 | AMapRouteSearchTypeWalking = 2, //步行 42 | }; 43 | 44 | 45 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapFoundationKit.framework/Headers/AMapUtility.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapUtility.h 3 | // AMapFoundation 4 | // 5 | // Created by xiaoming han on 15/10/27. 6 | // Copyright © 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | /** 13 | * 工具方法 14 | */ 15 | 16 | FOUNDATION_STATIC_INLINE NSString * AMapEmptyStringIfNil(NSString *s) 17 | { 18 | return s ? s : @""; 19 | } 20 | 21 | 22 | /// 坐标类型枚举 23 | typedef NS_ENUM(NSUInteger, AMapCoordinateType) 24 | { 25 | AMapCoordinateTypeBaidu = 0, // Baidu 26 | AMapCoordinateTypeMapBar, // MapBar 27 | AMapCoordinateTypeMapABC, // MapABC 28 | AMapCoordinateTypeSoSoMap, // SoSoMap 29 | AMapCoordinateTypeAliYun, // AliYun 30 | AMapCoordinateTypeGoogle, // Google 31 | AMapCoordinateTypeGPS, // GPS 32 | }; 33 | 34 | /** 35 | * 转换目标经纬度为高德坐标系 36 | * 37 | * @param coordinate 待转换的经纬度 38 | * @param type 坐标系类型 39 | * 40 | * @return 高德坐标系经纬度 41 | */ 42 | FOUNDATION_EXTERN CLLocationCoordinate2D AMapCoordinateConvert(CLLocationCoordinate2D coordinate, AMapCoordinateType type); 43 | 44 | /** 45 | * 判断目标经纬度是否在大陆以及港、澳地区。输入参数为高德坐标系。 46 | * 47 | * @param coordinate 待判断的目标经纬度 48 | * @return 是否在大陆以及港、澳地区 49 | */ 50 | FOUNDATION_EXTERN BOOL AMapDataAvailableForCoordinate(CLLocationCoordinate2D coordinate); 51 | 52 | 53 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapLocationKit.framework/2.2.0.3c0ed2d: -------------------------------------------------------------------------------- 1 | 2.2.0.3c0ed2d 2 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapLocationKit.framework/AMapLocationKit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/AMapLocationKit.framework/AMapLocationKit -------------------------------------------------------------------------------- /ios/Frameworks/AMapLocationKit.framework/Headers/AMapLocationCommonObj.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapLocationCommonObj.h 3 | // AMapLocationKit 4 | // 5 | // Created by AutoNavi on 15/10/22. 6 | // Copyright © 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | /** AMapLocation errorDomain */ 13 | extern NSString * const AMapLocationErrorDomain; 14 | 15 | /** AMapLocation errorCode */ 16 | typedef NS_ENUM(NSInteger, AMapLocationErrorCode) 17 | { 18 | AMapLocationErrorUnknown = 1, //!< 未知错误 19 | AMapLocationErrorLocateFailed = 2, //!< 定位错误 20 | AMapLocationErrorReGeocodeFailed = 3, //!< 逆地理错误 21 | AMapLocationErrorTimeOut = 4, //!< 超时 22 | AMapLocationErrorCanceled = 5, //!< 取消 23 | AMapLocationErrorCannotFindHost = 6, //!< 找不到主机 24 | AMapLocationErrorBadURL = 7, //!< URL异常 25 | AMapLocationErrorNotConnectedToInternet = 8,//!< 连接异常 26 | AMapLocationErrorCannotConnectToHost = 9, //!< 服务器连接失败 27 | AMapLocationErrorRegionMonitoringFailure=10,//!< 地理围栏错误 28 | }; 29 | 30 | /** AMapLocation Region State */ 31 | typedef NS_ENUM(NSInteger, AMapLocationRegionState) 32 | { 33 | AMapLocationRegionStateUnknow = 0, //!< 未知 34 | AMapLocationRegionStateInside = 1, //!< 在范围内 35 | AMapLocationRegionStateOutside = 2, //!< 在范围外 36 | }; 37 | 38 | /** 39 | * 逆地理信息 40 | */ 41 | @interface AMapLocationReGeocode : NSObject 42 | 43 | @property (nonatomic, copy) NSString *formattedAddress;//!< 格式化地址 44 | 45 | @property (nonatomic, copy) NSString *country; //!< 国家 46 | @property (nonatomic, copy) NSString *province; //!< 省/直辖市 47 | @property (nonatomic, copy) NSString *city; //!< 市 48 | @property (nonatomic, copy) NSString *district; //!< 区 49 | @property (nonatomic, copy) NSString *township __attribute((deprecated("该字段从v2.2.0版本起不再返回数据,建议您使用AMapSearchKit的逆地理功能获取."))); //!< 乡镇 50 | @property (nonatomic, copy) NSString *neighborhood __attribute((deprecated("该字段从v2.2.0版本起不再返回数据,建议您使用AMapSearchKit的逆地理功能获取."))); //!< 社区 51 | @property (nonatomic, copy) NSString *building __attribute((deprecated("该字段从v2.2.0版本起不再返回数据,建议您使用AMapSearchKit的逆地理功能获取."))); //!< 建筑 52 | @property (nonatomic, copy) NSString *citycode; //!< 城市编码 53 | @property (nonatomic, copy) NSString *adcode; //!< 区域编码 54 | 55 | @property (nonatomic, copy) NSString *street; //!< 街道名称 56 | @property (nonatomic, copy) NSString *number; //!< 门牌号 57 | 58 | @property (nonatomic, copy) NSString *POIName; //!< 兴趣点名称 59 | @property (nonatomic, copy) NSString *AOIName; //!< 所属兴趣点名称 60 | 61 | @end 62 | 63 | /** AMapLocation CoordinateType */ 64 | typedef NS_ENUM(NSUInteger, AMapLocationCoordinateType) 65 | { 66 | AMapLocationCoordinateTypeBaidu = 0, //!< Baidu 67 | AMapLocationCoordinateTypeMapBar, //!< MapBar 68 | AMapLocationCoordinateTypeMapABC, //!< MapABC 69 | AMapLocationCoordinateTypeSoSoMap, //!< SoSoMap 70 | AMapLocationCoordinateTypeAliYun, //!< AliYun 71 | AMapLocationCoordinateTypeGoogle, //!< Google 72 | AMapLocationCoordinateTypeGPS, //!< GPS 73 | }; 74 | 75 | /** 76 | * 转换目标经纬度为高德坐标系 77 | * 78 | * @param coordinate 待转换的经纬度 79 | * @param type 坐标系类型 80 | * @return 高德坐标系经纬度 81 | */ 82 | FOUNDATION_EXTERN CLLocationCoordinate2D AMapLocationCoordinateConvert(CLLocationCoordinate2D coordinate, AMapLocationCoordinateType type); 83 | 84 | /** 85 | * 判断目标经纬度是否在大陆以及港、澳地区。输入参数为高德坐标系。 86 | * 87 | * @param coordinate 待判断的目标经纬度 88 | * @return 是否在大陆以及港、澳地区 89 | */ 90 | FOUNDATION_EXTERN BOOL AMapLocationDataAvailableForCoordinate(CLLocationCoordinate2D coordinate); 91 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapLocationKit.framework/Headers/AMapLocationKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapLocationKit.h 3 | // AMapLocationKit 4 | // 5 | // Created by AutoNavi on 15/10/22. 6 | // Copyright © 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import 12 | #import 13 | #import 14 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapLocationKit.framework/Headers/AMapLocationRegionObj.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapLocationRegionObj.h 3 | // AMapLocationKit 4 | // 5 | // Created by AutoNavi on 15/11/27. 6 | // Copyright © 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "AMapLocationCommonObj.h" 10 | 11 | /// 以下类涉及的坐标需要使用高德坐标系坐标(GCJ02) 12 | 13 | #pragma mark - AMapLocationRegion 14 | 15 | /** 16 | * AMapLocationRegion类,该类提供范围类的基本信息,并无具体实现,不要直接使用。 17 | */ 18 | @interface AMapLocationRegion : NSObject 19 | 20 | /** 21 | * 初始化方法 22 | * 23 | * @param identifier 唯一标识符,必填,不可为nil 24 | */ 25 | - (instancetype)initWithIdentifier:(NSString *)identifier; 26 | 27 | /** 28 | * AMapLocationRegion的identifier 29 | */ 30 | @property (nonatomic, copy, readonly) NSString *identifier; 31 | 32 | /** 33 | * 当进入region范围时是否通知,默认YES 34 | */ 35 | @property (nonatomic, assign) BOOL notifyOnEntry; 36 | 37 | /** 38 | * 当离开region范围时是否通知,默认YES 39 | */ 40 | @property (nonatomic, assign) BOOL notifyOnExit; 41 | 42 | /** 43 | * 坐标点是否在范围内 44 | * 45 | * @param coordinate 要判断的坐标点 46 | * @return 是否在范围内 47 | */ 48 | - (BOOL)containsCoordinate:(CLLocationCoordinate2D)coordinate; 49 | 50 | @end 51 | 52 | #pragma mark - AMapLocationCircleRegion 53 | 54 | /** 55 | * AMapLocationCircleRegion类,定义一个圆形范围。 56 | */ 57 | @interface AMapLocationCircleRegion : AMapLocationRegion 58 | 59 | /** 60 | * 根据中心点和半径生成圆形范围 61 | * 62 | * @param center 中心点的经纬度坐标 63 | * @param radius 半径,单位:米 64 | * @param identifier 唯一标识符,必填,不可为nil 65 | * @return AMapLocationCircleRegion类实例 66 | */ 67 | - (instancetype)initWithCenter:(CLLocationCoordinate2D)center radius:(CLLocationDistance)radius identifier:(NSString *)identifier; 68 | 69 | /** 70 | * 中心点的经纬度坐标 71 | */ 72 | @property (nonatomic, readonly) CLLocationCoordinate2D center; 73 | 74 | /** 75 | * 半径,单位:米 76 | */ 77 | @property (nonatomic, readonly) CLLocationDistance radius; 78 | 79 | @end 80 | 81 | #pragma mark - AMapLocationPolygonRegion 82 | 83 | /** 84 | * AMapLocationCircleRegion类,定义一个闭合多边形范围,点与点之间按顺序尾部相连, 第一个点与最后一个点相连。 85 | */ 86 | @interface AMapLocationPolygonRegion : AMapLocationRegion 87 | 88 | /** 89 | * 根据经纬度坐标数据生成闭合多边形范围 90 | * 91 | * @param coordinates 经纬度坐标点数据,coordinates对应的内存会拷贝,调用者负责该内存的释放 92 | * @param count 经纬度坐标点的个数,不可小于3个 93 | * @param identifier 唯一标识符,必填,不可为nil 94 | * @return AMapLocationCircleRegion类实例 95 | */ 96 | - (instancetype)initWithCoordinates:(CLLocationCoordinate2D *)coordinates count:(NSInteger)count identifier:(NSString *)identifier; 97 | 98 | /** 99 | * 经纬度坐标点数据 100 | */ 101 | @property (nonatomic, readonly) CLLocationCoordinate2D *coordinates; 102 | 103 | /** 104 | * 经纬度坐标点的个数 105 | */ 106 | @property (nonatomic, readonly) NSInteger count; 107 | 108 | @end 109 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapLocationKit.framework/Headers/AMapLocationVersion.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapLoctionVersion.h 3 | // AMapLocationKit 4 | // 5 | // Created by AutoNavi on 16/1/22. 6 | // Copyright © 2016年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #ifndef AMapLoctionVersion_h 13 | #define AMapLoctionVersion_h 14 | 15 | #define AMapLocationVersionNumber 20200 16 | #define AMapLocationFoundationVersionMinRequired 10300 17 | 18 | // 依赖库版本检测 19 | #if AMapFoundationVersionNumber < AMapLocationFoundationVersionMinRequired 20 | #error "The AMapFoundationKit version is less than minimum required, please update! Any questions please to visit http://lbs.amap.com" 21 | #endif 22 | 23 | FOUNDATION_EXTERN NSString * const AMapLocationVersion; 24 | FOUNDATION_EXTERN NSString * const AMapLocationName; 25 | 26 | #endif /* AMapLoctionVersion_h */ 27 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapSearchKit.framework/4.4.0.5bd4275: -------------------------------------------------------------------------------- 1 | 4.4.0.5bd4275 2 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapSearchKit.framework/AMapSearchKit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/AMapSearchKit.framework/AMapSearchKit -------------------------------------------------------------------------------- /ios/Frameworks/AMapSearchKit.framework/Headers/AMapNearbySearchManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapNearbySearchManager.h 3 | // AMapSearchKit 4 | // 5 | // Created by xiaoming han on 15/8/31. 6 | // Copyright (c) 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AMapSearchError.h" 11 | 12 | @class AMapNearbySearchManager; 13 | @class AMapNearbyUploadInfo; 14 | 15 | /// 附近搜索代理 16 | @protocol AMapNearbySearchManagerDelegate 17 | @optional 18 | 19 | /* 20 | * 开启自动上传,需实现该回调。 21 | */ 22 | - (AMapNearbyUploadInfo *)nearbyInfoForUploading:(AMapNearbySearchManager *)manager; 23 | 24 | /** 25 | * 用户信息上传完毕回调。 26 | * 27 | * @param error 错误,为空时表示成功。 28 | */ 29 | - (void)onNearbyInfoUploadedWithError:(NSError *)error; 30 | 31 | /** 32 | * 用户信息清除完毕回调。 33 | * 34 | * @param error 错误,为空时表示成功。 35 | */ 36 | - (void)onUserInfoClearedWithError:(NSError *)error; 37 | 38 | 39 | @end 40 | 41 | /// 附近搜索管理类,同时只能有一个实例开启,否则可能会出现错误。 42 | @interface AMapNearbySearchManager : NSObject 43 | 44 | /** 45 | * manager单例. 46 | * 47 | * 初始化之前请设置key,否则将无法正常使用该服务. 48 | * 49 | * @return nearbySearch实例。 50 | */ 51 | + (instancetype)sharedInstance; 52 | 53 | /// 请使用单例。 54 | - (instancetype)init __attribute__((unavailable)); 55 | 56 | /// 上传最小间隔,默认15s,最小7s。自动上传的过程中设置无效。 57 | @property (nonatomic, assign) NSTimeInterval uploadTimeInterval; 58 | 59 | /// 代理对象。 60 | @property (nonatomic, weak) id delegate; 61 | 62 | /// 是否正在自动上传状态中。 63 | @property (nonatomic, readonly) BOOL isAutoUploading; 64 | 65 | /** 66 | * 启动自动上传。 67 | */ 68 | - (void)startAutoUploadNearbyInfo; 69 | 70 | /** 71 | * 关闭自动上传。 72 | */ 73 | - (void)stopAutoUploadNearbyInfo; 74 | 75 | /** 76 | * 执行单次上传,执行间隔不低于uploadTimeInterval最小值,否则执行失败。 77 | * 78 | * @param info 需要上传的信息。 79 | * 80 | * @return 成功执行返回YES,否则返回NO。 81 | */ 82 | - (BOOL)uploadNearbyInfo:(AMapNearbyUploadInfo *)info; 83 | 84 | /** 85 | * 清除服务器上某一用户的信息。 86 | * 87 | * @param userID 指定的用户ID 88 | * 89 | * @return 成功执行返回YES,否则返回NO。 90 | */ 91 | - (BOOL)clearUserInfoWithID:(NSString *)userID; 92 | 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapSearchKit.framework/Headers/AMapNearbyUploadInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapNearbyUploadInfo.h 3 | // AMapSearchKit 4 | // 5 | // Created by xiaoming han on 15/9/6. 6 | // Copyright (c) 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | /// 上传经纬度类型 13 | typedef NS_ENUM(NSInteger, AMapSearchCoordinateType) 14 | { 15 | AMapSearchCoordinateTypeGPS = 1, //!< 标准GPS坐标 16 | AMapSearchCoordinateTypeAMap = 2, //!< 高德坐标 17 | }; 18 | 19 | 20 | /// 附近搜索上传信息 21 | @interface AMapNearbyUploadInfo : NSObject 22 | 23 | /** 24 | * 用户唯一标识,不能为空,否则上传会失败。 25 | * 长度不超过32字符,只能包含英文、数字、下划线、短横杠. 26 | */ 27 | @property (nonatomic, copy) NSString *userID; 28 | 29 | /// 坐标类型,默认是 AMapSearchCoordinateTypeAMap 30 | @property (nonatomic, assign) AMapSearchCoordinateType coordinateType; 31 | 32 | /// 用户位置经纬度。 33 | @property (nonatomic, assign) CLLocationCoordinate2D coordinate; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapSearchKit.framework/Headers/AMapSearchError.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapSearchError.h 3 | // AMapSearchKit 4 | // 5 | // Created by xiaoming han on 15/7/29. 6 | // Copyright (c) 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #ifndef AMapSearchKit_AMapSearchError_h 10 | #define AMapSearchKit_AMapSearchError_h 11 | 12 | /** AMapSearch errorDomain */ 13 | extern NSString * const AMapSearchErrorDomain; 14 | 15 | /** AMapSearch errorCode */ 16 | typedef NS_ENUM(NSInteger, AMapSearchErrorCode) 17 | { 18 | AMapSearchErrorOK = 1000,//!< 没有错误 19 | AMapSearchErrorInvalidSignature = 1001,//!< 无效签名 20 | AMapSearchErrorInvalidUserKey = 1002,//!< key非法或过期 21 | AMapSearchErrorServiceNotAvailable = 1003,//!< 没有权限使用相应的接口 22 | AMapSearchErrorDailyQueryOverLimit = 1004,//!< 访问已超出日访问量 23 | AMapSearchErrorTooFrequently = 1005,//!< 用户访问过于频繁 24 | AMapSearchErrorInvalidUserIP = 1006,//!< 用户IP无效 25 | AMapSearchErrorInvalidUserDomain = 1007,//!< 用户域名无效 26 | AMapSearchErrorInvalidUserSCode = 1008,//!< 安全码验证错误,bundleID与key不对应 27 | AMapSearchErrorUserKeyNotMatch = 1009,//!< 请求key与绑定平台不符 28 | AMapSearchErrorIPQueryOverLimit = 1010,//!< IP请求超限 29 | AMapSearchErrorNotSupportHttps = 1011,//!< 不支持HTTPS请求 30 | AMapSearchErrorInsufficientPrivileges = 1012,//!< 权限不足,服务请求被拒绝 31 | AMapSearchErrorUserKeyRecycled = 1013,//!< 开发者key被删除,无法正常使用 32 | 33 | AMapSearchErrorInvalidResponse = 1100,//!< 请求服务响应错误 34 | AMapSearchErrorInvalidEngineData = 1101,//!< 引擎返回数据异常 35 | AMapSearchErrorConnectTimeout = 1102,//!< 服务端请求链接超时 36 | AMapSearchErrorReturnTimeout = 1103,//!< 读取服务结果超时 37 | AMapSearchErrorInvalidParams = 1200,//!< 请求参数非法 38 | AMapSearchErrorMissingRequiredParams = 1201,//!< 缺少必填参数 39 | AMapSearchErrorIllegalRequest = 1202,//!< 请求协议非法 40 | AMapSearchErrorServiceUnknown = 1203,//!< 其他服务端未知错误 41 | 42 | AMapSearchErrorClientUnknown = 1800,//!< 客户端未知错误,服务返回结果为空或其他错误 43 | AMapSearchErrorInvalidProtocol = 1801,//!< 协议解析错误,通常是返回结果无法解析 44 | AMapSearchErrorTimeOut = 1802,//!< 连接超时 45 | AMapSearchErrorBadURL = 1803,//!< URL异常 46 | AMapSearchErrorCannotFindHost = 1804,//!< 找不到主机 47 | AMapSearchErrorCannotConnectToHost = 1805,//!< 服务器连接失败 48 | AMapSearchErrorNotConnectedToInternet = 1806,//!< 连接异常,通常为没有网络的情况 49 | AMapSearchErrorCancelled = 1807,//!< 连接取消 50 | 51 | AMapSearchErrorTableIDNotExist = 2000,//!< table id 格式不正确 52 | AMapSearchErrorIDNotExist = 2001,//!< id 不存在 53 | AMapSearchErrorServiceMaintenance = 2002,//!< 服务器维护中 54 | AMapSearchErrorEngineTableIDNotExist = 2003,//!< key对应的table id 不存在 55 | AMapSearchErrorInvalidNearbyUserID = 2100,//!< 找不到对应userID的信息 56 | AMapSearchErrorNearbyKeyNotBind = 2101,//!< key未开通“附近”功能 57 | 58 | AMapSearchErrorOutOfService = 3000,//!< 规划点(包括起点、终点、途经点)不在中国范围内 59 | AMapSearchErrorNoRoadsNearby = 3001,//!< 规划点(包括起点、终点、途经点)附近搜不到道路 60 | AMapSearchErrorRouteFailed = 3002,//!< 路线计算失败,通常是由于道路连通关系导致 61 | AMapSearchErrorOverDirectionRange = 3003,//!< 起点终点距离过长 62 | 63 | AMapSearchErrorShareLicenseExpired = 4000,//!< 短串分享认证失败 64 | AMapSearchErrorShareFailed = 4001,//!< 短串请求失败 65 | }; 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /ios/Frameworks/AMapSearchKit.framework/Headers/AMapSearchKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapSearchKit.h 3 | // AMapSearchKit 4 | // 5 | // Created by xiaoming han on 15/7/22. 6 | // Copyright (c) 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | #import 15 | 16 | #import -------------------------------------------------------------------------------- /ios/Frameworks/AMapSearchKit.framework/Headers/AMapSearchVersion.h: -------------------------------------------------------------------------------- 1 | // 2 | // AMapSearchVersion.h 3 | // AMapSearchKit 4 | // 5 | // Created by xiaoming han on 15/10/27. 6 | // Copyright © 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | #ifndef AMapSearchVersion_h 13 | #define AMapSearchVersion_h 14 | 15 | #define AMapSearchVersionNumber 40400 16 | #define AMapSearchMinRequiredFoundationVersion 10200 17 | 18 | // 依赖库版本检测 19 | #if AMapFoundationVersionNumber < AMapSearchMinRequiredFoundationVersion 20 | #error "The AMapFoundationKit version is less than minimum required, please update! Any questions please to visit http://lbs.amap.com" 21 | #endif 22 | 23 | FOUNDATION_EXTERN NSString * const AMapSearchVersion; 24 | FOUNDATION_EXTERN NSString * const AMapSearchName; 25 | 26 | #endif /* AMapSearchVersion_h */ 27 | -------------------------------------------------------------------------------- /ios/Frameworks/AlipaySDK.framework/AlipaySDK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/AlipaySDK.framework/AlipaySDK -------------------------------------------------------------------------------- /ios/Frameworks/AlipaySDK.framework/Headers/APayAuthInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // APAuthInfo.h 3 | // AliSDKDemo 4 | // 5 | // Created by 方彬 on 14-7-18. 6 | // Copyright (c) 2014年 Alipay.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface APayAuthInfo : NSObject 12 | 13 | @property(nonatomic, copy)NSString *appID; 14 | @property(nonatomic, copy)NSString *pid; 15 | @property(nonatomic, copy)NSString *redirectUri; 16 | 17 | /** 18 | * 初始化AuthInfo 19 | * 20 | * @param appIDStr 应用ID 21 | * @param productIDStr 产品码 该商户在aboss签约的产品,用户获取pid获取的参数 22 | * @param pidStr 商户ID 可不填 23 | * @param uriStr 授权的应用回调地址 比如:alidemo://auth 24 | * 25 | * @return authinfo实例 26 | */ 27 | - (id)initWithAppID:(NSString *)appIDStr 28 | pid:(NSString *)pidStr 29 | redirectUri:(NSString *)uriStr; 30 | 31 | - (NSString *)description; 32 | - (NSString *)wapDescription; 33 | @end 34 | -------------------------------------------------------------------------------- /ios/Frameworks/AlipaySDK.framework/Headers/AlipaySDK.h: -------------------------------------------------------------------------------- 1 | // 2 | // AlipaySDK.h 3 | // AlipaySDK 4 | // 5 | // Created by 方彬 on 14-4-28. 6 | // Copyright (c) 2014年 Alipay. All rights reserved. 7 | // 8 | 9 | 10 | //////////////////////////////////////////////////////// 11 | ////////////////version:2.1 motify:2014.12.24////////// 12 | ///////////////////Merry Christmas=。=////////////////// 13 | //////////////////////////////////////////////////////// 14 | 15 | #import 16 | 17 | #import "APayAuthInfo.h" 18 | typedef enum { 19 | ALIPAY_TIDFACTOR_IMEI, 20 | ALIPAY_TIDFACTOR_IMSI, 21 | ALIPAY_TIDFACTOR_TID, 22 | ALIPAY_TIDFACTOR_CLIENTKEY, 23 | ALIPAY_TIDFACTOR_VIMEI, 24 | ALIPAY_TIDFACTOR_VIMSI, 25 | ALIPAY_TIDFACTOR_CLIENTID, 26 | ALIPAY_TIDFACTOR_APDID, 27 | ALIPAY_TIDFACTOR_MAX 28 | } AlipayTidFactor; 29 | 30 | typedef void(^CompletionBlock)(NSDictionary *resultDic); 31 | 32 | @interface AlipaySDK : NSObject 33 | 34 | /** 35 | * 创建支付单例服务 36 | * 37 | * @return 返回单例对象 38 | */ 39 | + (AlipaySDK *)defaultService; 40 | 41 | /** 42 | * 用于设置SDK使用的window,如果没有自行创建window无需设置此接口 43 | */ 44 | @property (nonatomic, weak) UIWindow *targetWindow; 45 | 46 | /** 47 | * 支付接口 48 | * 49 | * @param orderStr 订单信息 50 | * @param schemeStr 调用支付的app注册在info.plist中的scheme 51 | * @param compltionBlock 支付结果回调Block,用于wap支付结果回调(非跳转钱包支付) 52 | */ 53 | - (void)payOrder:(NSString *)orderStr 54 | fromScheme:(NSString *)schemeStr 55 | callback:(CompletionBlock)completionBlock; 56 | 57 | /** 58 | * 处理钱包或者独立快捷app支付跳回商户app携带的支付结果Url 59 | * 60 | * @param resultUrl 支付结果url 61 | * @param completionBlock 支付结果回调 62 | */ 63 | - (void)processOrderWithPaymentResult:(NSURL *)resultUrl 64 | standbyCallback:(CompletionBlock)completionBlock; 65 | 66 | 67 | 68 | /** 69 | * 获取交易token。 70 | * 71 | * @return 交易token,若无则为空。 72 | */ 73 | - (NSString *)fetchTradeToken; 74 | 75 | /** 76 | * 是否已经使用过 77 | * 78 | * @return YES为已经使用过,NO反之 79 | */ 80 | - (BOOL)isLogined; 81 | 82 | /** 83 | * 当前版本号 84 | * 85 | * @return 当前版本字符串 86 | */ 87 | - (NSString *)currentVersion; 88 | 89 | /** 90 | * 当前版本号 91 | * 92 | * @return tid相关信息 93 | */ 94 | - (NSString*)queryTidFactor:(AlipayTidFactor)factor; 95 | 96 | /** 97 | * 測試所用,realse包无效 98 | * 99 | * @param url 测试环境 100 | */ 101 | - (void)setUrl:(NSString *)url; 102 | 103 | 104 | ////////////////////////////////////////////////////////////////////////////////////////////// 105 | //////////////////////////h5 拦截支付入口/////////////////////////////////////////////////////// 106 | ////////////////////////////////////////////////////////////////////////////////////////////// 107 | 108 | /** 109 | * url order 获取接口 110 | * 111 | * @param urlStr 拦截的 url string 112 | * 113 | * @return 获取到的url order info 114 | */ 115 | - (NSString*)fetchOrderInfoFromH5PayUrl:(NSString*)urlStr; 116 | 117 | 118 | /** 119 | * url支付接口 120 | * 121 | * @param orderStr 订单信息 122 | * @param schemeStr 调用支付的app注册在info.plist中的scheme 123 | * @param compltionBlock 支付结果回调Block 124 | */ 125 | - (void)payUrlOrder:(NSString *)orderStr 126 | fromScheme:(NSString *)schemeStr 127 | callback:(CompletionBlock)completionBlock; 128 | 129 | 130 | ////////////////////////////////////////////////////////////////////////////////////////////// 131 | //////////////////////////授权1.0////////////////////////////////////////////////////////////// 132 | ////////////////////////////////////////////////////////////////////////////////////////////// 133 | 134 | /** 135 | * 快登授权 136 | * @param authInfo 需授权信息 137 | * @param completionBlock 授权结果回调,若在授权过程中,调用方应用被系统终止,则此block无效, 138 | 需要调用方在appDelegate中调用processAuthResult:standbyCallback:方法获取授权结果 139 | */ 140 | - (void)authWithInfo:(APayAuthInfo *)authInfo 141 | callback:(CompletionBlock)completionBlock; 142 | 143 | 144 | /** 145 | * 处理授权信息Url 146 | * 147 | * @param resultUrl 钱包返回的授权结果url 148 | * @param completionBlock 授权结果回调 149 | */ 150 | - (void)processAuthResult:(NSURL *)resultUrl 151 | standbyCallback:(CompletionBlock)completionBlock; 152 | 153 | ////////////////////////////////////////////////////////////////////////////////////////////// 154 | //////////////////////////授权2.0////////////////////////////////////////////////////////////// 155 | ////////////////////////////////////////////////////////////////////////////////////////////// 156 | 157 | /** 158 | * 快登授权2.0 159 | * 160 | * @param infoStr 授权请求信息字符串 161 | * @param schemeStr 调用授权的app注册在info.plist中的scheme 162 | * @param completionBlock 授权结果回调,若在授权过程中,调用方应用被系统终止,则此block无效, 163 | 需要调用方在appDelegate中调用processAuth_V2Result:standbyCallback:方法获取授权结果 164 | */ 165 | - (void)auth_V2WithInfo:(NSString *)infoStr 166 | fromScheme:(NSString *)schemeStr 167 | callback:(CompletionBlock)completionBlock; 168 | 169 | /** 170 | * 处理授权信息Url 171 | * 172 | * @param resultUrl 钱包返回的授权结果url 173 | * @param completionBlock 授权结果回调 174 | */ 175 | - (void)processAuth_V2Result:(NSURL *)resultUrl 176 | standbyCallback:(CompletionBlock)completionBlock; 177 | 178 | @end 179 | -------------------------------------------------------------------------------- /ios/Frameworks/AlipaySDK.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/AlipaySDK.framework/Info.plist -------------------------------------------------------------------------------- /ios/Frameworks/AlipaySDK.framework/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/AlipaySDK.framework/en.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/4.4.0.cc00c67: -------------------------------------------------------------------------------- 1 | 4.4.0.cc00c67 2 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin@2x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin@3x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin_lift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin_lift.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin_lift@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin_lift@2x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin_lift@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/greenPin_lift@3x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/pin_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/pin_shadow.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/pin_shadow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/pin_shadow@2x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/pin_shadow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/pin_shadow@3x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin@2x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin@3x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin_lift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin_lift.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin_lift@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin_lift@2x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin_lift@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/purplePin_lift@3x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin@2x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin@3x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin_lift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin_lift.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin_lift@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin_lift@2x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin_lift@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/AMap.bundle/images/redPin_lift@3x.png -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAAnnotation.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAAnnotation.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi on 13-12-13. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | /*! 14 | @brief 该类为标注点的protocol,提供了标注类的基本信息函数 15 | */ 16 | @protocol MAAnnotation 17 | 18 | /*! 19 | @brief 标注view中心坐标 20 | */ 21 | @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; 22 | 23 | @optional 24 | 25 | /*! 26 | @brief 获取annotation标题 27 | @return 返回annotation的标题信息 28 | */ 29 | @property (nonatomic, readonly, copy) NSString *title; 30 | 31 | /*! 32 | @brief 获取annotation副标题 33 | @return 返回annotation的副标题信息 34 | */ 35 | @property (nonatomic, readonly, copy) NSString *subtitle; 36 | 37 | /** 38 | @brief 设置标注的坐标,在拖拽时会被调用. 39 | @param newCoordinate 新的坐标值 40 | */ 41 | - (void)setCoordinate:(CLLocationCoordinate2D)newCoordinate; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAAnnotationView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAAnnotationView.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSInteger, MAAnnotationViewDragState) { 12 | MAAnnotationViewDragStateNone = 0, ///< 静止状态 13 | MAAnnotationViewDragStateStarting, ///< 开始拖动 14 | MAAnnotationViewDragStateDragging, ///< 拖动中 15 | MAAnnotationViewDragStateCanceling, ///< 取消拖动 16 | MAAnnotationViewDragStateEnding ///< 拖动结束 17 | }; 18 | 19 | @protocol MAAnnotation; 20 | 21 | /*! 22 | @brief 标注view 23 | */ 24 | @interface MAAnnotationView : UIView 25 | 26 | /*! 27 | @brief 初始化并返回一个annotation view 28 | @param annotation 关联的annotation对象 29 | @param reuseIdentifier 如果要复用view,传入一个字符串,否则设为nil,建议重用view 30 | @return 初始化成功则返回annotation view,否则返回nil 31 | */ 32 | - (id)initWithAnnotation:(id )annotation reuseIdentifier:(NSString *)reuseIdentifier; 33 | 34 | /*! 35 | @brief 复用标识 36 | */ 37 | @property (nonatomic, readonly) NSString *reuseIdentifier; 38 | 39 | /*! 40 | @brief z值,大值在上,默认为0。 41 | */ 42 | @property (nonatomic, assign) NSInteger zIndex; 43 | 44 | /*! 45 | @brief 当从reuse队列里取出时被调用 46 | */ 47 | - (void)prepareForReuse; 48 | 49 | /*! 50 | @brief 关联的annotation 51 | */ 52 | @property (nonatomic, strong) id annotation; 53 | 54 | /*! 55 | @brief 显示的image 56 | */ 57 | @property (nonatomic, strong) UIImage *image; 58 | 59 | /*! 60 | @brief 默认情况下,annotation view的中心位于annotation的坐标位置,可以设置centerOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方,单位是像素 61 | */ 62 | @property (nonatomic) CGPoint centerOffset; 63 | 64 | /*! 65 | @brief 默认情况下,弹出的气泡位于view正中上方,可以设置calloutOffset改变view的位置,正的偏移使view朝右下方移动,负的朝左上方,单位是像素 66 | */ 67 | @property (nonatomic) CGPoint calloutOffset; 68 | 69 | /*! 70 | @brief 默认为YES,当为NO时view忽略触摸事件 71 | */ 72 | @property (nonatomic, getter=isEnabled) BOOL enabled; 73 | 74 | /*! 75 | @brief annotationView是否突出显示(一般不需要手动设置) 76 | */ 77 | @property (nonatomic, getter=isHighlighted) BOOL highlighted; 78 | 79 | /*! 80 | @brief 设置是否处于选中状态, 外部如果要选中请使用mapView的selectAnnotation方法。 81 | */ 82 | @property (nonatomic, getter=isSelected) BOOL selected; 83 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated; 84 | 85 | /*! 86 | @brief 设置是否可以显示callout,默认为NO 87 | */ 88 | @property (nonatomic) BOOL canShowCallout; 89 | 90 | /*! 91 | @brief 显示在气泡左侧的view 92 | */ 93 | @property (nonatomic, strong) UIView *leftCalloutAccessoryView; 94 | 95 | /*! 96 | @brief 显示在气泡右侧的view 97 | */ 98 | @property (nonatomic, strong) UIView *rightCalloutAccessoryView; 99 | 100 | /*! 101 | @brief 是否支持拖动,默认为NO 102 | */ 103 | @property (nonatomic, getter=isDraggable) BOOL draggable; 104 | 105 | /*! 106 | @brief 当前view的拖动状态 107 | */ 108 | @property (nonatomic) MAAnnotationViewDragState dragState; 109 | - (void)setDragState:(MAAnnotationViewDragState)newDragState animated:(BOOL)animated; 110 | 111 | 112 | @end 113 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MACircle.h: -------------------------------------------------------------------------------- 1 | // 2 | // MACircle.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAShape.h" 10 | #import "MAOverlay.h" 11 | #import "MAGeometry.h" 12 | 13 | /*! 14 | @brief 该类用于定义一个圆, 通常MACircle是MACircleRenderer的model 15 | */ 16 | @interface MACircle : MAShape 17 | 18 | /*! 19 | @brief 根据中心点和半径生成圆 20 | @param coord 中心点的经纬度坐标 21 | @param radius 半径,单位:米 22 | @return 新生成的圆 23 | */ 24 | + (instancetype)circleWithCenterCoordinate:(CLLocationCoordinate2D)coord 25 | radius:(CLLocationDistance)radius; 26 | 27 | /*! 28 | @brief 根据map rect生成圆 29 | @param mapRect 生成的圆的直径为MAX(width, height) 30 | @return 新生成的圆 31 | */ 32 | + (instancetype)circleWithMapRect:(MAMapRect)mapRect; 33 | 34 | /*! 35 | @brief 中心点经纬度坐标 36 | */ 37 | @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; 38 | 39 | /*! 40 | @brief 半径,单位:米 41 | */ 42 | @property (nonatomic, readonly) CLLocationDistance radius; 43 | 44 | /*! 45 | @brief 该圆的外接map rect 46 | */ 47 | @property (nonatomic, readonly) MAMapRect boundingMapRect; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MACircleRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MACircleRenderer.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MACircle.h" 10 | #import "MAOverlayPathRenderer.h" 11 | 12 | /*! 13 | @brief 该类是MACircle的显示圆renderer,可以通过MAOverlayPathRenderer修改其fill和stroke attributes 14 | */ 15 | @interface MACircleRenderer : MAOverlayPathRenderer 16 | 17 | /*! 18 | @brief 根据指定圆生成对应的Renderer 19 | @param circle 指定的MACircle model 20 | @return 生成的Renderer 21 | */ 22 | - (instancetype)initWithCircle:(MACircle *)circle; 23 | 24 | /*! 25 | @brief 关联的MAcirlce model 26 | */ 27 | @property (nonatomic, readonly) MACircle *circle; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MACircleView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MACircleView.h 3 | // MAMapKitNew 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlayPathView.h" 10 | #import "MACircle.h" 11 | 12 | /*! 13 | @brief 该类是MACircle的显示圆View,可以通过MAOverlayPathView修改其fill和stroke attributes 14 | */ 15 | @interface MACircleView : MAOverlayPathView 16 | 17 | /*! 18 | @brief 根据指定圆生成对应的View 19 | @param circle 指定的MACircle model 20 | @return 生成的View 21 | */ 22 | - (id)initWithCircle:(MACircle *)circle; 23 | 24 | /*! 25 | @brief 关联的MAcirlce model 26 | */ 27 | @property (nonatomic, readonly) MACircle *circle; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAGeodesicPolyline.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAGeodesicPolyline.h 3 | // MapKit_static 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAPolyline.h" 10 | 11 | @interface MAGeodesicPolyline : MAPolyline 12 | 13 | /*! 14 | @brief 根据map point数据生成Geodesic 15 | @param points map point数据,points对应的内存会拷贝,调用者负责该内存的释放 16 | @param count map point个数 17 | @return 生成的Geodesic 18 | */ 19 | + (instancetype)polylineWithPoints:(MAMapPoint *)points count:(NSUInteger)count; 20 | 21 | /*! 22 | @brief 根据经纬度坐标数据生成Geodesic 23 | @param coords 经纬度坐标数据,coords对应的内存会拷贝,调用者负责该内存的释放 24 | @param count 经纬度坐标个数 25 | @return 生成的Geodesic 26 | */ 27 | + (instancetype)polylineWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAGroundOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAGroundOverlay.h 3 | // DevDemo2D 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAShape.h" 10 | #import "MAOverlay.h" 11 | 12 | /*! 13 | @brief 该类用于确定覆盖在地图上的图片,及其覆盖区域, 通常MAGroundOverlay是MAGroundOverlayRenderer的model 14 | */ 15 | @interface MAGroundOverlay : MAShape 16 | 17 | /*! 18 | @brief 绘制在地图上的覆盖图片 19 | */ 20 | @property (nonatomic, readonly) UIImage *icon; 21 | 22 | /*! 23 | @brief 覆盖图片在地图尺寸等同于其像素的zoom值 24 | */ 25 | @property (nonatomic, readonly) CGFloat zoomLevel; 26 | 27 | /*! 28 | @brief 图片在地图中的覆盖范围 29 | */ 30 | @property (nonatomic, readonly) MACoordinateBounds bounds; 31 | 32 | /*! 33 | @brief 根据bounds值和icon生成GroundOverlay 34 | @param bounds 图片的在地图的覆盖范围 35 | @param icon 覆盖图片 36 | @return 以bounds和icon 新生成GroundOverlay 37 | */ 38 | + (instancetype)groundOverlayWithBounds:(MACoordinateBounds)bounds 39 | icon:(UIImage *)icon; 40 | 41 | /*! 42 | @brief 根据coordinate,icon,zoomLevel生成GroundOverlay 43 | @param coordinate 图片的在地图上的中心点 44 | @param zoomLevel 图片在地图尺寸等同于像素的zoom值 45 | @param icon 覆盖图片 46 | @return 以coordinate,icon,zoomLevel 新生成GroundOverlay 47 | */ 48 | + (instancetype)groundOverlayWithCoordinate:(CLLocationCoordinate2D)coordinate 49 | zoomLevel:(CGFloat)zoomLevel 50 | icon:(UIImage *)icon; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAGroundOverlayRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAGroundOverlayRenderer.h 3 | // DevDemo2D 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlayRenderer.h" 10 | #import "MAGroundOverlay.h" 11 | 12 | /*! 13 | @brief 此类是将MAGroundOverlay中的覆盖图片显示在地图上的renderer; 14 | */ 15 | @interface MAGroundOverlayRenderer : MAOverlayRenderer 16 | 17 | /*! 18 | @brief groundOverlay 具有覆盖图片,以及图片覆盖的区域 19 | */ 20 | @property (nonatomic ,readonly) MAGroundOverlay *groundOverlay; 21 | 22 | /*! 23 | @brief 根据指定的GroundOverlay生成将图片显示在地图上Renderer 24 | @param groundOverlay 制定了覆盖图片,以及图片的覆盖区域的groundOverlay 25 | @return 以GroundOverlay新生成Renderer 26 | */ 27 | - (instancetype)initWithGroundOverlay:(MAGroundOverlay *)groundOverlay; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAGroundOverlayView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAGroundOverlayView.h 3 | // MAMapKitNew 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlayView.h" 10 | #import "MAGroundOverlay.h" 11 | 12 | /*! 13 | @brief 此类是将MAGroundOverlay中的覆盖图片显示在地图上的View; 14 | */ 15 | @interface MAGroundOverlayView : MAOverlayView 16 | 17 | /*! 18 | @brief groundOverlay 具有覆盖图片,以及图片覆盖的区域 19 | */ 20 | @property (nonatomic ,readonly) MAGroundOverlay *groundOverlay; 21 | 22 | /*! 23 | @brief 根据指定的GroundOverlay生成将图片显示在地图上View 24 | @param groundOverlay 制定了覆盖图片,以及图片的覆盖区域的groundOverlay 25 | @return 以GroundOverlay新生成View 26 | */ 27 | - (id)initWithGroundOverlay:(MAGroundOverlay *)groundOverlay; 28 | 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAHeatMapTileOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAHeatMapTileOverlay.h 3 | // test2D 4 | // 5 | // Created by xiaoming han on 15/4/21. 6 | // Copyright (c) 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MATileOverlay.h" 10 | 11 | /** 12 | * 热力图节点 13 | */ 14 | @interface MAHeatMapNode : NSObject 15 | 16 | @property (nonatomic, assign) CLLocationCoordinate2D coordinate; 17 | @property (nonatomic, assign) float intensity; 18 | 19 | @end 20 | 21 | /** 22 | * 热力图渐变属性 23 | */ 24 | @interface MAHeatMapGradient : NSObject 25 | 26 | @property (nonatomic, readonly) NSArray *colors; // default [blue,green,red] 27 | @property (nonatomic, readonly) NSArray *startPoints; // default [@(0.2),@(0.5),@(0,9)] 28 | 29 | ///重新设置gradient的时候,需要执行 MATileOverlayView 中的 reloadData 方法. 30 | - (instancetype)initWithColor:(NSArray *)colors andWithStartPoints:(NSArray *)startPoints; 31 | 32 | @end 33 | 34 | /** 35 | * 热力图tileOverlay 36 | */ 37 | @interface MAHeatMapTileOverlay : MATileOverlay 38 | 39 | @property (nonatomic, strong) NSArray *data; // MAHeatMapNode array 40 | @property (nonatomic, assign) NSInteger radius; // 12, 范围:0-100 screen point 41 | @property (nonatomic, assign) CGFloat opacity; // 0.6,范围:0-1 42 | 43 | @property (nonatomic, strong) MAHeatMapGradient *gradient; 44 | 45 | @property (nonatomic, assign) BOOL allowRetinaAdapting; //是否开启高清热力图,默认关闭。 46 | 47 | @end 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAMapKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAMapKit.h 3 | // MAMapKit 4 | // 5 | // Created by xiaoming han on 15/12/7. 6 | // Copyright © 2015年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import 13 | #import 14 | #import 15 | #import 16 | #import 17 | #import 18 | #import 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | #import 29 | #import 30 | #import 31 | #import 32 | #import 33 | #import 34 | #import 35 | #import 36 | #import 37 | 38 | #pragma mark - deprecated 39 | 40 | #import 41 | #import 42 | #import 43 | #import 44 | #import 45 | #import 46 | #import 47 | 48 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAMapVersion.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAMapVersion.h 3 | // MAMapKit 4 | // 5 | // Created by yi chen on 2/24/16. 6 | // Copyright © 2016 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #ifndef MAMapVersion_h 12 | #define MAMapVersion_h 13 | 14 | #define MAMapVersionNumber 40400 15 | #define MAMapMinRequiredFoundationVersion 10200 16 | 17 | // 依赖库版本检测 18 | #if AMapFoundationVersionNumber < MAMapMinRequiredFoundationVersion 19 | #error "The AMapFoundationKit version is less than minimum required, please update! Any questions please to visit http://lbs.amap.com" 20 | #endif 21 | 22 | FOUNDATION_EXTERN NSString * const MAMapKitVersion; 23 | FOUNDATION_EXTERN NSString * const MAMapKitName; 24 | 25 | 26 | #endif /* MAMapVersion_h */ 27 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAMultiColoredPolylineRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAMultiColoredPolylineRenderer.h 3 | // MapKit_static 4 | // 5 | // Created by yi chen on 12/11/15. 6 | // Copyright © 2015 songjian. All rights reserved. 7 | // 8 | 9 | #import "MAPolylineRenderer.h" 10 | #import "MAMultiPolyline.h" 11 | 12 | /*! 13 | 此类用于绘制MAMultiPolyline对应的多段线,支持分段颜色绘制 14 | MAMultiColoredPolylineRenderer仅支持lineJoin = kCGLineJoinRound, lineCap = kCGLineCapRound,设为其他值无效。 15 | */ 16 | @interface MAMultiColoredPolylineRenderer : MAPolylineRenderer 17 | 18 | /*! 19 | @brief 根据指定的MAPolyline生成一个多段线Renderer 20 | @param multiPolyline 指定MAMultiPolyline 21 | @return 新生成的多段线Renderer 22 | */ 23 | - (instancetype)initWithMultiPolyline:(MAMultiPolyline *)multiPolyline; 24 | 25 | /*! 26 | @brief 关联的MAMultiPolyline model 27 | */ 28 | @property (nonatomic, readonly) MAMultiPolyline *multiPolyline; 29 | 30 | /*! 31 | @brief 分段绘制的颜色。 32 | 需要分段颜色绘制时,必须设置(内容必须为UIColor) 33 | */ 34 | @property (nonatomic, strong) NSArray *strokeColors; 35 | 36 | /*! 37 | @brief 颜色是否渐变。 38 | 在颜色渐变情况下,暂不支持虚线绘制。 39 | */ 40 | @property (nonatomic, assign, getter=isGradient) BOOL gradient; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAMultiPoint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAMultiPoint.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MAGeometry.h" 11 | #import "MAShape.h" 12 | 13 | /*! 14 | @brief 该类是个由多个点组成的虚基类, 不能直接实例化对象, 要使用其子类MAPolyline,MAPolygon来实例化 15 | */ 16 | @interface MAMultiPoint : MAShape 17 | 18 | /*! 19 | @brief 坐标点数组 20 | */ 21 | @property (nonatomic, readonly) MAMapPoint *points; 22 | 23 | /*! 24 | @brief 坐标点的个数 25 | */ 26 | @property (nonatomic, readonly) NSUInteger pointCount; 27 | 28 | /*! 29 | @brief 将内部的坐标点数据转化为经纬度坐标并拷贝到coords内存中 30 | @param coords 调用者提供的内存空间, 该空间长度必须大于等于要拷贝的坐标点的个数(range.length) 31 | @param range 要拷贝的数据范围 32 | */ 33 | - (void)getCoordinates:(CLLocationCoordinate2D *)coords range:(NSRange)range; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAMultiPolyline.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAMultiPolyline.h 3 | // MapKit_static 4 | // 5 | // Created by yi chen on 12/11/15. 6 | // Copyright © 2015 songjian. All rights reserved. 7 | // 8 | 9 | #import "MAPolyline.h" 10 | 11 | /*! 12 | @brief 此类用于定义一个由多个点相连的多段线,绘制时支持分段采用不同颜色绘制,点与点之间尾部相连但第一点与最后一个点不相连, 通常MAMultiPolyline是MAMultiColoredPolylineRenderer(分段颜色绘制)model 13 | */ 14 | @interface MAMultiPolyline : MAPolyline 15 | 16 | /*! 17 | @brief 颜色索引数组,成员为NSNumber,且为非负数,负数按0处理 18 | */ 19 | @property (nonatomic, strong, readonly) NSArray *drawStyleIndexes; 20 | 21 | /*! 22 | @brief 分段绘制,根据map point数据生成多段线 23 | 24 | 分段颜色绘制:其对应的MAMultiColoredPolylineRenderer必须设置strokeColors属性 25 | 26 | @param points 指定的直角坐标点数组 27 | @param count 坐标点的个数 28 | @param drawStyleIndexes 颜色索引数组,成员为NSNumber,且为非负数,负数按0处理 29 | @return 新生成的折线对象 30 | */ 31 | + (instancetype)polylineWithPoints:(MAMapPoint *)points count:(NSUInteger)count drawStyleIndexes:(NSArray*)drawStyleIndexes; 32 | 33 | /*! 34 | @brief 分段绘制,根据经纬度坐标数据生成多段线 35 | 36 | 分段颜色绘制:其对应的MAMultiColoredPolylineRenderer必须设置strokeColors属性 37 | 38 | @param coords 指定的经纬度坐标点数组 39 | @param count 坐标点的个数 40 | @param drawStyleIndexes 颜色索引数组,成员为NSNumber,且为非负数,负数按0处理 41 | @return 新生成的折线对象 42 | */ 43 | + (instancetype)polylineWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count drawStyleIndexes:(NSArray*)drawStyleIndexes; 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAOverlay.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAAnnotation.h" 10 | #import "MAGeometry.h" 11 | 12 | /*! 13 | @brief 该类是地图覆盖物的基类,所有地图的覆盖物需要继承自此类 14 | */ 15 | @protocol MAOverlay 16 | @required 17 | 18 | /*! 19 | @brief 返回区域中心坐标. 20 | */ 21 | @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; 22 | 23 | /*! 24 | @brief 区域外接矩形 25 | */ 26 | @property (nonatomic, readonly) MAMapRect boundingMapRect; 27 | 28 | @optional 29 | 30 | /*! 31 | @brief 判断boundingMapRect和给定的mapRect是否相交,可以用MAMapRectIntersectsRect([overlay boundingMapRect], mapRect)替代 32 | @param mapRect 指定的map rect 33 | @return 两个矩形是否相交 34 | */ 35 | - (BOOL)intersectsMapRect:(MAMapRect)mapRect; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAOverlayPathRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAOverlayPathRenderer.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MAOverlayRenderer.h" 11 | 12 | /*! 13 | @brief 该类提供使用CGPathRef来绘制overlay,默认的操作是使用fill attributes, stroke attributes绘制当前path到context中, 可以使用该类的子类MACircleRenderer, MAPolylineRenderer, MAPolygonRenderer或者继承该类, 如果继承该类,需要重载-(void)createPath方法 14 | */ 15 | @interface MAOverlayPathRenderer : MAOverlayRenderer 16 | 17 | /*! 18 | @brief 填充颜色,默认是[UIColor colorWithRed:0 green:1 blue:0 alpha:0.6] 19 | */ 20 | @property (strong) UIColor *fillColor; 21 | 22 | /*! 23 | @brief 笔触颜色,默认是[UIColor colorWithRed:1 green:0 blue:0 alpha:0.6] 24 | */ 25 | @property (strong) UIColor *strokeColor; 26 | 27 | /*! 28 | @brief 笔触宽度,默认是0 29 | */ 30 | @property CGFloat lineWidth; 31 | 32 | /*! 33 | @brief LineJoin,默认是kCGLineJoinRound 34 | */ 35 | @property CGLineJoin lineJoin; 36 | 37 | /*! 38 | @brief LineCap,默认是kCGLineCapRound 39 | */ 40 | @property CGLineCap lineCap; 41 | 42 | /*! 43 | @brief MiterLimit,默认是10.f 44 | */ 45 | @property CGFloat miterLimit; 46 | 47 | /*! 48 | @brief LineDashPhase,默认是0.f 49 | */ 50 | @property CGFloat lineDashPhase; 51 | 52 | /*! 53 | @brief LineDashPattern,默认是nil 54 | */ 55 | @property (copy) NSArray *lineDashPattern; 56 | 57 | /*! 58 | @brief 子类需要重载该方法并设置(self.path = newPath) 59 | */ 60 | - (void)createPath; 61 | 62 | /*! 63 | @brief 当前的path 64 | */ 65 | @property CGPathRef path; 66 | 67 | /*! 68 | @brief 释放当前path,调用之后 path == NULL 69 | */ 70 | - (void)invalidatePath; 71 | 72 | /*! 73 | @brief 将当前的stroke attributes设置到指定的context 74 | @param context 目标context 75 | @param zoomScale 当前缩放比例值 76 | */ 77 | - (void)applyStrokePropertiesToContext:(CGContextRef)context atZoomScale:(MAZoomScale)zoomScale; 78 | 79 | /*! 80 | @brief 将当前的fill attributes设置到指定的context 81 | @param context 目标context 82 | @param zoomScale 当前缩放比例值 83 | */ 84 | - (void)applyFillPropertiesToContext:(CGContextRef)context atZoomScale:(MAZoomScale)zoomScale; 85 | 86 | /*! 87 | @brief 绘制path 88 | @param path 要绘制的path 89 | @param context 目标context 90 | */ 91 | - (void)strokePath:(CGPathRef)path inContext:(CGContextRef)context; 92 | 93 | /*! 94 | @brief 填充path 95 | @param path 要绘制的path 96 | @param context 目标context 97 | */ 98 | - (void)fillPath:(CGPathRef)path inContext:(CGContextRef)context; 99 | 100 | @end 101 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAOverlayPathView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAOverlayPathView.h 3 | // MAMapKitNew 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlayView.h" 10 | 11 | /*! 12 | @brief 该类提供使用CGPathRef来绘制overlay,默认的操作是使用fill attributes, stroke attributes绘制当前path到context中, 可以使用该类的子类MACircleView, MAPolylineView, MAPolygonView或者继承该类, 如果继承该类,需要重载-(void)createPath方法 13 | */ 14 | @interface MAOverlayPathView : MAOverlayView 15 | 16 | /*! 17 | @brief 填充颜色,默认是[UIColor colorWithRed:0 green:1 blue:0 alpha:0.6] 18 | */ 19 | @property (strong) UIColor *fillColor; 20 | 21 | /*! 22 | @brief 笔触颜色,默认是[UIColor colorWithRed:1 green:0 blue:0 alpha:0.6] 23 | */ 24 | @property (strong) UIColor *strokeColor; 25 | 26 | /*! 27 | @brief 笔触宽度,默认是0 28 | */ 29 | @property CGFloat lineWidth; 30 | 31 | /*! 32 | @brief LineJoin,默认是kCGLineJoinRound 33 | */ 34 | @property CGLineJoin lineJoin; 35 | 36 | /*! 37 | @brief LineCap,默认是kCGLineCapRound 38 | */ 39 | @property CGLineCap lineCap; 40 | 41 | /*! 42 | @brief MiterLimit,默认是10.f 43 | */ 44 | @property CGFloat miterLimit; 45 | 46 | /*! 47 | @brief LineDashPhase,默认是0.f 48 | */ 49 | @property CGFloat lineDashPhase; 50 | 51 | /*! 52 | @brief LineDashPattern,默认是nil 53 | */ 54 | @property (copy) NSArray *lineDashPattern; 55 | 56 | /*! 57 | @brief 子类需要重载该方法并设置(self.path = newPath) 58 | */ 59 | - (void)createPath; 60 | 61 | /*! 62 | @brief 当前的path 63 | */ 64 | @property CGPathRef path; 65 | 66 | /*! 67 | @brief 释放当前path,调用之后 path == NULL 68 | */ 69 | - (void)invalidatePath; 70 | 71 | /*! 72 | @brief 将当前的stroke attributes设置到指定的context 73 | @param context 目标context 74 | @param zoomScale 当前缩放比例值 75 | */ 76 | - (void)applyStrokePropertiesToContext:(CGContextRef)context atZoomScale:(MAZoomScale)zoomScale; 77 | 78 | /*! 79 | @brief 将当前的fill attributes设置到指定的context 80 | @param context 目标context 81 | @param zoomScale 当前缩放比例值 82 | */ 83 | - (void)applyFillPropertiesToContext:(CGContextRef)context atZoomScale:(MAZoomScale)zoomScale; 84 | 85 | /*! 86 | @brief 绘制path 87 | @param path 要绘制的path 88 | @param context 目标context 89 | */ 90 | - (void)strokePath:(CGPathRef)path inContext:(CGContextRef)context; 91 | 92 | /*! 93 | @brief 填充path 94 | @param path 要绘制的path 95 | @param context 目标context 96 | */ 97 | - (void)fillPath:(CGPathRef)path inContext:(CGContextRef)context; 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAOverlayRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAOverlayRenderer.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAGeometry.h" 10 | #import "MAOverlay.h" 11 | 12 | /*! 13 | @brief 该类是地图覆盖物Renderer的基类, 提供绘制overlay的接口但并无实际的实现 14 | */ 15 | @interface MAOverlayRenderer : NSObject 16 | 17 | /*! 18 | @brief 初始化并返回一个overlay renderer 19 | @param overlay 关联的overlay对象 20 | @return 初始化成功则返回overlay renderer,否则返回nil 21 | */ 22 | - (id)initWithOverlay:(id )overlay; 23 | 24 | /*! 25 | @brief 关联的overlay对象 26 | */ 27 | @property (nonatomic, readonly) id overlay; 28 | 29 | /*! 30 | @brief 将MAMapPoint转化为相对于receiver的本地坐标 31 | @param mapPoint 要转化的MAMapPoint 32 | @return 相对于receiver的本地坐标 33 | */ 34 | - (CGPoint)pointForMapPoint:(MAMapPoint)mapPoint; 35 | 36 | /*! 37 | @brief 将相对于receiver的本地坐标转化为MAMapPoint 38 | @param point 要转化的相对于receiver的本地坐标 39 | @return MAMapPoint 40 | */ 41 | - (MAMapPoint)mapPointForPoint:(CGPoint)point; 42 | 43 | /*! 44 | @brief 将MAMapRect转化为相对于receiver的本地rect 45 | @param mapRect 要转化的MAMapRect 46 | @return 相对于receiver的本地rect 47 | */ 48 | - (CGRect)rectForMapRect:(MAMapRect)mapRect; 49 | 50 | /*! 51 | @brief 将相对于receiver的本地rect转化为MAMapRect 52 | @param rect 要转化的相对于receiver的本地rect 53 | @return MAMapRect 54 | */ 55 | - (MAMapRect)mapRectForRect:(CGRect)rect; 56 | 57 | /*! 58 | @brief 判断overlay renderer是否可以绘制包含的内容 59 | @param mapRect 该MAMapRect范围内需要绘制 60 | @param zoomScale 当前的缩放比例值 61 | @return 是否可以进行绘制 62 | */ 63 | - (BOOL)canDrawMapRect:(MAMapRect)mapRect zoomScale:(MAZoomScale)zoomScale; 64 | 65 | /*! 66 | @brief 绘制overlay renderer的内容 67 | @param mapRect 该MAMapRect范围内需要更新 68 | @param zoomScale 当前的缩放比例值 69 | @param context 绘制操作的graphics context 70 | */ 71 | - (void)drawMapRect:(MAMapRect)mapRect zoomScale:(MAZoomScale)zoomScale inContext:(CGContextRef)context; 72 | 73 | - (void)setNeedsDisplay; 74 | 75 | /*! 76 | @brief 重绘指定map rect内的内容 77 | @param mapRect 该map rect范围内的内容需要重绘 78 | */ 79 | - (void)setNeedsDisplayInMapRect:(MAMapRect)mapRect; 80 | 81 | /*! 82 | @brief 重绘指定zoom scale下map rect内的内容 83 | @param mapRect 该map rect范围内的内容需要重绘 84 | @param zoomScale 当前的缩放比例值 85 | */ 86 | - (void)setNeedsDisplayInMapRect:(MAMapRect)mapRect zoomScale:(MAZoomScale)zoomScale; 87 | 88 | /*! 89 | @brief overlay的透明度 90 | */ 91 | @property CGFloat alpha; 92 | 93 | /*! 94 | @brief context的比例系数 95 | */ 96 | @property (readonly) CGFloat contentScaleFactor; 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAOverlayView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAOverlayView.h 3 | // MAMapKitNew 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAGeometry.h" 10 | #import "MAOverlay.h" 11 | 12 | /*! 13 | @brief 该类是地图覆盖物View的基类, 提供绘制overlay的接口但并无实际的实现 14 | */ 15 | @interface MAOverlayView : UIView 16 | 17 | /*! 18 | @brief 初始化并返回一个overlay view 19 | @param overlay 关联的overlay对象 20 | @return 初始化成功则返回overlay view,否则返回nil 21 | */ 22 | - (id)initWithOverlay:(id )overlay; 23 | 24 | /*! 25 | @brief 关联的overlay对象 26 | */ 27 | @property (nonatomic, readonly) id overlay; 28 | 29 | /*! 30 | @brief 将MAMapPoint转化为相对于receiver的本地坐标 31 | @param mapPoint 要转化的MAMapPoint 32 | @return 相对于receiver的本地坐标 33 | */ 34 | - (CGPoint)pointForMapPoint:(MAMapPoint)mapPoint; 35 | 36 | /*! 37 | @brief 将相对于receiver的本地坐标转化为MAMapPoint 38 | @param point 要转化的相对于receiver的本地坐标 39 | @return MAMapPoint 40 | */ 41 | - (MAMapPoint)mapPointForPoint:(CGPoint)point; 42 | 43 | /*! 44 | @brief 将MAMapRect转化为相对于receiver的本地rect 45 | @param mapRect 要转化的MAMapRect 46 | @return 相对于receiver的本地rect 47 | */ 48 | - (CGRect)rectForMapRect:(MAMapRect)mapRect; 49 | 50 | /*! 51 | @brief 将相对于receiver的本地rect转化为MAMapRect 52 | @param rect 要转化的相对于receiver的本地rect 53 | @return MAMapRect 54 | */ 55 | - (MAMapRect)mapRectForRect:(CGRect)rect; 56 | 57 | /*! 58 | @brief 判断overlay view是否可以绘制包含的内容 59 | @param mapRect 该MAMapRect范围内需要绘制 60 | @param zoomScale 当前的缩放比例值 61 | @return 是否可以进行绘制 62 | */ 63 | - (BOOL)canDrawMapRect:(MAMapRect)mapRect zoomScale:(MAZoomScale)zoomScale; 64 | 65 | /*! 66 | @brief 绘制overlay view的内容 67 | @param mapRect 该MAMapRect范围内需要更新 68 | @param zoomScale 当前的缩放比例值 69 | @param context 绘制操作的graphics context 70 | */ 71 | - (void)drawMapRect:(MAMapRect)mapRect zoomScale:(MAZoomScale)zoomScale inContext:(CGContextRef)context; 72 | 73 | - (void)setNeedsDisplay; 74 | 75 | /*! 76 | @brief 重绘指定map rect内的内容 77 | @param mapRect 该map rect范围内的内容需要重绘 78 | */ 79 | - (void)setNeedsDisplayInMapRect:(MAMapRect)mapRect; 80 | 81 | /*! 82 | @brief 重绘指定zoom scale下map rect内的内容 83 | @param mapRect 该map rect范围内的内容需要重绘 84 | @param zoomScale 当前的缩放比例值 85 | */ 86 | - (void)setNeedsDisplayInMapRect:(MAMapRect)mapRect zoomScale:(MAZoomScale)zoomScale; 87 | 88 | /*! 89 | @brief overlay的透明度 90 | */ 91 | @property CGFloat alpha; 92 | 93 | /*! 94 | @brief context的比例系数 95 | */ 96 | @property (readonly) CGFloat contentScaleFactor; 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAPinAnnotationView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAPinAnnotationView.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAAnnotationView.h" 10 | 11 | typedef NS_ENUM(NSInteger, MAPinAnnotationColor) { 12 | MAPinAnnotationColorRed = 0, 13 | MAPinAnnotationColorGreen, 14 | MAPinAnnotationColorPurple 15 | }; 16 | 17 | /*! 18 | @brief 提供类似大头针效果的annotation view 19 | */ 20 | @interface MAPinAnnotationView : MAAnnotationView 21 | 22 | /*! 23 | @brief 大头针的颜色,有MAPinAnnotationColorRed, MAPinAnnotationColorGreen, MAPinAnnotationColorPurple三种 24 | */ 25 | @property (nonatomic) MAPinAnnotationColor pinColor; 26 | 27 | /*! 28 | @brief 动画效果 29 | */ 30 | @property (nonatomic) BOOL animatesDrop; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAPointAnnotation.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAPointAnnotation.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAShape.h" 10 | 11 | /*! 12 | @brief 点标注数据 13 | */ 14 | @interface MAPointAnnotation : MAShape 15 | 16 | /*! 17 | @brief 经纬度 18 | */ 19 | @property (nonatomic, assign) CLLocationCoordinate2D coordinate; 20 | 21 | /** 22 | 是否固定在屏幕一点, 注意,拖动或者手动改变经纬度,都会导致设置失效 23 | */ 24 | @property (nonatomic, assign, getter = isLockedToScreen) BOOL lockedToScreen; 25 | 26 | /** 27 | 固定屏幕点的坐标 28 | */ 29 | @property (nonatomic, assign) CGPoint lockedScreenPoint; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAPolygon.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAPolygon.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAMultiPoint.h" 10 | #import "MAOverlay.h" 11 | 12 | /*! 13 | @brief 此类用于定义一个由多个点组成的闭合多边形, 点与点之间按顺序尾部相连, 第一个点与最后一个点相连, 通常MAPolygon是MAPolygonRenderer的model 14 | */ 15 | @interface MAPolygon : MAMultiPoint 16 | 17 | /*! 18 | @brief 根据map point数据生成多边形 19 | @param points map point数据,points对应的内存会拷贝,调用者负责该内存的释放 20 | @param count 点的个数 21 | @return 新生成的多边形 22 | */ 23 | + (instancetype)polygonWithPoints:(MAMapPoint *)points count:(NSUInteger)count; 24 | 25 | /*! 26 | @brief 根据map point数据和interior polygons生成多边形 27 | @param points map point数据,points对应的内存会拷贝,调用者负责该内存的释放 28 | @param count 点的个数 29 | @param interiorPolygons MAPolygon数组,指定在生成的多边形中需要裁剪掉的区域 30 | @return 新生成的多边形 31 | */ 32 | + (instancetype)polygonWithPoints:(MAMapPoint *)points count:(NSUInteger)count interiorPolygons:(NSArray *)interiorPolygons; 33 | 34 | /*! 35 | @brief 根据经纬度坐标数据生成闭合多边形 36 | @param coords 经纬度坐标点数据,coords对应的内存会拷贝,调用者负责该内存的释放 37 | @param count 经纬度坐标点数组个数 38 | @return 新生成的多边形 39 | */ 40 | + (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count; 41 | 42 | /*! 43 | @brief 根据经纬度坐标数据和interior polygons生成闭合多边形 44 | @param coords 经纬度坐标点数据,coords对应的内存会拷贝,调用者负责该内存的释放 45 | @param count 经纬度坐标点数组个数 46 | @param interiorPolygons MAPolygon数组,指定在生成的多边形中需要裁剪掉的区域 47 | @return 新生成的多边形 48 | */ 49 | + (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count interiorPolygons:(NSArray *)interiorPolygons; 50 | 51 | /*! 52 | @brief 内嵌MAPolygon数组,在生成的多边形中将会裁减掉内嵌polygon包含的区域 53 | */ 54 | @property (readonly) NSArray *interiorPolygons; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAPolygonRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAPolygonRenderer.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlayPathRenderer.h" 10 | #import "MAPolygon.h" 11 | 12 | /*! 13 | @brief 此类是MAPolygon的显示多边形Renderer,可以通过MAOverlayPathRenderer修改其fill和stroke attributes 14 | */ 15 | @interface MAPolygonRenderer : MAOverlayPathRenderer 16 | 17 | /*! 18 | @brief 根据指定的多边形生成一个多边形renderer 19 | @param polygon 指定的多边形数据对象 20 | @return 新生成的多边形renderer 21 | */ 22 | - (id)initWithPolygon:(MAPolygon *)polygon; 23 | 24 | /*! 25 | @brief 关联的MAPolygon model 26 | */ 27 | @property (nonatomic, readonly) MAPolygon *polygon; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAPolygonView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAPolygonView.h 3 | // MAMapKitNew 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlayPathView.h" 10 | #import "MAPolygon.h" 11 | 12 | /*! 13 | @brief 此类是MAPolygon的显示多边形View,可以通过MAOverlayPathView修改其fill和stroke attributes 14 | */ 15 | @interface MAPolygonView : MAOverlayPathView 16 | 17 | /*! 18 | @brief 根据指定的多边形生成一个多边形view 19 | @param polygon 指定的多边形数据对象 20 | @return 新生成的多边形view 21 | */ 22 | - (id)initWithPolygon:(MAPolygon *)polygon; 23 | 24 | /*! 25 | @brief 关联的MAPolygon model 26 | */ 27 | @property (nonatomic, readonly) MAPolygon *polygon; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAPolyline.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAPolyline.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAMultiPoint.h" 10 | #import "MAOverlay.h" 11 | 12 | /*! 13 | @brief 此类用于定义一个由多个点相连的多段线,点与点之间尾部想连但第一点与最后一个点不相连, 通常MAPolyline是MAPolylineRenderer的model 14 | */ 15 | @interface MAPolyline : MAMultiPoint 16 | 17 | /*! 18 | @brief 根据map point数据生成多段线 19 | @param points map point数据,points对应的内存会拷贝,调用者负责该内存的释放 20 | @param count map point个数 21 | @return 生成的多段线 22 | */ 23 | + (instancetype)polylineWithPoints:(MAMapPoint *)points count:(NSUInteger)count; 24 | 25 | /*! 26 | @brief 根据经纬度坐标数据生成多段线 27 | @param coords 经纬度坐标数据,coords对应的内存会拷贝,调用者负责该内存的释放 28 | @param count 经纬度坐标个数 29 | @return 生成的多段线 30 | */ 31 | + (instancetype)polylineWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAPolylineRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAPolylineRenderer.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlayPathRenderer.h" 10 | #import "MAPolyline.h" 11 | 12 | /*! 13 | @brief 此类是MAPolyline的显示多段线renderer,可以通过MAOverlayPathRenderer修改其fill和stroke attributes 14 | */ 15 | @interface MAPolylineRenderer : MAOverlayPathRenderer 16 | 17 | /*! 18 | @brief 根据指定的MAPolyline生成一个多段线renderer 19 | @param polyline 指定MAPolyline 20 | @return 新生成的多段线renderer 21 | */ 22 | - (id)initWithPolyline:(MAPolyline *)polyline; 23 | 24 | /*! 25 | @brief 关联的MAPolyline model 26 | */ 27 | @property (nonatomic, readonly) MAPolyline *polyline; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAPolylineView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAPolylineView.h 3 | // MAMapKitNew 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlayPathView.h" 10 | #import "MAPolyline.h" 11 | 12 | /*! 13 | @brief 此类是MAPolyline的显示多段线View,可以通过MAOverlayPathView修改其fill和stroke attributes 14 | */ 15 | @interface MAPolylineView : MAOverlayPathView 16 | 17 | /*! 18 | @brief 根据指定的MAPolyline生成一个多段线view 19 | @param polyline 指定MAPolyline 20 | @return 新生成的多段线view 21 | */ 22 | - (id)initWithPolyline:(MAPolyline *)polyline; 23 | 24 | /*! 25 | @brief 关联的MAPolyline model 26 | */ 27 | @property (nonatomic, readonly) MAPolyline *polyline; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAShape.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAShape.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2013年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MAAnnotation.h" 11 | 12 | /*! 13 | @brief 该类为一个抽象类,定义了基于MAAnnotation的MAShape类的基本属性和行为,不能直接使用,必须子类化之后才能使用 14 | */ 15 | @interface MAShape : NSObject 16 | 17 | /*! 18 | @brief 标题 19 | */ 20 | @property (nonatomic, copy) NSString *title; 21 | 22 | /*! 23 | @brief 副标题 24 | */ 25 | @property (nonatomic, copy) NSString *subtitle; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MATileOverlay.h: -------------------------------------------------------------------------------- 1 | // 2 | // MATileOverlay.h 3 | // MAMapKitNew 4 | // 5 | // Created by xiaoming han on 14-1-24. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlay.h" 10 | 11 | /** 12 | 该类是覆盖在球面墨卡托投影上的图片tiles的数据源 13 | */ 14 | @interface MATileOverlay : NSObject 15 | 16 | /** 17 | 根据指定的URLTemplate生成tileOverlay 18 | 19 | @param URLTemplate URLTemplate是一个包含"{x}","{y}","{z}","{scale}"的字符串,"{x}","{y}","{z}","{scale}"会被tile path的值所替换,并生成用来加载tile图片数据的URL 。例如: http://server/path?x={x}&y={y}&z={z}&scale={scale}。 20 | 21 | @return 以指定的URLTemplate字符串生成tileOverlay 22 | */ 23 | - (instancetype)initWithURLTemplate:(NSString *)URLTemplate; 24 | 25 | /** 26 | 默认tileSize 256x256 27 | */ 28 | @property CGSize tileSize; 29 | 30 | /** 31 | overlay可以渲染的最小缩放级别。当0级时,一个tile覆盖整个世界范围,1级时覆盖 1/4th 世界,2级时1/16th,以此类推。 32 | */ 33 | @property NSInteger minimumZ; 34 | 35 | /** 36 | overlay可以渲染的最大缩放级别。 37 | */ 38 | @property NSInteger maximumZ; 39 | 40 | @property (readonly) NSString *URLTemplate; 41 | 42 | /** 43 | 区域外接矩形,可用来设定tileOverlay的可渲染区域 44 | */ 45 | @property (nonatomic) MAMapRect boundingMapRect; 46 | 47 | @end 48 | 49 | /** 50 | 记录某特定tile的据结构。contentScaleFactor根据设备的ScrennScale而定, 为1.0或2.0。 51 | */ 52 | typedef struct { 53 | NSInteger x; 54 | NSInteger y; 55 | NSInteger z; 56 | CGFloat contentScaleFactor; 57 | } MATileOverlayPath; 58 | 59 | /** 60 | 子类可覆盖CustomLoading中的方法来自定义加载MATileOverlay的行为。 61 | */ 62 | @interface MATileOverlay (CustomLoading) 63 | 64 | /** 65 | 以tile path生成URL。用于加载tile, 此方法默认填充URLTemplate 66 | 67 | @param path path 68 | @return path相应的url 69 | */ 70 | - (NSURL *)URLForTilePath:(MATileOverlayPath)path; 71 | 72 | /** 73 | 加载被请求的tile, 并以tile数据或加载tile失败error访问回调block; 默认实现为首先用 -URLForTilePath 去获取URL, 然后用异步NSURLConnection加载tile数据。当绘制大面积的tileOverlay时,建议重写此函数并实现缓存机制。 74 | 75 | @param path path 76 | @param result 用来传入tile数据或加载tile失败的error访问的回调block 77 | */ 78 | - (void)loadTileAtPath:(MATileOverlayPath)path result:(void (^)(NSData *tileData, NSError *error))result; 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MATileOverlayRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MATileOverlayRenderer.h 3 | // MAMapKitNew 4 | // 5 | // Created by xiaoming han on 14-1-24. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlayRenderer.h" 10 | #import "MATileOverlay.h" 11 | 12 | /*! 13 | @brief 此类将MATileOverlay中的tile渲染到地图上 14 | */ 15 | @interface MATileOverlayRenderer : MAOverlayRenderer 16 | 17 | /*! 18 | @brief 覆盖在球面墨卡托投影上的图片tiles的数据源 19 | */ 20 | @property (nonatomic ,readonly) MATileOverlay *tileOverlay; 21 | 22 | /*! 23 | @brief 根据指定的tileOverlay生成MATileOverlayRenderer 24 | @param overlay 数据源 25 | @return 初始化成功则返回overlay renderer,否则返回nil 26 | */ 27 | - (instancetype)initWithTileOverlay:(MATileOverlay *)overlay; 28 | 29 | /*! 30 | @brief 清除所有tile的缓存,并刷新overlay 31 | */ 32 | - (void)reloadData; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MATileOverlayView.h: -------------------------------------------------------------------------------- 1 | // 2 | // MATileOverlayView.h 3 | // MAMapKitNew 4 | // 5 | // Created by xiaoming han on 14-5-4. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import "MAOverlayView.h" 10 | #import "MATileOverlay.h" 11 | 12 | /*! 13 | @brief 此类将MATileOverlay中的tile渲染到地图上 14 | */ 15 | @interface MATileOverlayView : MAOverlayView 16 | 17 | /*! 18 | @brief 覆盖在球面墨卡托投影上的图片tiles的数据源 19 | */ 20 | @property (nonatomic ,readonly) MATileOverlay *tileOverlay; 21 | 22 | /*! 23 | @brief 根据指定的tileOverlay生成MAOverlayView 24 | @param overlay 数据源 25 | @return 初始化成功则返回overlayView,否则返回nil 26 | */ 27 | - (id)initWithTileOverlay:(MATileOverlay *)overlay; 28 | 29 | /*! 30 | @brief 清除所有tile的缓存,并刷新overlay 31 | */ 32 | - (void)reloadData; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAUserLocation.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAUserLocation.h 3 | // MAMapKit 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2012年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MAAnnotation.h" 11 | 12 | @class CLLocation; 13 | @class CLHeading; 14 | 15 | /*! 16 | @brief 定位信息类 17 | */ 18 | @interface MAUserLocation : NSObject 19 | 20 | /*! 21 | @brief 位置更新状态,如果正在更新位置信息,则该值为YES. 22 | */ 23 | @property (nonatomic, readonly, getter = isUpdating) BOOL updating; 24 | 25 | /*! 26 | @brief 位置信息, 如果MAMapView的showsUserLocation为NO, 或者尚未定位成功, 则该值为nil. 27 | */ 28 | @property (nonatomic, readonly) CLLocation *location; 29 | 30 | /*! 31 | @brief heading信息. 32 | */ 33 | @property (nonatomic, readonly) CLHeading *heading; 34 | 35 | /*! 36 | @brief 定位标注点要显示的标题信息. 37 | */ 38 | @property (nonatomic, copy) NSString *title; 39 | 40 | /*! 41 | @brief 定位标注点要显示的子标题信息. 42 | */ 43 | @property (nonatomic, copy) NSString *subtitle; 44 | 45 | @end 46 | 47 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/Headers/MAUserLocationRepresentation.h: -------------------------------------------------------------------------------- 1 | // 2 | // MAUserLocationRepresentation.h 3 | // MAMapKitNew 4 | // 5 | // Created by AutoNavi. 6 | // Copyright (c) 2014年 AutoNavi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | /*! 13 | @brief 精度圈样式信息 14 | */ 15 | @interface MAUserLocationRepresentation : NSObject 16 | 17 | /*! 18 | @brief 标注图片。若设置为nil,则为默认图片。 19 | */ 20 | @property (nonatomic, strong) UIImage *image; 21 | 22 | /*! 23 | @brief 是否显示精度圈。默认为YES 24 | */ 25 | @property (nonatomic, assign) BOOL showsAccuracyRing; 26 | 27 | /*! 28 | @brief 是否显示方向指示(MAUserTrackingModeFollowWithHeading模式开启)。默认为YES 29 | */ 30 | @property (nonatomic, assign) BOOL showsHeadingIndicator; 31 | 32 | /*! 33 | @brief 精度圈边线宽度,默认是2 34 | */ 35 | @property (nonatomic, assign) CGFloat lineWidth; 36 | 37 | /*! 38 | @brief 精度圈填充颜色 39 | */ 40 | @property (nonatomic, strong) UIColor *fillColor; 41 | 42 | /*! 43 | @brief 精度圈边线颜色 44 | */ 45 | @property (nonatomic, strong) UIColor *strokeColor; 46 | 47 | /*! 48 | @brief 边线虚线样式, 默认是nil 49 | */ 50 | @property (nonatomic, copy) NSArray *lineDashPattern; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /ios/Frameworks/MAMapKit.framework/MAMapKit: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/Frameworks/MAMapKit.framework/MAMapKit -------------------------------------------------------------------------------- /ios/ImageLoaderResources/goods-placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/ImageLoaderResources/goods-placeholder.png -------------------------------------------------------------------------------- /ios/ReactNativeComponentDemos.xcodeproj/xcshareddata/xcschemes/ReactNativeComponentDemos.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 43 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 61 | 67 | 68 | 69 | 70 | 71 | 77 | 78 | 79 | 80 | 81 | 82 | 92 | 94 | 100 | 101 | 102 | 103 | 104 | 105 | 111 | 113 | 119 | 120 | 121 | 122 | 124 | 125 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /ios/ReactNativeComponentDemos/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/ReactNativeComponentDemos/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import 13 | #import 14 | 15 | #import "RCTSplashScreen.h" //import interface 16 | 17 | @implementation AppDelegate 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 20 | { 21 | NSURL *jsCodeLocation; 22 | 23 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 24 | 25 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 26 | moduleName:@"ReactNativeComponentDemos" 27 | initialProperties:nil 28 | launchOptions:launchOptions]; 29 | 30 | [RCTSplashScreen open:rootView withImageNamed:@"splash"]; 31 | 32 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 33 | 34 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 35 | UIViewController *rootViewController = [UIViewController new]; 36 | rootViewController.view = rootView; 37 | self.window.rootViewController = rootViewController; 38 | [self.window makeKeyAndVisible]; 39 | return YES; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /ios/ReactNativeComponentDemos/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /ios/ReactNativeComponentDemos/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | NSAppTransportSecurity 26 | 27 | NSAllowsArbitraryLoads 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | 37 | 38 | NSLocationWhenInUseUsageDescription 39 | 40 | NSCameraUsageDescription 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIRequiredDeviceCapabilities 45 | 46 | armv7 47 | 48 | UISupportedInterfaceOrientations 49 | 50 | UIInterfaceOrientationPortrait 51 | 52 | UIViewControllerBasedStatusBarAppearance 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ios/ReactNativeComponentDemos/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/ReactNativeComponentDemosTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/ReactNativeComponentDemosTests/ReactNativeComponentDemosTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface ReactNativeComponentDemosTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation ReactNativeComponentDemosTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /ios/SplashScreenResource/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/SplashScreenResource/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/SplashScreenResource/splash.png -------------------------------------------------------------------------------- /ios/raw/beep.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/ios/raw/beep.wav -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactNativeComponentDemos", 3 | "version": "0.0.1", 4 | "private": true, 5 | "description": "Demos for react-native components of 'react-native-component'.", 6 | "scripts": { 7 | "start": "node node_modules/react-native/local-cli/cli.js start", 8 | "test": "jest", 9 | "android-release": "cd android && ./gradlew assembleRelease", 10 | "android-apk-manual-install": "adb install ~/temp/app-release.apk" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/cyqresig/ReactNativeComponentDemos.git" 15 | }, 16 | "keywords": [ 17 | "react-native", 18 | "component", 19 | "demo" 20 | ], 21 | "author": "HISAME SHIZUMARU", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/cyqresig/ReactNativeComponentDemos/issues" 25 | }, 26 | "homepage": "https://github.com/cyqresig/ReactNativeComponentDemos#readme", 27 | "dependencies": { 28 | "react": "15.4.1", 29 | "react-native": "^0.41.1", 30 | "react-native-scrollable-tab-view": "^0.7.0", 31 | "react-native-smart-alipay": "^1.0.1", 32 | "react-native-smart-amap": "^1.0.1", 33 | "react-native-smart-amap-location": "^1.1.1", 34 | "react-native-smart-app-event-listener-enhance": "^1.1.1", 35 | "react-native-smart-badge": "^1.1.1", 36 | "react-native-smart-barcode": "^1.0.5", 37 | "react-native-smart-button": "2.0.0", 38 | "react-native-smart-corner-label": "^1.1.1", 39 | "react-native-smart-gesture-password": "^2.1.0", 40 | "react-native-smart-image-loader": "^1.0.3", 41 | "react-native-smart-loading-spinner-overlay": "^1.0.1", 42 | "react-native-smart-parabola": "^1.0.2", 43 | "react-native-smart-pull-to-refresh-listview": "^1.6.5", 44 | "react-native-smart-security-text": "^1.0.1", 45 | "react-native-smart-sortable-sudoku-grid": "^1.0.0", 46 | "react-native-smart-splash-screen": "^2.3.3", 47 | "react-native-smart-sudoku-grid": "^1.0.9", 48 | "react-native-smart-timer-enhance": "^1.0.2", 49 | "react-native-smart-toast": "^1.1.1", 50 | "react-native-smart-touch-id": "^1.1.1", 51 | "react-native-snap-carousel": "^2.0.1", 52 | "react-timer-mixin": "^0.13.3" 53 | }, 54 | "jest": { 55 | "preset": "react-native" 56 | }, 57 | "devDependencies": { 58 | "babel-jest": "17.0.2", 59 | "babel-preset-react-native": "1.9.0", 60 | "jest": "17.0.3", 61 | "react-test-renderer": "15.4.1", 62 | "whatwg-fetch": "^1.0.0" 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /temp/Demo.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cyqresig/ReactNativeComponentDemos/912dc2bab8cb821fd0dc0f635776a565c933ca93/temp/Demo.zip --------------------------------------------------------------------------------