├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── example ├── index.android.js └── index.ios.js ├── images ├── my_segmented1.gif ├── my_segmented2.gif ├── my_segmented3.gif ├── my_segmented4.gif ├── my_segmented5.gif └── my_segmented6.gif ├── index.android.js ├── index.ios.js ├── ios ├── example.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── example.xcscheme ├── example │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── main.m └── lib │ ├── CustomSegmentedControl.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── CustomSegmentedControl │ ├── CustomSegmentedControlManager.h │ └── CustomSegmentedControlManager.m ├── package.json └── src ├── CustomSegmentedControl.js └── index.js /.gitignore: -------------------------------------------------------------------------------- 1 | npm-debug.log 2 | 3 | ######################### 4 | # .gitignore file for Xcode5 5 | # 6 | # NB: if you are storing "built" products, this WILL NOT WORK, 7 | # and you should use a different .gitignore (or none at all) 8 | # This file is for SOURCE projects, where there are many extra 9 | # files that we want to exclude 10 | # 11 | # For updates, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects 12 | # and https://gist.github.com/adamgit/3786883 13 | ######################### 14 | 15 | ##### 16 | # OS X temporary files that should never be committed 17 | 18 | .DS_Store 19 | *.swp 20 | *.lock 21 | profile 22 | # cocoapods specific exclusions 23 | !Podfile.lock 24 | !Manifest.lock 25 | 26 | #### Code coverage 27 | # json file which is used by Xcode plugin called PuncoverPlugin to show code coverrage informtaion in the Xcode gutter 28 | # it is generated using Slather 29 | .gutter.json 30 | 31 | #### 32 | # Xcode temporary files that should never be committed 33 | # 34 | # NB: NIB/XIB files still exist even on Storyboard projects, so we want this... 35 | 36 | *~.nib 37 | 38 | 39 | #### 40 | # Xcode build files - 41 | # 42 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData" 43 | 44 | DerivedData/ 45 | 46 | # NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build" 47 | 48 | build/ 49 | 50 | 51 | ##### 52 | # Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups) 53 | # 54 | # This is complicated: 55 | # 56 | # SOMETIMES you need to put this file in version control. 57 | # Apple designed it poorly - if you use "custom executables", they are 58 | # saved in this file. 59 | # 99% of projects do NOT use those, so they do NOT want to version control this file. 60 | # ..but if you're in the 1%, comment out the line "*.pbxuser" 61 | 62 | *.pbxuser 63 | *.mode1v3 64 | *.mode2v3 65 | *.perspectivev3 66 | # NB: also, whitelist the default ones, some projects need to use these 67 | !default.pbxuser 68 | !default.mode1v3 69 | !default.mode2v3 70 | !default.perspectivev3 71 | 72 | 73 | #### 74 | # Xcode 4 - semi-personal settings, often included in workspaces 75 | # 76 | # You can safely ignore the xcuserdata files - but do NOT ignore the files next to them 77 | # 78 | 79 | xcuserdata 80 | 81 | #### 82 | # XCode 4 workspaces - more detailed 83 | # 84 | # Workspaces are important! They are a core feature of Xcode - don't exclude them :) 85 | # 86 | # Workspace layout is quite spammy. For reference: 87 | # 88 | # (root)/ 89 | # (project-name).xcodeproj/ 90 | # project.pbxproj 91 | # project.xcworkspace/ 92 | # contents.xcworkspacedata 93 | # xcuserdata/ 94 | # (your name)/xcuserdatad/ 95 | # xcuserdata/ 96 | # (your name)/xcuserdatad/ 97 | # 98 | # 99 | # 100 | # Xcode 4 workspaces - SHARED 101 | # 102 | # This is UNDOCUMENTED (google: "developer.apple.com xcshareddata" - 0 results 103 | # But if you're going to kill personal workspaces, at least keep the shared ones... 104 | # 105 | # 106 | !xcshareddata 107 | 108 | #### 109 | # XCode 4 build-schemes 110 | # 111 | # PRIVATE ones are stored inside xcuserdata 112 | !xcschemes 113 | 114 | #### 115 | # Xcode 4 - Deprecated classes 116 | # 117 | # Allegedly, if you manually "deprecate" your classes, they get moved here. 118 | # 119 | # We're using source-control, so this is a "feature" that we do not want! 120 | 121 | *.moved-aside 122 | 123 | #### 124 | # Xcode 5 - Source Control files 125 | # 126 | # Xcode 5 introduced a new file type .xccheckout. This files contains VCS metadata 127 | # and should therefore not be checked into the VCS. 128 | 129 | *.xccheckout 130 | 131 | #### 132 | # Xcode 7 133 | # 134 | # Code coverage files 135 | 136 | *.gcda 137 | *.gcno 138 | 139 | #### 140 | # UNKNOWN: recommended by others, but I can't discover what these files are 141 | # 142 | # ...none. Everything is now explained.: 143 | 144 | #### 145 | # Webstorm 146 | # 147 | .idea 148 | 149 | node_modules -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | example/ 2 | test/ 3 | res/generated/ 4 | 5 | .npmignore 6 | 7 | 8 | ################# 9 | # from .gitignore: 10 | ################ 11 | 12 | 13 | ############ 14 | # Node 15 | ############ 16 | # Logs 17 | logs 18 | *.log 19 | npm-debug.log* 20 | 21 | # Runtime data 22 | pids 23 | *.pid 24 | *.seed 25 | 26 | # Directory for instrumented libs generated by jscoverage/JSCover 27 | lib-cov 28 | 29 | # Coverage directory used by tools like istanbul 30 | coverage 31 | 32 | # nyc test coverage 33 | .nyc_output 34 | 35 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 36 | .grunt 37 | 38 | # node-waf configuration 39 | .lock-wscript 40 | 41 | # Compiled binary addons (http://nodejs.org/api/addons.html) 42 | build/Release 43 | 44 | # Dependency directories 45 | node_modules 46 | jspm_packages 47 | 48 | # Optional npm cache directory 49 | .npm 50 | 51 | # Optional REPL history 52 | .node_repl_history 53 | 54 | ################ 55 | # JetBrains 56 | ################ 57 | .idea 58 | 59 | ## File-based project format: 60 | *.iws 61 | 62 | ## Plugin-specific files: 63 | 64 | # IntelliJ 65 | /out/ 66 | 67 | # mpeltonen/sbt-idea plugin 68 | .idea_modules/ 69 | 70 | # JIRA plugin 71 | atlassian-ide-plugin.xml 72 | 73 | # Crashlytics plugin (for Android Studio and IntelliJ) 74 | com_crashlytics_export_strings.xml 75 | crashlytics.properties 76 | crashlytics-build.properties 77 | fabric.properties 78 | 79 | 80 | ############ 81 | # iOS 82 | ############ 83 | # Xcode 84 | # 85 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 86 | 87 | ## Build generated 88 | ios/build/ 89 | ios/DerivedData/ 90 | 91 | ## Various settings 92 | *.pbxuser 93 | !default.pbxuser 94 | *.mode1v3 95 | !default.mode1v3 96 | *.mode2v3 97 | !default.mode2v3 98 | *.perspectivev3 99 | !default.perspectivev3 100 | ios/xcuserdata/ 101 | 102 | ## Other 103 | *.moved-aside 104 | *.xcuserstate 105 | 106 | ## Obj-C/Swift specific 107 | *.hmap 108 | *.ipa 109 | *.dSYM.zip 110 | *.dSYM 111 | 112 | # CocoaPods 113 | # 114 | # We recommend against adding the Pods directory to your .gitignore. However 115 | # you should judge for yourself, the pros and cons are mentioned at: 116 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 117 | # 118 | ios/Pods/ 119 | 120 | # Carthage 121 | # 122 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 123 | # Carthage/Checkouts 124 | 125 | Carthage/Build 126 | 127 | # fastlane 128 | # 129 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 130 | # screenshots whenever they are needed. 131 | # For more information about the recommended setup visit: 132 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 133 | 134 | fastlane/report.xml 135 | fastlane/screenshots 136 | 137 | 138 | ############ 139 | # Android 140 | ############ 141 | # Built application files 142 | *.apk 143 | *.ap_ 144 | 145 | # Files for the Dalvik VM 146 | *.dex 147 | 148 | # Java class files 149 | *.class 150 | 151 | # Generated files 152 | android/bin/ 153 | android/gen/ 154 | android/out/ 155 | 156 | # Gradle files 157 | android/.gradle/ 158 | android/build/ 159 | android/*/build/ 160 | 161 | # Local configuration file (sdk path, etc) 162 | local.properties 163 | 164 | # Proguard folder generated by Eclipse 165 | android/proguard/ 166 | 167 | # Log Files 168 | *.log 169 | 170 | # Android Studio Navigation editor temp files 171 | android/.navigation/ 172 | 173 | # Android Studio captures folder 174 | android/captures/ 175 | 176 | # Intellij 177 | *.iml 178 | 179 | # Keystore files 180 | *.jks 181 | 182 | ################## 183 | # React-Native 184 | ################## 185 | # OSX 186 | # 187 | .DS_Store 188 | 189 | # Xcode 190 | # 191 | build/ 192 | *.pbxuser 193 | !default.pbxuser 194 | *.mode1v3 195 | !default.mode1v3 196 | *.mode2v3 197 | !default.mode2v3 198 | *.perspectivev3 199 | !default.perspectivev3 200 | xcuserdata 201 | *.xccheckout 202 | *.moved-aside 203 | DerivedData 204 | *.hmap 205 | *.ipa 206 | *.xcuserstate 207 | project.xcworkspace 208 | 209 | # Android/IJ 210 | # 211 | .idea 212 | android/.idea 213 | android/.gradle 214 | android/local.properties 215 | 216 | # node.js 217 | # 218 | node_modules/ 219 | npm-debug.log 220 | 221 | # BUCK 222 | buck-out/ 223 | \.buckd/ 224 | android/app/libs 225 | android/keystores/debug.keystore 226 | 227 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Wix.com 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 | # react-native-custom-segmented-control 2 | Native UI component for Segmented Control with custom style 3 | 4 | `animationType: 'middle-line'` 5 | `selectedLineAlign: 'text'` 6 | `selectedLineMode: 'full'` 7 | ![Screenshots](images/my_segmented1.gif) 8 | 9 | `animationType: 'open-and-close'` 10 | `selectedLineAlign: 'text'` 11 | `selectedLineMode: 'text'` 12 | ![Screenshots](images/my_segmented6.gif) 13 | 14 | `animationType: 'middle-line'` 15 | `selectedLineAlign: 'bottom'` 16 | `selectedLineMode: 'text'` 17 | ![Screenshots](images/my_segmented3.gif) 18 | 19 | `animationType: 'middle-line'` 20 | `selectedLineAlign: 'top'` 21 | `selectedLineMode: 'full'` 22 | ![Screenshots](images/my_segmented4.gif) 23 | 24 | `animationType: 'middle-line'` 25 | `selectedLineAlign: 'top'` 26 | `selectedLineMode: 'full'` 27 | ![Screenshots](images/my_segmented5.gif) 28 | 29 | `animationType: 'middle-line'` 30 | `selectedLineAlign: 'text'` 31 | `selectedLineMode: 'text'` 32 | ![Screenshots](images/my_segmented2.gif) 33 | 34 | ## Installation 35 | 36 | - Install using `npm`: 37 | 38 | ``` 39 | npm install react-native-custom-segmented-control --save 40 | ``` 41 | 42 | - Locate the module lib folder in your node modules: 43 | `PROJECT_DIR/node_modules/react-native-custom-segmented-control/lib`. 44 | 45 | - Drag the `CustomSegmentedControl.xcodeproj` project file into your project 46 | 47 | - Add `libCustomSegmentedControl.a` to your target's **Linked Frameworks and Libraries**. 48 | 49 | ## How To Use 50 | Require the native component: 51 | 52 | ```js 53 | import {CustomSegmentedControl} from 'react-native-custom-segmented-control' 54 | ``` 55 | 56 | Now use it in your jsx inside your `View`: 57 | 58 | ```jsx 59 | { 88 | }} 89 | onSelectedDidChange={(event)=> { 90 | }} 91 | /> 92 | ``` 93 | 94 | ##Properties 95 | 96 | Attribute | Description 97 | -------- | ----------- 98 | textValues | [Array] Array of strings which will be presented on the segmented control 99 | selected | [int] The selected segment 100 | onSelectedWillChange | [function] callback function will be called **before** the selected animation will take place 101 | onSelectedDidChange | [function] callback function will be called **after** the selected animation will take place 102 | animation | [Object] see [Animation Properties](README.md#animation-properties) 103 | segmentedStyle | [Object] see [Segmented Style Properties](README.md#segmented-style-properties) 104 | 105 | 106 | ##Segmented Style Properties 107 | Attribute | Description 108 | --------- | ----------- 109 | selectedLineHeight | [float] The selected line height. Default is 2 110 | fontSize | [float] The segmented control text font size. Default is 14 111 | segmentBackgroundColor | [Color] The segmented control background color. Default is `'black'` 112 | segmentTextColor | [Color] The segmented control text color. Default is system default (blue) 113 | selectedTextColor | [Color] The selected segment color 114 | segmentHighlightTextColor | [Color] The segmnet highlight color. Default is black with alpha 0.5 115 | segmentFontFamily | [Font/`'system-font-bold'`/`'system-font'`] The segmented control font. Default is `system-font` default 116 | selectedLineColor | [Color] The selected line color. Default is 'black' 117 | selectedLineAlign | [`'top'`/`'bottom'`/`'text'`] The selected line vertical alignment. Defualt is `'text'` 118 | selectedLineMode | [`'full'`/`'text'`] The selected line mode. For determine if the line will be text width of full button width. Default is `'text'` 119 | selectedLinePaddingWidth | [float] The selected line width padding. Default is 2 120 | 121 | 122 | 123 | ##Animation Properties 124 | 125 | Attribute | Description 126 | --------- | ----------- 127 | duration | [float] The animation duration. Default is 0.2 sec 128 | damping | [float] The damping ratio for the spring animation. Default is 0 (no damping) 129 | animationType | [`'default'`, `'middle-line'`, `'close-and-open'`] The transition animation type. Default is `'default'` 130 | initialDampingVelocity | (float) The initial damping velocity. Default is 0 131 | -------------------------------------------------------------------------------- /example/index.android.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix-incubator/react-native-custom-segmented-control/927573167d529a4c0b639de2c90c7d9f768b31d7/example/index.android.js -------------------------------------------------------------------------------- /example/index.ios.js: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | import { 3 | AppRegistry, 4 | StyleSheet, 5 | View, 6 | } from 'react-native'; 7 | 8 | import {CustomSegmentedControl} from '../src/index'; 9 | 10 | 11 | class example extends Component { 12 | 13 | constructor(props) { 14 | super(props); 15 | this.state = { 16 | segmentedText: [ 17 | ['FIRST','SECOND', 'THIRD'], 18 | ['ORDERS','HOTELS', 'OPTIONS'], 19 | ['TOP FREE','TOP PAID', 'TOP GROSSING'], 20 | ['ORDERS','HOTELS', 'OPTIONS','TOP FREE','TOP PAID'], 21 | ['ORDERS','HOTELS', 'OPTIONS','TOP FREE','TOP PAID'] 22 | ], 23 | selectedArray: [0,2,1,4,3] 24 | }; 25 | } 26 | 27 | 28 | render() { 29 | return ( 30 | 31 | 32 | 33 | { 62 | }} 63 | onSelectedDidChange={(event)=> { 64 | }} 65 | 66 | /> 67 | 68 | { 97 | }} 98 | onSelectedDidChange={(event)=> { 99 | }} 100 | 101 | /> 102 | 103 | 120 | 121 | 146 | 147 | 168 | 169 | 192 | 193 | 194 | 195 | ); 196 | } 197 | } 198 | 199 | const styles = StyleSheet.create({ 200 | container: { 201 | flex: 1, 202 | marginTop: 20, 203 | backgroundColor: 'white' 204 | }, 205 | welcome: { 206 | fontSize: 20, 207 | textAlign: 'center', 208 | margin: 10, 209 | }, 210 | instructions: { 211 | textAlign: 'center', 212 | color: '#333333', 213 | marginBottom: 5, 214 | }, 215 | }); 216 | 217 | AppRegistry.registerComponent('example', () => example); 218 | -------------------------------------------------------------------------------- /images/my_segmented1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix-incubator/react-native-custom-segmented-control/927573167d529a4c0b639de2c90c7d9f768b31d7/images/my_segmented1.gif -------------------------------------------------------------------------------- /images/my_segmented2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix-incubator/react-native-custom-segmented-control/927573167d529a4c0b639de2c90c7d9f768b31d7/images/my_segmented2.gif -------------------------------------------------------------------------------- /images/my_segmented3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix-incubator/react-native-custom-segmented-control/927573167d529a4c0b639de2c90c7d9f768b31d7/images/my_segmented3.gif -------------------------------------------------------------------------------- /images/my_segmented4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix-incubator/react-native-custom-segmented-control/927573167d529a4c0b639de2c90c7d9f768b31d7/images/my_segmented4.gif -------------------------------------------------------------------------------- /images/my_segmented5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix-incubator/react-native-custom-segmented-control/927573167d529a4c0b639de2c90c7d9f768b31d7/images/my_segmented5.gif -------------------------------------------------------------------------------- /images/my_segmented6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wix-incubator/react-native-custom-segmented-control/927573167d529a4c0b639de2c90c7d9f768b31d7/images/my_segmented6.gif -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | // This index is the example app index, 2 | // please jump src/index 😅 3 | require('./example/index'); 4 | -------------------------------------------------------------------------------- /ios/example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 11 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 12 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; 13 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; 14 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; 15 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; 16 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; 17 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; 18 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; 19 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; 20 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 21 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 22 | 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; 23 | 26D2917B2189FC5C009EFA17 /* libCustomSegmentedControl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D291582189FC53009EFA17 /* libCustomSegmentedControl.a */; }; 24 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 31 | proxyType = 2; 32 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 33 | remoteInfo = RCTActionSheet; 34 | }; 35 | 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 38 | proxyType = 2; 39 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 40 | remoteInfo = RCTGeolocation; 41 | }; 42 | 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { 43 | isa = PBXContainerItemProxy; 44 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 45 | proxyType = 2; 46 | remoteGlobalIDString = 58B5115D1A9E6B3D00147676; 47 | remoteInfo = RCTImage; 48 | }; 49 | 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { 50 | isa = PBXContainerItemProxy; 51 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 52 | proxyType = 2; 53 | remoteGlobalIDString = 58B511DB1A9E6C8500147676; 54 | remoteInfo = RCTNetwork; 55 | }; 56 | 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { 57 | isa = PBXContainerItemProxy; 58 | containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 59 | proxyType = 2; 60 | remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; 61 | remoteInfo = RCTVibration; 62 | }; 63 | 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { 64 | isa = PBXContainerItemProxy; 65 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 66 | proxyType = 2; 67 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 68 | remoteInfo = RCTSettings; 69 | }; 70 | 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { 71 | isa = PBXContainerItemProxy; 72 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 73 | proxyType = 2; 74 | remoteGlobalIDString = 3C86DF461ADF2C930047B81A; 75 | remoteInfo = RCTWebSocket; 76 | }; 77 | 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { 78 | isa = PBXContainerItemProxy; 79 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 80 | proxyType = 2; 81 | remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; 82 | remoteInfo = React; 83 | }; 84 | 264AD5C82046CF5000B48D9B /* PBXContainerItemProxy */ = { 85 | isa = PBXContainerItemProxy; 86 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 87 | proxyType = 2; 88 | remoteGlobalIDString = 3DBE0D001F3B181A0099AA32; 89 | remoteInfo = fishhook; 90 | }; 91 | 264AD5CA2046CF5000B48D9B /* PBXContainerItemProxy */ = { 92 | isa = PBXContainerItemProxy; 93 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 94 | proxyType = 2; 95 | remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32; 96 | remoteInfo = "fishhook-tvOS"; 97 | }; 98 | 264AD5DA2046CF5000B48D9B /* PBXContainerItemProxy */ = { 99 | isa = PBXContainerItemProxy; 100 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 101 | proxyType = 2; 102 | remoteGlobalIDString = 139D7ECE1E25DB7D00323FB7; 103 | remoteInfo = "third-party"; 104 | }; 105 | 264AD5DC2046CF5000B48D9B /* PBXContainerItemProxy */ = { 106 | isa = PBXContainerItemProxy; 107 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 108 | proxyType = 2; 109 | remoteGlobalIDString = 3D383D3C1EBD27B6005632C8; 110 | remoteInfo = "third-party-tvOS"; 111 | }; 112 | 264AD5DE2046CF5000B48D9B /* PBXContainerItemProxy */ = { 113 | isa = PBXContainerItemProxy; 114 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 115 | proxyType = 2; 116 | remoteGlobalIDString = 139D7E881E25C6D100323FB7; 117 | remoteInfo = "double-conversion"; 118 | }; 119 | 264AD5E02046CF5000B48D9B /* PBXContainerItemProxy */ = { 120 | isa = PBXContainerItemProxy; 121 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 122 | proxyType = 2; 123 | remoteGlobalIDString = 3D383D621EBD27B9005632C8; 124 | remoteInfo = "double-conversion-tvOS"; 125 | }; 126 | 264AD5E22046CF5000B48D9B /* PBXContainerItemProxy */ = { 127 | isa = PBXContainerItemProxy; 128 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 129 | proxyType = 2; 130 | remoteGlobalIDString = 9936F3131F5F2E4B0010BF04; 131 | remoteInfo = privatedata; 132 | }; 133 | 264AD5E42046CF5000B48D9B /* PBXContainerItemProxy */ = { 134 | isa = PBXContainerItemProxy; 135 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 136 | proxyType = 2; 137 | remoteGlobalIDString = 9936F32F1F5F2E5B0010BF04; 138 | remoteInfo = "privatedata-tvOS"; 139 | }; 140 | 26D291212189FB37009EFA17 /* PBXContainerItemProxy */ = { 141 | isa = PBXContainerItemProxy; 142 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 143 | proxyType = 2; 144 | remoteGlobalIDString = EBF21BDC1FC498900052F4D5; 145 | remoteInfo = jsinspector; 146 | }; 147 | 26D291232189FB37009EFA17 /* PBXContainerItemProxy */ = { 148 | isa = PBXContainerItemProxy; 149 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 150 | proxyType = 2; 151 | remoteGlobalIDString = EBF21BFA1FC4989A0052F4D5; 152 | remoteInfo = "jsinspector-tvOS"; 153 | }; 154 | 26D291572189FC53009EFA17 /* PBXContainerItemProxy */ = { 155 | isa = PBXContainerItemProxy; 156 | containerPortal = 26D291532189FC53009EFA17 /* CustomSegmentedControl.xcodeproj */; 157 | proxyType = 2; 158 | remoteGlobalIDString = 26751C0A1CE8BD5C0006725F; 159 | remoteInfo = CustomSegmentedControl; 160 | }; 161 | 36A002391EAE21D6002D9978 /* PBXContainerItemProxy */ = { 162 | isa = PBXContainerItemProxy; 163 | containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 164 | proxyType = 2; 165 | remoteGlobalIDString = 2D2A283A1D9B042B00D4039D; 166 | remoteInfo = "RCTImage-tvOS"; 167 | }; 168 | 36A0023D1EAE21D6002D9978 /* PBXContainerItemProxy */ = { 169 | isa = PBXContainerItemProxy; 170 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 171 | proxyType = 2; 172 | remoteGlobalIDString = 2D2A28471D9B043800D4039D; 173 | remoteInfo = "RCTLinking-tvOS"; 174 | }; 175 | 36A002411EAE21D6002D9978 /* PBXContainerItemProxy */ = { 176 | isa = PBXContainerItemProxy; 177 | containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 178 | proxyType = 2; 179 | remoteGlobalIDString = 2D2A28541D9B044C00D4039D; 180 | remoteInfo = "RCTNetwork-tvOS"; 181 | }; 182 | 36A002451EAE21D6002D9978 /* PBXContainerItemProxy */ = { 183 | isa = PBXContainerItemProxy; 184 | containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 185 | proxyType = 2; 186 | remoteGlobalIDString = 2D2A28611D9B046600D4039D; 187 | remoteInfo = "RCTSettings-tvOS"; 188 | }; 189 | 36A002491EAE21D6002D9978 /* PBXContainerItemProxy */ = { 190 | isa = PBXContainerItemProxy; 191 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 192 | proxyType = 2; 193 | remoteGlobalIDString = 2D2A287B1D9B048500D4039D; 194 | remoteInfo = "RCTText-tvOS"; 195 | }; 196 | 36A0024E1EAE21D6002D9978 /* PBXContainerItemProxy */ = { 197 | isa = PBXContainerItemProxy; 198 | containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 199 | proxyType = 2; 200 | remoteGlobalIDString = 2D2A28881D9B049200D4039D; 201 | remoteInfo = "RCTWebSocket-tvOS"; 202 | }; 203 | 36A002521EAE21D6002D9978 /* PBXContainerItemProxy */ = { 204 | isa = PBXContainerItemProxy; 205 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 206 | proxyType = 2; 207 | remoteGlobalIDString = 2D2A28131D9B038B00D4039D; 208 | remoteInfo = "React-tvOS"; 209 | }; 210 | 36A0025B1EAE2363002D9978 /* PBXContainerItemProxy */ = { 211 | isa = PBXContainerItemProxy; 212 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 213 | proxyType = 2; 214 | remoteGlobalIDString = 3D3C059A1DE3340900C268FA; 215 | remoteInfo = yoga; 216 | }; 217 | 36A0025D1EAE2363002D9978 /* PBXContainerItemProxy */ = { 218 | isa = PBXContainerItemProxy; 219 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 220 | proxyType = 2; 221 | remoteGlobalIDString = 3D3C06751DE3340C00C268FA; 222 | remoteInfo = "yoga-tvOS"; 223 | }; 224 | 36A0025F1EAE2363002D9978 /* PBXContainerItemProxy */ = { 225 | isa = PBXContainerItemProxy; 226 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 227 | proxyType = 2; 228 | remoteGlobalIDString = 3D3CD9251DE5FBEC00167DC4; 229 | remoteInfo = cxxreact; 230 | }; 231 | 36A002611EAE2363002D9978 /* PBXContainerItemProxy */ = { 232 | isa = PBXContainerItemProxy; 233 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 234 | proxyType = 2; 235 | remoteGlobalIDString = 3D3CD9321DE5FBEE00167DC4; 236 | remoteInfo = "cxxreact-tvOS"; 237 | }; 238 | 36A002631EAE2363002D9978 /* PBXContainerItemProxy */ = { 239 | isa = PBXContainerItemProxy; 240 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 241 | proxyType = 2; 242 | remoteGlobalIDString = 3D3CD90B1DE5FBD600167DC4; 243 | remoteInfo = jschelpers; 244 | }; 245 | 36A002651EAE2363002D9978 /* PBXContainerItemProxy */ = { 246 | isa = PBXContainerItemProxy; 247 | containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; 248 | proxyType = 2; 249 | remoteGlobalIDString = 3D3CD9181DE5FBD800167DC4; 250 | remoteInfo = "jschelpers-tvOS"; 251 | }; 252 | 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { 253 | isa = PBXContainerItemProxy; 254 | containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 255 | proxyType = 2; 256 | remoteGlobalIDString = 134814201AA4EA6300B7C361; 257 | remoteInfo = RCTLinking; 258 | }; 259 | 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { 260 | isa = PBXContainerItemProxy; 261 | containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 262 | proxyType = 2; 263 | remoteGlobalIDString = 58B5119B1A9E6C1200147676; 264 | remoteInfo = RCTText; 265 | }; 266 | /* End PBXContainerItemProxy section */ 267 | 268 | /* Begin PBXFileReference section */ 269 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 270 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; 271 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; 272 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; 273 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; 274 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 275 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; 276 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 277 | 13B07F961A680F5B00A75B9A /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 278 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = example/AppDelegate.h; sourceTree = ""; }; 279 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = example/AppDelegate.m; sourceTree = ""; }; 280 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 281 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = example/Images.xcassets; sourceTree = ""; }; 282 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = example/Info.plist; sourceTree = ""; }; 283 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = example/main.m; sourceTree = ""; }; 284 | 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; 285 | 26D291532189FC53009EFA17 /* CustomSegmentedControl.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CustomSegmentedControl.xcodeproj; path = lib/CustomSegmentedControl.xcodeproj; sourceTree = ""; }; 286 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; 287 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; 288 | /* End PBXFileReference section */ 289 | 290 | /* Begin PBXFrameworksBuildPhase section */ 291 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { 292 | isa = PBXFrameworksBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | 26D2917B2189FC5C009EFA17 /* libCustomSegmentedControl.a in Frameworks */, 296 | 146834051AC3E58100842450 /* libReact.a in Frameworks */, 297 | 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 298 | 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, 299 | 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, 300 | 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, 301 | 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, 302 | 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, 303 | 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, 304 | 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, 305 | 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, 306 | ); 307 | runOnlyForDeploymentPostprocessing = 0; 308 | }; 309 | /* End PBXFrameworksBuildPhase section */ 310 | 311 | /* Begin PBXGroup section */ 312 | 00C302A81ABCB8CE00DB3ED1 /* Products */ = { 313 | isa = PBXGroup; 314 | children = ( 315 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, 316 | ); 317 | name = Products; 318 | sourceTree = ""; 319 | }; 320 | 00C302B61ABCB90400DB3ED1 /* Products */ = { 321 | isa = PBXGroup; 322 | children = ( 323 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, 324 | ); 325 | name = Products; 326 | sourceTree = ""; 327 | }; 328 | 00C302BC1ABCB91800DB3ED1 /* Products */ = { 329 | isa = PBXGroup; 330 | children = ( 331 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, 332 | 36A0023A1EAE21D6002D9978 /* libRCTImage-tvOS.a */, 333 | ); 334 | name = Products; 335 | sourceTree = ""; 336 | }; 337 | 00C302D41ABCB9D200DB3ED1 /* Products */ = { 338 | isa = PBXGroup; 339 | children = ( 340 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, 341 | 36A002421EAE21D6002D9978 /* libRCTNetwork-tvOS.a */, 342 | ); 343 | name = Products; 344 | sourceTree = ""; 345 | }; 346 | 00C302E01ABCB9EE00DB3ED1 /* Products */ = { 347 | isa = PBXGroup; 348 | children = ( 349 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, 350 | ); 351 | name = Products; 352 | sourceTree = ""; 353 | }; 354 | 139105B71AF99BAD00B5F7CC /* Products */ = { 355 | isa = PBXGroup; 356 | children = ( 357 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, 358 | 36A002461EAE21D6002D9978 /* libRCTSettings-tvOS.a */, 359 | ); 360 | name = Products; 361 | sourceTree = ""; 362 | }; 363 | 139FDEE71B06529A00C62182 /* Products */ = { 364 | isa = PBXGroup; 365 | children = ( 366 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, 367 | 36A0024F1EAE21D6002D9978 /* libRCTWebSocket-tvOS.a */, 368 | 264AD5C92046CF5000B48D9B /* libfishhook.a */, 369 | 264AD5CB2046CF5000B48D9B /* libfishhook-tvOS.a */, 370 | ); 371 | name = Products; 372 | sourceTree = ""; 373 | }; 374 | 13B07FAE1A68108700A75B9A /* example */ = { 375 | isa = PBXGroup; 376 | children = ( 377 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */, 378 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 379 | 13B07FB01A68108700A75B9A /* AppDelegate.m */, 380 | 13B07FB51A68108700A75B9A /* Images.xcassets */, 381 | 13B07FB61A68108700A75B9A /* Info.plist */, 382 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, 383 | 13B07FB71A68108700A75B9A /* main.m */, 384 | ); 385 | name = example; 386 | sourceTree = ""; 387 | }; 388 | 146834001AC3E56700842450 /* Products */ = { 389 | isa = PBXGroup; 390 | children = ( 391 | 146834041AC3E56700842450 /* libReact.a */, 392 | 36A002531EAE21D6002D9978 /* libReact.a */, 393 | 36A0025C1EAE2363002D9978 /* libyoga.a */, 394 | 36A0025E1EAE2363002D9978 /* libyoga.a */, 395 | 36A002601EAE2363002D9978 /* libcxxreact.a */, 396 | 36A002621EAE2363002D9978 /* libcxxreact.a */, 397 | 36A002641EAE2363002D9978 /* libjschelpers.a */, 398 | 36A002661EAE2363002D9978 /* libjschelpers.a */, 399 | 26D291222189FB37009EFA17 /* libjsinspector.a */, 400 | 26D291242189FB37009EFA17 /* libjsinspector-tvOS.a */, 401 | 264AD5DB2046CF5000B48D9B /* libthird-party.a */, 402 | 264AD5DD2046CF5000B48D9B /* libthird-party.a */, 403 | 264AD5DF2046CF5000B48D9B /* libdouble-conversion.a */, 404 | 264AD5E12046CF5000B48D9B /* libdouble-conversion.a */, 405 | 264AD5E32046CF5000B48D9B /* libprivatedata.a */, 406 | 264AD5E52046CF5000B48D9B /* libprivatedata-tvOS.a */, 407 | ); 408 | name = Products; 409 | sourceTree = ""; 410 | }; 411 | 26D291542189FC53009EFA17 /* Products */ = { 412 | isa = PBXGroup; 413 | children = ( 414 | 26D291582189FC53009EFA17 /* libCustomSegmentedControl.a */, 415 | ); 416 | name = Products; 417 | sourceTree = ""; 418 | }; 419 | 26D2917A2189FC5C009EFA17 /* Frameworks */ = { 420 | isa = PBXGroup; 421 | children = ( 422 | ); 423 | name = Frameworks; 424 | sourceTree = ""; 425 | }; 426 | 78C398B11ACF4ADC00677621 /* Products */ = { 427 | isa = PBXGroup; 428 | children = ( 429 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, 430 | 36A0023E1EAE21D6002D9978 /* libRCTLinking-tvOS.a */, 431 | ); 432 | name = Products; 433 | sourceTree = ""; 434 | }; 435 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = { 436 | isa = PBXGroup; 437 | children = ( 438 | 26D291532189FC53009EFA17 /* CustomSegmentedControl.xcodeproj */, 439 | 146833FF1AC3E56700842450 /* React.xcodeproj */, 440 | 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 441 | 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, 442 | 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, 443 | 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, 444 | 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, 445 | 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, 446 | 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, 447 | 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, 448 | 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, 449 | ); 450 | name = Libraries; 451 | sourceTree = ""; 452 | }; 453 | 832341B11AAA6A8300B99B32 /* Products */ = { 454 | isa = PBXGroup; 455 | children = ( 456 | 832341B51AAA6A8300B99B32 /* libRCTText.a */, 457 | 36A0024A1EAE21D6002D9978 /* libRCTText-tvOS.a */, 458 | ); 459 | name = Products; 460 | sourceTree = ""; 461 | }; 462 | 83CBB9F61A601CBA00E9B192 = { 463 | isa = PBXGroup; 464 | children = ( 465 | 13B07FAE1A68108700A75B9A /* example */, 466 | 832341AE1AAA6A7D00B99B32 /* Libraries */, 467 | 83CBBA001A601CBA00E9B192 /* Products */, 468 | 26D2917A2189FC5C009EFA17 /* Frameworks */, 469 | ); 470 | indentWidth = 2; 471 | sourceTree = ""; 472 | tabWidth = 2; 473 | }; 474 | 83CBBA001A601CBA00E9B192 /* Products */ = { 475 | isa = PBXGroup; 476 | children = ( 477 | 13B07F961A680F5B00A75B9A /* example.app */, 478 | ); 479 | name = Products; 480 | sourceTree = ""; 481 | }; 482 | /* End PBXGroup section */ 483 | 484 | /* Begin PBXNativeTarget section */ 485 | 13B07F861A680F5B00A75B9A /* example */ = { 486 | isa = PBXNativeTarget; 487 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */; 488 | buildPhases = ( 489 | 13B07F871A680F5B00A75B9A /* Sources */, 490 | 13B07F8C1A680F5B00A75B9A /* Frameworks */, 491 | 13B07F8E1A680F5B00A75B9A /* Resources */, 492 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, 493 | ); 494 | buildRules = ( 495 | ); 496 | dependencies = ( 497 | ); 498 | name = example; 499 | productName = "Hello World"; 500 | productReference = 13B07F961A680F5B00A75B9A /* example.app */; 501 | productType = "com.apple.product-type.application"; 502 | }; 503 | /* End PBXNativeTarget section */ 504 | 505 | /* Begin PBXProject section */ 506 | 83CBB9F71A601CBA00E9B192 /* Project object */ = { 507 | isa = PBXProject; 508 | attributes = { 509 | LastUpgradeCheck = 0610; 510 | ORGANIZATIONNAME = Facebook; 511 | }; 512 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */; 513 | compatibilityVersion = "Xcode 3.2"; 514 | developmentRegion = English; 515 | hasScannedForEncodings = 0; 516 | knownRegions = ( 517 | en, 518 | Base, 519 | ); 520 | mainGroup = 83CBB9F61A601CBA00E9B192; 521 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; 522 | projectDirPath = ""; 523 | projectReferences = ( 524 | { 525 | ProductGroup = 26D291542189FC53009EFA17 /* Products */; 526 | ProjectRef = 26D291532189FC53009EFA17 /* CustomSegmentedControl.xcodeproj */; 527 | }, 528 | { 529 | ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; 530 | ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; 531 | }, 532 | { 533 | ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; 534 | ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; 535 | }, 536 | { 537 | ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; 538 | ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; 539 | }, 540 | { 541 | ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; 542 | ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; 543 | }, 544 | { 545 | ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; 546 | ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; 547 | }, 548 | { 549 | ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; 550 | ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; 551 | }, 552 | { 553 | ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; 554 | ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; 555 | }, 556 | { 557 | ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; 558 | ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; 559 | }, 560 | { 561 | ProductGroup = 139FDEE71B06529A00C62182 /* Products */; 562 | ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; 563 | }, 564 | { 565 | ProductGroup = 146834001AC3E56700842450 /* Products */; 566 | ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; 567 | }, 568 | ); 569 | projectRoot = ""; 570 | targets = ( 571 | 13B07F861A680F5B00A75B9A /* example */, 572 | ); 573 | }; 574 | /* End PBXProject section */ 575 | 576 | /* Begin PBXReferenceProxy section */ 577 | 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { 578 | isa = PBXReferenceProxy; 579 | fileType = archive.ar; 580 | path = libRCTActionSheet.a; 581 | remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; 582 | sourceTree = BUILT_PRODUCTS_DIR; 583 | }; 584 | 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { 585 | isa = PBXReferenceProxy; 586 | fileType = archive.ar; 587 | path = libRCTGeolocation.a; 588 | remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; 589 | sourceTree = BUILT_PRODUCTS_DIR; 590 | }; 591 | 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { 592 | isa = PBXReferenceProxy; 593 | fileType = archive.ar; 594 | path = libRCTImage.a; 595 | remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; 596 | sourceTree = BUILT_PRODUCTS_DIR; 597 | }; 598 | 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { 599 | isa = PBXReferenceProxy; 600 | fileType = archive.ar; 601 | path = libRCTNetwork.a; 602 | remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; 603 | sourceTree = BUILT_PRODUCTS_DIR; 604 | }; 605 | 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { 606 | isa = PBXReferenceProxy; 607 | fileType = archive.ar; 608 | path = libRCTVibration.a; 609 | remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; 610 | sourceTree = BUILT_PRODUCTS_DIR; 611 | }; 612 | 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { 613 | isa = PBXReferenceProxy; 614 | fileType = archive.ar; 615 | path = libRCTSettings.a; 616 | remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; 617 | sourceTree = BUILT_PRODUCTS_DIR; 618 | }; 619 | 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { 620 | isa = PBXReferenceProxy; 621 | fileType = archive.ar; 622 | path = libRCTWebSocket.a; 623 | remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; 624 | sourceTree = BUILT_PRODUCTS_DIR; 625 | }; 626 | 146834041AC3E56700842450 /* libReact.a */ = { 627 | isa = PBXReferenceProxy; 628 | fileType = archive.ar; 629 | path = libReact.a; 630 | remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; 631 | sourceTree = BUILT_PRODUCTS_DIR; 632 | }; 633 | 264AD5C92046CF5000B48D9B /* libfishhook.a */ = { 634 | isa = PBXReferenceProxy; 635 | fileType = archive.ar; 636 | path = libfishhook.a; 637 | remoteRef = 264AD5C82046CF5000B48D9B /* PBXContainerItemProxy */; 638 | sourceTree = BUILT_PRODUCTS_DIR; 639 | }; 640 | 264AD5CB2046CF5000B48D9B /* libfishhook-tvOS.a */ = { 641 | isa = PBXReferenceProxy; 642 | fileType = archive.ar; 643 | path = "libfishhook-tvOS.a"; 644 | remoteRef = 264AD5CA2046CF5000B48D9B /* PBXContainerItemProxy */; 645 | sourceTree = BUILT_PRODUCTS_DIR; 646 | }; 647 | 264AD5DB2046CF5000B48D9B /* libthird-party.a */ = { 648 | isa = PBXReferenceProxy; 649 | fileType = archive.ar; 650 | path = "libthird-party.a"; 651 | remoteRef = 264AD5DA2046CF5000B48D9B /* PBXContainerItemProxy */; 652 | sourceTree = BUILT_PRODUCTS_DIR; 653 | }; 654 | 264AD5DD2046CF5000B48D9B /* libthird-party.a */ = { 655 | isa = PBXReferenceProxy; 656 | fileType = archive.ar; 657 | path = "libthird-party.a"; 658 | remoteRef = 264AD5DC2046CF5000B48D9B /* PBXContainerItemProxy */; 659 | sourceTree = BUILT_PRODUCTS_DIR; 660 | }; 661 | 264AD5DF2046CF5000B48D9B /* libdouble-conversion.a */ = { 662 | isa = PBXReferenceProxy; 663 | fileType = archive.ar; 664 | path = "libdouble-conversion.a"; 665 | remoteRef = 264AD5DE2046CF5000B48D9B /* PBXContainerItemProxy */; 666 | sourceTree = BUILT_PRODUCTS_DIR; 667 | }; 668 | 264AD5E12046CF5000B48D9B /* libdouble-conversion.a */ = { 669 | isa = PBXReferenceProxy; 670 | fileType = archive.ar; 671 | path = "libdouble-conversion.a"; 672 | remoteRef = 264AD5E02046CF5000B48D9B /* PBXContainerItemProxy */; 673 | sourceTree = BUILT_PRODUCTS_DIR; 674 | }; 675 | 264AD5E32046CF5000B48D9B /* libprivatedata.a */ = { 676 | isa = PBXReferenceProxy; 677 | fileType = archive.ar; 678 | path = libprivatedata.a; 679 | remoteRef = 264AD5E22046CF5000B48D9B /* PBXContainerItemProxy */; 680 | sourceTree = BUILT_PRODUCTS_DIR; 681 | }; 682 | 264AD5E52046CF5000B48D9B /* libprivatedata-tvOS.a */ = { 683 | isa = PBXReferenceProxy; 684 | fileType = archive.ar; 685 | path = "libprivatedata-tvOS.a"; 686 | remoteRef = 264AD5E42046CF5000B48D9B /* PBXContainerItemProxy */; 687 | sourceTree = BUILT_PRODUCTS_DIR; 688 | }; 689 | 26D291222189FB37009EFA17 /* libjsinspector.a */ = { 690 | isa = PBXReferenceProxy; 691 | fileType = archive.ar; 692 | path = libjsinspector.a; 693 | remoteRef = 26D291212189FB37009EFA17 /* PBXContainerItemProxy */; 694 | sourceTree = BUILT_PRODUCTS_DIR; 695 | }; 696 | 26D291242189FB37009EFA17 /* libjsinspector-tvOS.a */ = { 697 | isa = PBXReferenceProxy; 698 | fileType = archive.ar; 699 | path = "libjsinspector-tvOS.a"; 700 | remoteRef = 26D291232189FB37009EFA17 /* PBXContainerItemProxy */; 701 | sourceTree = BUILT_PRODUCTS_DIR; 702 | }; 703 | 26D291582189FC53009EFA17 /* libCustomSegmentedControl.a */ = { 704 | isa = PBXReferenceProxy; 705 | fileType = archive.ar; 706 | path = libCustomSegmentedControl.a; 707 | remoteRef = 26D291572189FC53009EFA17 /* PBXContainerItemProxy */; 708 | sourceTree = BUILT_PRODUCTS_DIR; 709 | }; 710 | 36A0023A1EAE21D6002D9978 /* libRCTImage-tvOS.a */ = { 711 | isa = PBXReferenceProxy; 712 | fileType = archive.ar; 713 | path = "libRCTImage-tvOS.a"; 714 | remoteRef = 36A002391EAE21D6002D9978 /* PBXContainerItemProxy */; 715 | sourceTree = BUILT_PRODUCTS_DIR; 716 | }; 717 | 36A0023E1EAE21D6002D9978 /* libRCTLinking-tvOS.a */ = { 718 | isa = PBXReferenceProxy; 719 | fileType = archive.ar; 720 | path = "libRCTLinking-tvOS.a"; 721 | remoteRef = 36A0023D1EAE21D6002D9978 /* PBXContainerItemProxy */; 722 | sourceTree = BUILT_PRODUCTS_DIR; 723 | }; 724 | 36A002421EAE21D6002D9978 /* libRCTNetwork-tvOS.a */ = { 725 | isa = PBXReferenceProxy; 726 | fileType = archive.ar; 727 | path = "libRCTNetwork-tvOS.a"; 728 | remoteRef = 36A002411EAE21D6002D9978 /* PBXContainerItemProxy */; 729 | sourceTree = BUILT_PRODUCTS_DIR; 730 | }; 731 | 36A002461EAE21D6002D9978 /* libRCTSettings-tvOS.a */ = { 732 | isa = PBXReferenceProxy; 733 | fileType = archive.ar; 734 | path = "libRCTSettings-tvOS.a"; 735 | remoteRef = 36A002451EAE21D6002D9978 /* PBXContainerItemProxy */; 736 | sourceTree = BUILT_PRODUCTS_DIR; 737 | }; 738 | 36A0024A1EAE21D6002D9978 /* libRCTText-tvOS.a */ = { 739 | isa = PBXReferenceProxy; 740 | fileType = archive.ar; 741 | path = "libRCTText-tvOS.a"; 742 | remoteRef = 36A002491EAE21D6002D9978 /* PBXContainerItemProxy */; 743 | sourceTree = BUILT_PRODUCTS_DIR; 744 | }; 745 | 36A0024F1EAE21D6002D9978 /* libRCTWebSocket-tvOS.a */ = { 746 | isa = PBXReferenceProxy; 747 | fileType = archive.ar; 748 | path = "libRCTWebSocket-tvOS.a"; 749 | remoteRef = 36A0024E1EAE21D6002D9978 /* PBXContainerItemProxy */; 750 | sourceTree = BUILT_PRODUCTS_DIR; 751 | }; 752 | 36A002531EAE21D6002D9978 /* libReact.a */ = { 753 | isa = PBXReferenceProxy; 754 | fileType = archive.ar; 755 | path = libReact.a; 756 | remoteRef = 36A002521EAE21D6002D9978 /* PBXContainerItemProxy */; 757 | sourceTree = BUILT_PRODUCTS_DIR; 758 | }; 759 | 36A0025C1EAE2363002D9978 /* libyoga.a */ = { 760 | isa = PBXReferenceProxy; 761 | fileType = archive.ar; 762 | path = libyoga.a; 763 | remoteRef = 36A0025B1EAE2363002D9978 /* PBXContainerItemProxy */; 764 | sourceTree = BUILT_PRODUCTS_DIR; 765 | }; 766 | 36A0025E1EAE2363002D9978 /* libyoga.a */ = { 767 | isa = PBXReferenceProxy; 768 | fileType = archive.ar; 769 | path = libyoga.a; 770 | remoteRef = 36A0025D1EAE2363002D9978 /* PBXContainerItemProxy */; 771 | sourceTree = BUILT_PRODUCTS_DIR; 772 | }; 773 | 36A002601EAE2363002D9978 /* libcxxreact.a */ = { 774 | isa = PBXReferenceProxy; 775 | fileType = archive.ar; 776 | path = libcxxreact.a; 777 | remoteRef = 36A0025F1EAE2363002D9978 /* PBXContainerItemProxy */; 778 | sourceTree = BUILT_PRODUCTS_DIR; 779 | }; 780 | 36A002621EAE2363002D9978 /* libcxxreact.a */ = { 781 | isa = PBXReferenceProxy; 782 | fileType = archive.ar; 783 | path = libcxxreact.a; 784 | remoteRef = 36A002611EAE2363002D9978 /* PBXContainerItemProxy */; 785 | sourceTree = BUILT_PRODUCTS_DIR; 786 | }; 787 | 36A002641EAE2363002D9978 /* libjschelpers.a */ = { 788 | isa = PBXReferenceProxy; 789 | fileType = archive.ar; 790 | path = libjschelpers.a; 791 | remoteRef = 36A002631EAE2363002D9978 /* PBXContainerItemProxy */; 792 | sourceTree = BUILT_PRODUCTS_DIR; 793 | }; 794 | 36A002661EAE2363002D9978 /* libjschelpers.a */ = { 795 | isa = PBXReferenceProxy; 796 | fileType = archive.ar; 797 | path = libjschelpers.a; 798 | remoteRef = 36A002651EAE2363002D9978 /* PBXContainerItemProxy */; 799 | sourceTree = BUILT_PRODUCTS_DIR; 800 | }; 801 | 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { 802 | isa = PBXReferenceProxy; 803 | fileType = archive.ar; 804 | path = libRCTLinking.a; 805 | remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; 806 | sourceTree = BUILT_PRODUCTS_DIR; 807 | }; 808 | 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { 809 | isa = PBXReferenceProxy; 810 | fileType = archive.ar; 811 | path = libRCTText.a; 812 | remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; 813 | sourceTree = BUILT_PRODUCTS_DIR; 814 | }; 815 | /* End PBXReferenceProxy section */ 816 | 817 | /* Begin PBXResourcesBuildPhase section */ 818 | 13B07F8E1A680F5B00A75B9A /* Resources */ = { 819 | isa = PBXResourcesBuildPhase; 820 | buildActionMask = 2147483647; 821 | files = ( 822 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 823 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, 824 | ); 825 | runOnlyForDeploymentPostprocessing = 0; 826 | }; 827 | /* End PBXResourcesBuildPhase section */ 828 | 829 | /* Begin PBXShellScriptBuildPhase section */ 830 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { 831 | isa = PBXShellScriptBuildPhase; 832 | buildActionMask = 2147483647; 833 | files = ( 834 | ); 835 | inputPaths = ( 836 | ); 837 | name = "Bundle React Native code and images"; 838 | outputPaths = ( 839 | ); 840 | runOnlyForDeploymentPostprocessing = 0; 841 | shellPath = /bin/sh; 842 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; 843 | }; 844 | /* End PBXShellScriptBuildPhase section */ 845 | 846 | /* Begin PBXSourcesBuildPhase section */ 847 | 13B07F871A680F5B00A75B9A /* Sources */ = { 848 | isa = PBXSourcesBuildPhase; 849 | buildActionMask = 2147483647; 850 | files = ( 851 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, 852 | 13B07FC11A68108700A75B9A /* main.m in Sources */, 853 | ); 854 | runOnlyForDeploymentPostprocessing = 0; 855 | }; 856 | /* End PBXSourcesBuildPhase section */ 857 | 858 | /* Begin PBXVariantGroup section */ 859 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { 860 | isa = PBXVariantGroup; 861 | children = ( 862 | 13B07FB21A68108700A75B9A /* Base */, 863 | ); 864 | name = LaunchScreen.xib; 865 | path = example; 866 | sourceTree = ""; 867 | }; 868 | /* End PBXVariantGroup section */ 869 | 870 | /* Begin XCBuildConfiguration section */ 871 | 13B07F941A680F5B00A75B9A /* Debug */ = { 872 | isa = XCBuildConfiguration; 873 | buildSettings = { 874 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 875 | CURRENT_PROJECT_VERSION = 1; 876 | DEAD_CODE_STRIPPING = NO; 877 | HEADER_SEARCH_PATHS = ( 878 | "$(inherited)", 879 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 880 | "$(SRCROOT)/../node_modules/react-native/React/**", 881 | ); 882 | INFOPLIST_FILE = example/Info.plist; 883 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 884 | OTHER_LDFLAGS = ( 885 | "$(inherited)", 886 | "-ObjC", 887 | "-lc++", 888 | ); 889 | PRODUCT_NAME = example; 890 | VERSIONING_SYSTEM = "apple-generic"; 891 | }; 892 | name = Debug; 893 | }; 894 | 13B07F951A680F5B00A75B9A /* Release */ = { 895 | isa = XCBuildConfiguration; 896 | buildSettings = { 897 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 898 | CURRENT_PROJECT_VERSION = 1; 899 | HEADER_SEARCH_PATHS = ( 900 | "$(inherited)", 901 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 902 | "$(SRCROOT)/../node_modules/react-native/React/**", 903 | ); 904 | INFOPLIST_FILE = example/Info.plist; 905 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 906 | OTHER_LDFLAGS = ( 907 | "$(inherited)", 908 | "-ObjC", 909 | "-lc++", 910 | ); 911 | PRODUCT_NAME = example; 912 | VERSIONING_SYSTEM = "apple-generic"; 913 | }; 914 | name = Release; 915 | }; 916 | 83CBBA201A601CBA00E9B192 /* Debug */ = { 917 | isa = XCBuildConfiguration; 918 | buildSettings = { 919 | ALWAYS_SEARCH_USER_PATHS = NO; 920 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 921 | CLANG_CXX_LIBRARY = "libc++"; 922 | CLANG_ENABLE_MODULES = YES; 923 | CLANG_ENABLE_OBJC_ARC = YES; 924 | CLANG_WARN_BOOL_CONVERSION = YES; 925 | CLANG_WARN_CONSTANT_CONVERSION = YES; 926 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 927 | CLANG_WARN_EMPTY_BODY = YES; 928 | CLANG_WARN_ENUM_CONVERSION = YES; 929 | CLANG_WARN_INT_CONVERSION = YES; 930 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 931 | CLANG_WARN_UNREACHABLE_CODE = YES; 932 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 933 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 934 | COPY_PHASE_STRIP = NO; 935 | ENABLE_STRICT_OBJC_MSGSEND = YES; 936 | GCC_C_LANGUAGE_STANDARD = gnu99; 937 | GCC_DYNAMIC_NO_PIC = NO; 938 | GCC_OPTIMIZATION_LEVEL = 0; 939 | GCC_PREPROCESSOR_DEFINITIONS = ( 940 | "DEBUG=1", 941 | "$(inherited)", 942 | ); 943 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 944 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 945 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 946 | GCC_WARN_UNDECLARED_SELECTOR = YES; 947 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 948 | GCC_WARN_UNUSED_FUNCTION = YES; 949 | GCC_WARN_UNUSED_VARIABLE = YES; 950 | HEADER_SEARCH_PATHS = ( 951 | "$(inherited)", 952 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 953 | ); 954 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 955 | MTL_ENABLE_DEBUG_INFO = YES; 956 | ONLY_ACTIVE_ARCH = YES; 957 | SDKROOT = iphoneos; 958 | }; 959 | name = Debug; 960 | }; 961 | 83CBBA211A601CBA00E9B192 /* Release */ = { 962 | isa = XCBuildConfiguration; 963 | buildSettings = { 964 | ALWAYS_SEARCH_USER_PATHS = NO; 965 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 966 | CLANG_CXX_LIBRARY = "libc++"; 967 | CLANG_ENABLE_MODULES = YES; 968 | CLANG_ENABLE_OBJC_ARC = YES; 969 | CLANG_WARN_BOOL_CONVERSION = YES; 970 | CLANG_WARN_CONSTANT_CONVERSION = YES; 971 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 972 | CLANG_WARN_EMPTY_BODY = YES; 973 | CLANG_WARN_ENUM_CONVERSION = YES; 974 | CLANG_WARN_INT_CONVERSION = YES; 975 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 976 | CLANG_WARN_UNREACHABLE_CODE = YES; 977 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 978 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 979 | COPY_PHASE_STRIP = YES; 980 | ENABLE_NS_ASSERTIONS = NO; 981 | ENABLE_STRICT_OBJC_MSGSEND = YES; 982 | GCC_C_LANGUAGE_STANDARD = gnu99; 983 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 984 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 985 | GCC_WARN_UNDECLARED_SELECTOR = YES; 986 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 987 | GCC_WARN_UNUSED_FUNCTION = YES; 988 | GCC_WARN_UNUSED_VARIABLE = YES; 989 | HEADER_SEARCH_PATHS = ( 990 | "$(inherited)", 991 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, 992 | ); 993 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 994 | MTL_ENABLE_DEBUG_INFO = NO; 995 | SDKROOT = iphoneos; 996 | VALIDATE_PRODUCT = YES; 997 | }; 998 | name = Release; 999 | }; 1000 | /* End XCBuildConfiguration section */ 1001 | 1002 | /* Begin XCConfigurationList section */ 1003 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "example" */ = { 1004 | isa = XCConfigurationList; 1005 | buildConfigurations = ( 1006 | 13B07F941A680F5B00A75B9A /* Debug */, 1007 | 13B07F951A680F5B00A75B9A /* Release */, 1008 | ); 1009 | defaultConfigurationIsVisible = 0; 1010 | defaultConfigurationName = Release; 1011 | }; 1012 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "example" */ = { 1013 | isa = XCConfigurationList; 1014 | buildConfigurations = ( 1015 | 83CBBA201A601CBA00E9B192 /* Debug */, 1016 | 83CBBA211A601CBA00E9B192 /* Release */, 1017 | ); 1018 | defaultConfigurationIsVisible = 0; 1019 | defaultConfigurationName = Release; 1020 | }; 1021 | /* End XCConfigurationList section */ 1022 | }; 1023 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; 1024 | } 1025 | -------------------------------------------------------------------------------- /ios/example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/example.xcodeproj/xcshareddata/xcschemes/example.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/example/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/example/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 "RCTBundleURLProvider.h" 13 | #import "RCTRootView.h" 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"example" 25 | initialProperties:nil 26 | launchOptions:launchOptions]; 27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 28 | 29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 30 | UIViewController *rootViewController = [UIViewController new]; 31 | rootViewController.view = rootView; 32 | self.window.rootViewController = rootViewController; 33 | [self.window makeKeyAndVisible]; 34 | return YES; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ios/example/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /ios/example/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ios/example/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 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /ios/example/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/lib/CustomSegmentedControl.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 26751C3B1CE8C72E0006725F /* CustomSegmentedControlManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 26751C3A1CE8C72E0006725F /* CustomSegmentedControlManager.m */; }; 11 | /* End PBXBuildFile section */ 12 | 13 | /* Begin PBXCopyFilesBuildPhase section */ 14 | 26751C081CE8BD5C0006725F /* CopyFiles */ = { 15 | isa = PBXCopyFilesBuildPhase; 16 | buildActionMask = 2147483647; 17 | dstPath = "include/$(PRODUCT_NAME)"; 18 | dstSubfolderSpec = 16; 19 | files = ( 20 | ); 21 | runOnlyForDeploymentPostprocessing = 0; 22 | }; 23 | /* End PBXCopyFilesBuildPhase section */ 24 | 25 | /* Begin PBXFileReference section */ 26 | 26751C0A1CE8BD5C0006725F /* libCustomSegmentedControl.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCustomSegmentedControl.a; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | 26751C391CE8C72E0006725F /* CustomSegmentedControlManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomSegmentedControlManager.h; sourceTree = ""; }; 28 | 26751C3A1CE8C72E0006725F /* CustomSegmentedControlManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomSegmentedControlManager.m; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 26751C071CE8BD5C0006725F /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | 26751C011CE8BD5C0006725F = { 43 | isa = PBXGroup; 44 | children = ( 45 | 26751C0C1CE8BD5C0006725F /* CustomSegmentedControl */, 46 | 26751C0B1CE8BD5C0006725F /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | 26751C0B1CE8BD5C0006725F /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 26751C0A1CE8BD5C0006725F /* libCustomSegmentedControl.a */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | 26751C0C1CE8BD5C0006725F /* CustomSegmentedControl */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 26751C391CE8C72E0006725F /* CustomSegmentedControlManager.h */, 62 | 26751C3A1CE8C72E0006725F /* CustomSegmentedControlManager.m */, 63 | ); 64 | path = CustomSegmentedControl; 65 | sourceTree = ""; 66 | }; 67 | /* End PBXGroup section */ 68 | 69 | /* Begin PBXNativeTarget section */ 70 | 26751C091CE8BD5C0006725F /* CustomSegmentedControl */ = { 71 | isa = PBXNativeTarget; 72 | buildConfigurationList = 26751C131CE8BD5C0006725F /* Build configuration list for PBXNativeTarget "CustomSegmentedControl" */; 73 | buildPhases = ( 74 | 26751C061CE8BD5C0006725F /* Sources */, 75 | 26751C071CE8BD5C0006725F /* Frameworks */, 76 | 26751C081CE8BD5C0006725F /* CopyFiles */, 77 | ); 78 | buildRules = ( 79 | ); 80 | dependencies = ( 81 | ); 82 | name = CustomSegmentedControl; 83 | productName = CustomSegmentedControl; 84 | productReference = 26751C0A1CE8BD5C0006725F /* libCustomSegmentedControl.a */; 85 | productType = "com.apple.product-type.library.static"; 86 | }; 87 | /* End PBXNativeTarget section */ 88 | 89 | /* Begin PBXProject section */ 90 | 26751C021CE8BD5C0006725F /* Project object */ = { 91 | isa = PBXProject; 92 | attributes = { 93 | LastUpgradeCheck = 0730; 94 | ORGANIZATIONNAME = Wix; 95 | TargetAttributes = { 96 | 26751C091CE8BD5C0006725F = { 97 | CreatedOnToolsVersion = 7.3; 98 | }; 99 | }; 100 | }; 101 | buildConfigurationList = 26751C051CE8BD5C0006725F /* Build configuration list for PBXProject "CustomSegmentedControl" */; 102 | compatibilityVersion = "Xcode 3.2"; 103 | developmentRegion = English; 104 | hasScannedForEncodings = 0; 105 | knownRegions = ( 106 | en, 107 | ); 108 | mainGroup = 26751C011CE8BD5C0006725F; 109 | productRefGroup = 26751C0B1CE8BD5C0006725F /* Products */; 110 | projectDirPath = ""; 111 | projectRoot = ""; 112 | targets = ( 113 | 26751C091CE8BD5C0006725F /* CustomSegmentedControl */, 114 | ); 115 | }; 116 | /* End PBXProject section */ 117 | 118 | /* Begin PBXSourcesBuildPhase section */ 119 | 26751C061CE8BD5C0006725F /* Sources */ = { 120 | isa = PBXSourcesBuildPhase; 121 | buildActionMask = 2147483647; 122 | files = ( 123 | 26751C3B1CE8C72E0006725F /* CustomSegmentedControlManager.m in Sources */, 124 | ); 125 | runOnlyForDeploymentPostprocessing = 0; 126 | }; 127 | /* End PBXSourcesBuildPhase section */ 128 | 129 | /* Begin XCBuildConfiguration section */ 130 | 26751C111CE8BD5C0006725F /* Debug */ = { 131 | isa = XCBuildConfiguration; 132 | buildSettings = { 133 | ALWAYS_SEARCH_USER_PATHS = NO; 134 | CLANG_ANALYZER_NONNULL = YES; 135 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 136 | CLANG_CXX_LIBRARY = "libc++"; 137 | CLANG_ENABLE_MODULES = YES; 138 | CLANG_ENABLE_OBJC_ARC = YES; 139 | CLANG_WARN_BOOL_CONVERSION = YES; 140 | CLANG_WARN_CONSTANT_CONVERSION = YES; 141 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 142 | CLANG_WARN_EMPTY_BODY = YES; 143 | CLANG_WARN_ENUM_CONVERSION = YES; 144 | CLANG_WARN_INT_CONVERSION = YES; 145 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 146 | CLANG_WARN_UNREACHABLE_CODE = YES; 147 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 148 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 149 | COPY_PHASE_STRIP = NO; 150 | DEBUG_INFORMATION_FORMAT = dwarf; 151 | ENABLE_STRICT_OBJC_MSGSEND = YES; 152 | ENABLE_TESTABILITY = YES; 153 | GCC_C_LANGUAGE_STANDARD = gnu99; 154 | GCC_DYNAMIC_NO_PIC = NO; 155 | GCC_NO_COMMON_BLOCKS = YES; 156 | GCC_OPTIMIZATION_LEVEL = 0; 157 | GCC_PREPROCESSOR_DEFINITIONS = ( 158 | "DEBUG=1", 159 | "$(inherited)", 160 | ); 161 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 162 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 163 | GCC_WARN_UNDECLARED_SELECTOR = YES; 164 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 165 | GCC_WARN_UNUSED_FUNCTION = YES; 166 | GCC_WARN_UNUSED_VARIABLE = YES; 167 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 168 | MTL_ENABLE_DEBUG_INFO = YES; 169 | ONLY_ACTIVE_ARCH = YES; 170 | SDKROOT = iphoneos; 171 | }; 172 | name = Debug; 173 | }; 174 | 26751C121CE8BD5C0006725F /* Release */ = { 175 | isa = XCBuildConfiguration; 176 | buildSettings = { 177 | ALWAYS_SEARCH_USER_PATHS = NO; 178 | CLANG_ANALYZER_NONNULL = YES; 179 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 180 | CLANG_CXX_LIBRARY = "libc++"; 181 | CLANG_ENABLE_MODULES = YES; 182 | CLANG_ENABLE_OBJC_ARC = YES; 183 | CLANG_WARN_BOOL_CONVERSION = YES; 184 | CLANG_WARN_CONSTANT_CONVERSION = YES; 185 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 186 | CLANG_WARN_EMPTY_BODY = YES; 187 | CLANG_WARN_ENUM_CONVERSION = YES; 188 | CLANG_WARN_INT_CONVERSION = YES; 189 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 190 | CLANG_WARN_UNREACHABLE_CODE = YES; 191 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 192 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 193 | COPY_PHASE_STRIP = NO; 194 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 195 | ENABLE_NS_ASSERTIONS = NO; 196 | ENABLE_STRICT_OBJC_MSGSEND = YES; 197 | GCC_C_LANGUAGE_STANDARD = gnu99; 198 | GCC_NO_COMMON_BLOCKS = YES; 199 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 200 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 201 | GCC_WARN_UNDECLARED_SELECTOR = YES; 202 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 203 | GCC_WARN_UNUSED_FUNCTION = YES; 204 | GCC_WARN_UNUSED_VARIABLE = YES; 205 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 206 | MTL_ENABLE_DEBUG_INFO = NO; 207 | SDKROOT = iphoneos; 208 | VALIDATE_PRODUCT = YES; 209 | }; 210 | name = Release; 211 | }; 212 | 26751C141CE8BD5C0006725F /* Debug */ = { 213 | isa = XCBuildConfiguration; 214 | buildSettings = { 215 | HEADER_SEARCH_PATHS = ( 216 | "$(SRCROOT)/../../../react-native/React/**", 217 | "$(inherited)", 218 | ); 219 | OTHER_LDFLAGS = "-ObjC"; 220 | PRODUCT_NAME = "$(TARGET_NAME)"; 221 | SKIP_INSTALL = YES; 222 | }; 223 | name = Debug; 224 | }; 225 | 26751C151CE8BD5C0006725F /* Release */ = { 226 | isa = XCBuildConfiguration; 227 | buildSettings = { 228 | HEADER_SEARCH_PATHS = ( 229 | "$(SRCROOT)/../../../react-native/React/**", 230 | "$(inherited)", 231 | ); 232 | OTHER_LDFLAGS = "-ObjC"; 233 | PRODUCT_NAME = "$(TARGET_NAME)"; 234 | SKIP_INSTALL = YES; 235 | }; 236 | name = Release; 237 | }; 238 | /* End XCBuildConfiguration section */ 239 | 240 | /* Begin XCConfigurationList section */ 241 | 26751C051CE8BD5C0006725F /* Build configuration list for PBXProject "CustomSegmentedControl" */ = { 242 | isa = XCConfigurationList; 243 | buildConfigurations = ( 244 | 26751C111CE8BD5C0006725F /* Debug */, 245 | 26751C121CE8BD5C0006725F /* Release */, 246 | ); 247 | defaultConfigurationIsVisible = 0; 248 | defaultConfigurationName = Release; 249 | }; 250 | 26751C131CE8BD5C0006725F /* Build configuration list for PBXNativeTarget "CustomSegmentedControl" */ = { 251 | isa = XCConfigurationList; 252 | buildConfigurations = ( 253 | 26751C141CE8BD5C0006725F /* Debug */, 254 | 26751C151CE8BD5C0006725F /* Release */, 255 | ); 256 | defaultConfigurationIsVisible = 0; 257 | defaultConfigurationName = Release; 258 | }; 259 | /* End XCConfigurationList section */ 260 | }; 261 | rootObject = 26751C021CE8BD5C0006725F /* Project object */; 262 | } 263 | -------------------------------------------------------------------------------- /ios/lib/CustomSegmentedControl.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | -------------------------------------------------------------------------------- /ios/lib/CustomSegmentedControl/CustomSegmentedControlManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // CustomSegmentedControlManager.h 3 | // CustomSegmentedControl 4 | // 5 | // Created by Ran Greenberg on 15/05/2016. 6 | // Copyright © 2016 Wix. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #if __has_include() 12 | #import 13 | #import 14 | #else 15 | #import "RCTViewManager.h" 16 | #import "RCTConvert.h" 17 | #endif 18 | 19 | 20 | 21 | typedef NS_ENUM(NSInteger, CustomSegmentedSelectedLineAlign) { 22 | CustomSegmentedSelectedLineAlignTop, 23 | CustomSegmentedSelectedLineAlignBottom, 24 | CustomSegmentedSelectedLineAlignText 25 | }; 26 | 27 | typedef NS_ENUM(NSInteger, CustomSegmentedSelectedLineMode) { 28 | CustomSegmentedSelectedLineModeFull, 29 | CustomSegmentedSelectedLineModeText 30 | }; 31 | 32 | typedef NS_ENUM(NSInteger, CustomSegmentedSelectedAnimationType) { 33 | CustomSegmentedSelectedAnimationTypeDefault, 34 | CustomSegmentedSelectedAnimationTypeMiddleLine, 35 | CustomSegmentedSelectedAnimationTypeCloseAndAndOpen, 36 | CustomSegmentedSelectedRelativeOpen 37 | }; 38 | 39 | @interface RCTConvert(CustomSegmentedSelectedLineAlign) 40 | 41 | + (CustomSegmentedSelectedLineAlign)CustomSegmentedSelectedLineAlign:(id)json; 42 | 43 | @end 44 | 45 | @interface RCTConvert(CustomSegmentedSelectedLineMode) 46 | 47 | + (CustomSegmentedSelectedLineMode)CustomSegmentedSelectedLineMode:(id)json; 48 | 49 | @end 50 | 51 | @interface RCTConvert(CustomSegmentedSelectedAnimationType) 52 | 53 | + (CustomSegmentedSelectedAnimationType)CustomSegmentedSelectedAnimationType:(id)json; 54 | 55 | @end 56 | 57 | @interface CustomSegmentedControlManager : RCTViewManager 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /ios/lib/CustomSegmentedControl/CustomSegmentedControlManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // CustomSegmentedControlManager.m 3 | // CustomSegmentedControl 4 | // 5 | // Created by Ran Greenberg on 15/05/2016. 6 | // Copyright © 2016 Wix. All rights reserved. 7 | // 8 | 9 | #import "CustomSegmentedControlManager.h" 10 | #if __has_include() 11 | #import 12 | #else 13 | #import "UIView+React.h" 14 | #endif 15 | 16 | #define LINE_SELECTED_MARGIN_TOP 2 17 | 18 | #define DEFAULT_SELECTED_LINE_PADDING_WIDTH 4 19 | #define DEFAULT_SELECTED_LINE_HEIGHT 2 20 | #define DEFAULT_ANIMATION_DURATION 0.2 21 | #define DEFAULT_ANIMATION_DAMPING 0 22 | #define DEFAULT_ANIMATION_DAMPING_INITIAL_VELOCITY 0 23 | #define DEFAULT_FONT_SIZE 14 24 | #define DEFAULT_LINE_COLOR [UIColor blackColor] 25 | #define DEFAULT_SEGMENTED_HIGHLIGHT_COLOR [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5] 26 | 27 | #define DEFAULT_SYSTEM_FONT @"system-font" 28 | #define DEFAULT_SYSTEM_FONT_BOLD @"system-font-bold" 29 | 30 | #define STYLE_SELECTED_LINE_HEIGHT @"selectedLineHeight" 31 | #define STYLE_SELETCED_LINE_PADDING_WIDTH @"selectedLinePaddingWidth" 32 | #define STYLE_FONT_SIZE @"fontSize" 33 | #define STYLE_SEGMENT_BACKGROUND_COLOR @"segmentBackgroundColor" 34 | #define STYLE_SEGMENT_TEXT_COLOR @"segmentTextColor" 35 | #define STYLE_SEGMENT_HIGHLIGHT_TEXT_COLOR @"segmentHighlightTextColor" 36 | #define STYLE_SELECTED_TEXT_COLOR @"selectedTextColor" 37 | #define STYLE_SEGMENT_FONT_FAMILY @"segmentFontFamily" 38 | #define STYLE_SELECTED_LINE_COLOR @"selectedLineColor" 39 | #define STYLE_SELECTED_LINE_ALIGN @"alignSelectedLine" 40 | #define STYLE_SELECTED_LINE_MODE @"selectedLineMode" 41 | #define STYLE_SELECTED_LINE_ALIGN @"selectedLineAlign" 42 | 43 | #define ANIMATION_DAMPING @"damping" 44 | #define ANIMATION_DURATION @"duration" 45 | #define ANIMATION_TYPE @"animationType" 46 | #define ANIMATION_DAMPING_INITIAL_VELOCITY @"dampingInitialVelocity" 47 | 48 | @implementation RCTConvert(CustomSegmentedSelectedLineAlign) 49 | 50 | RCT_ENUM_CONVERTER(CustomSegmentedSelectedLineAlign, (@{ 51 | @"top": @(CustomSegmentedSelectedLineAlignTop), 52 | @"bottom": @(CustomSegmentedSelectedLineAlignBottom), 53 | @"text": @(CustomSegmentedSelectedLineAlignText) 54 | }), CustomSegmentedSelectedLineAlignText, integerValue) 55 | 56 | @end 57 | 58 | @implementation RCTConvert(CustomSegmentedSelectedLineMode) 59 | 60 | RCT_ENUM_CONVERTER(CustomSegmentedSelectedLineMode, (@{ 61 | @"text": @(CustomSegmentedSelectedLineModeText), 62 | @"full": @(CustomSegmentedSelectedLineModeFull) 63 | }), CustomSegmentedSelectedLineModeText, integerValue) 64 | 65 | @end 66 | 67 | @implementation RCTConvert(CustomSegmentedSelectedAnimationType) 68 | 69 | RCT_ENUM_CONVERTER(CustomSegmentedSelectedAnimationType, (@{ 70 | @"default": @(CustomSegmentedSelectedAnimationTypeDefault), 71 | @"middle-line": @(CustomSegmentedSelectedAnimationTypeMiddleLine), 72 | @"close-and-open": @(CustomSegmentedSelectedAnimationTypeCloseAndAndOpen), 73 | @"relative-open": @(CustomSegmentedSelectedRelativeOpen) 74 | }), CustomSegmentedSelectedAnimationTypeDefault, integerValue) 75 | 76 | @end 77 | 78 | 79 | 80 | @interface CustomSegmentedControl : UIView 81 | 82 | @property (nonatomic, strong) NSMutableArray *buttons; 83 | @property (nonatomic, strong) NSMutableArray *lines; 84 | 85 | // props 86 | @property (nonatomic, strong) NSArray *segmentedStrings; 87 | @property (nonatomic) NSInteger selectedItem; 88 | @property (nonatomic, strong) NSDictionary *segmentedStyle; 89 | @property (nonatomic, strong) NSDictionary *animation; 90 | 91 | // style props 92 | @property (nonatomic) CGFloat lineSelectedHeight; 93 | @property (nonatomic) CGFloat segmentedFontSize; 94 | @property (nonatomic) CGFloat selectedLinePaddingWidth; 95 | @property (nonatomic, strong) UIColor *segmentBackgroundColor; 96 | @property (nonatomic, strong) UIColor *segmentTextColor; 97 | @property (nonatomic, strong) UIColor *segmentHighlightTextColor; 98 | @property (nonatomic, strong) NSString *segmentFontFamilyName; 99 | @property (nonatomic, strong) UIColor *lineColor; 100 | @property (nonatomic, strong) UIColor *selectedTextColor; 101 | @property (nonatomic) CustomSegmentedSelectedLineAlign selectedLineAlign; 102 | @property (nonatomic) CustomSegmentedSelectedLineMode selectedLineMode; 103 | @property (nonatomic) CustomSegmentedSelectedAnimationType customAnimationType; 104 | 105 | // animation props 106 | @property (nonatomic) CGFloat animationDuration; 107 | @property (nonatomic) CGFloat animationDamping; 108 | @property (nonatomic) CGFloat initialDampingVelocity; 109 | 110 | // callbacks props 111 | @property (nonatomic, copy) RCTDirectEventBlock selectedWillChange; 112 | @property (nonatomic, copy) RCTDirectEventBlock selectedDidChange; 113 | 114 | @end 115 | 116 | 117 | @implementation CustomSegmentedControl 118 | 119 | -(void)setSegmentedStyle:(NSDictionary *)segmentedStyle { 120 | _segmentedStyle = segmentedStyle; 121 | 122 | // STYLE_LINE_SELECTED_HEIGHT 123 | id lineSelectedHeight = self.segmentedStyle[STYLE_SELECTED_LINE_HEIGHT]; 124 | if (lineSelectedHeight) { 125 | self.lineSelectedHeight = [RCTConvert CGFloat:lineSelectedHeight]; 126 | } 127 | 128 | // STYLE_LINE_SELECTED_HEIGHT 129 | id fontSize = self.segmentedStyle[STYLE_FONT_SIZE]; 130 | if (fontSize) { 131 | self.segmentedFontSize = [RCTConvert CGFloat:fontSize]; 132 | } 133 | 134 | // STYLE_SELETCED_LINE_PADDING_WIDTH 135 | id selectedLinePaddingWidth = self.segmentedStyle[STYLE_SELETCED_LINE_PADDING_WIDTH]; 136 | if (selectedLinePaddingWidth) { 137 | self.selectedLinePaddingWidth = [RCTConvert CGFloat:selectedLinePaddingWidth]; 138 | } 139 | 140 | // STYLE_LINE_SELECTED_HEIGHT 141 | id segmentBackgroundColor = self.segmentedStyle[STYLE_SEGMENT_BACKGROUND_COLOR]; 142 | if (segmentBackgroundColor) { 143 | self.segmentBackgroundColor = [RCTConvert UIColor:segmentBackgroundColor]; 144 | } 145 | 146 | // STYLE_SEGMENT_TEXT_COLOR 147 | id segmentTextColor = self.segmentedStyle[STYLE_SEGMENT_TEXT_COLOR]; 148 | if (segmentTextColor) { 149 | self.segmentTextColor = [RCTConvert UIColor:segmentTextColor]; 150 | } 151 | 152 | // STYLE_SEGMENT_HIGHLIGHT_TEXT_COLOR 153 | id segmentHighlightTextColor = self.segmentedStyle[STYLE_SEGMENT_HIGHLIGHT_TEXT_COLOR]; 154 | if (segmentHighlightTextColor) { 155 | self.segmentHighlightTextColor = [RCTConvert UIColor:segmentHighlightTextColor]; 156 | } 157 | 158 | // STYLE_SEGMENT_FONT_FAMILY 159 | id segmentFontFamily = self.segmentedStyle[STYLE_SEGMENT_FONT_FAMILY]; 160 | if (segmentFontFamily) { 161 | self.segmentFontFamilyName = segmentFontFamily; 162 | } 163 | 164 | // STYLE_LINE_COLOR 165 | id lineColor = self.segmentedStyle[STYLE_SELECTED_LINE_COLOR]; 166 | if (lineColor) { 167 | self.lineColor = [RCTConvert UIColor:lineColor]; 168 | } 169 | 170 | // STYLE_LINE_COLOR 171 | id seletcedTextColor = self.segmentedStyle[STYLE_SELECTED_TEXT_COLOR]; 172 | if (seletcedTextColor) { 173 | self.selectedTextColor = [RCTConvert UIColor:seletcedTextColor]; 174 | } 175 | 176 | // STYLE_LINE_STICK_TO_BOTTOM 177 | id selectedLineAlign = self.segmentedStyle[STYLE_SELECTED_LINE_ALIGN]; 178 | if (selectedLineAlign) { 179 | self.selectedLineAlign = [RCTConvert CustomSegmentedSelectedLineAlign:selectedLineAlign]; 180 | } 181 | 182 | // STYLE_LINE_STICK_TO_BOTTOM 183 | id selectedLineMode = self.segmentedStyle[STYLE_SELECTED_LINE_MODE]; 184 | if (selectedLineMode) { 185 | self.selectedLineMode = [RCTConvert CustomSegmentedSelectedLineMode:selectedLineMode]; 186 | } 187 | } 188 | 189 | 190 | -(void)setAnimation:(NSDictionary *)animation { 191 | _animation = animation; 192 | 193 | // ANIMATION_DURATION 194 | id animationDuration = self.animation[ANIMATION_DURATION]; 195 | if (animationDuration) { 196 | self.animationDuration = [RCTConvert CGFloat:animationDuration]; 197 | } 198 | 199 | // ANIMATION_DAMPING 200 | id animationDamping = self.animation[ANIMATION_DAMPING]; 201 | if (animationDamping) { 202 | self.animationDamping = [RCTConvert CGFloat:animationDamping]; 203 | } 204 | 205 | // ANIMATION_TYPE 206 | id animationType = self.animation[ANIMATION_TYPE]; 207 | if (animationType) { 208 | self.customAnimationType = [RCTConvert CustomSegmentedSelectedAnimationType:animationType]; 209 | } 210 | 211 | // ANIMATION_DAMPING_INITIAL_VELOCITY 212 | id animationInitialDampingVelocity = self.animation[ANIMATION_DAMPING_INITIAL_VELOCITY]; 213 | if (animationInitialDampingVelocity) { 214 | self.initialDampingVelocity = [RCTConvert CGFloat:animationInitialDampingVelocity]; 215 | } 216 | } 217 | 218 | 219 | - (instancetype)initWithFrame:(CGRect)frame { 220 | self = [super initWithFrame:frame]; 221 | 222 | if (self){ 223 | self.animationDuration = DEFAULT_ANIMATION_DURATION; 224 | self.animationDamping = DEFAULT_ANIMATION_DAMPING; 225 | self.lineSelectedHeight = DEFAULT_SELECTED_LINE_HEIGHT; 226 | self.segmentedFontSize = DEFAULT_FONT_SIZE; 227 | self.lineColor = DEFAULT_LINE_COLOR; 228 | self.selectedTextColor = DEFAULT_LINE_COLOR; 229 | self.segmentHighlightTextColor = DEFAULT_SEGMENTED_HIGHLIGHT_COLOR; 230 | self.selectedLinePaddingWidth = DEFAULT_SELECTED_LINE_PADDING_WIDTH; 231 | self.selectedLineAlign = CustomSegmentedSelectedLineAlignText; 232 | self.selectedLineMode = CustomSegmentedSelectedLineModeText; 233 | self.customAnimationType = CustomSegmentedSelectedAnimationTypeDefault; 234 | 235 | self.buttons = [[NSMutableArray alloc] init]; 236 | self.lines = [[NSMutableArray alloc] init]; 237 | } 238 | 239 | return self; 240 | } 241 | 242 | 243 | -(UIFont*)buttonTitleFont { 244 | UIFont *btnFont = [UIFont systemFontOfSize:self.segmentedFontSize]; 245 | if (self.segmentFontFamilyName) { 246 | if ([self.segmentFontFamilyName isEqualToString:DEFAULT_SYSTEM_FONT_BOLD]) { 247 | return [UIFont boldSystemFontOfSize:self.segmentedFontSize]; 248 | } 249 | 250 | UIFont *tmpFont = [UIFont fontWithName:self.segmentFontFamilyName size:self.segmentedFontSize]; 251 | btnFont = (tmpFont) ? tmpFont : btnFont; 252 | } 253 | return btnFont; 254 | } 255 | 256 | 257 | -(void)reactSetFrame:(CGRect)frame { 258 | [super reactSetFrame:frame]; 259 | 260 | if (self.segmentedStrings && self.segmentedStrings.count > 0) { 261 | CGFloat buttonWidth = self.bounds.size.width / self.segmentedStrings.count; 262 | 263 | UIFont *btnFont = [self buttonTitleFont]; 264 | 265 | for (int i=0; i < self.segmentedStrings.count; i++) { 266 | 267 | CGFloat buttonX = buttonWidth * i; 268 | UIButton *btn = (self.buttons.count > i) ? self.buttons[i] : nil; 269 | CGRect btnNewFrame = CGRectMake(buttonX, self.bounds.origin.y, buttonWidth, self.bounds.size.height); 270 | 271 | if (!btn ) { 272 | btn = [UIButton buttonWithType:UIButtonTypeCustom]; 273 | [self.buttons addObject:btn]; 274 | } 275 | 276 | UIView *line = (self.lines.count > i) ? self.lines[i] : nil; 277 | if (!line) { 278 | line = [[UIView alloc] init]; 279 | [self.lines addObject:line]; 280 | } 281 | else { 282 | btn.frame = btnNewFrame; 283 | CGRect lineFrame = btn.frame; 284 | CGSize btnTitleSize = [btn.titleLabel.text sizeWithFont:btn.titleLabel.font]; 285 | lineFrame.origin.x = btn.center.x - (lineFrame.size.width/2) ; 286 | lineFrame.origin.y = btn.titleLabel.frame.origin.y + (btnTitleSize.height/2) + 2; 287 | line.frame = lineFrame; 288 | continue; 289 | } 290 | 291 | btn.frame = btnNewFrame; 292 | [btn setTitle:self.segmentedStrings[i] forState:UIControlStateNormal]; 293 | [btn addTarget:self action:@selector(buttonSelected:) forControlEvents:UIControlEventTouchUpInside]; 294 | [btn.titleLabel setFont:btnFont]; 295 | btn.backgroundColor = self.segmentBackgroundColor; 296 | [btn setTitleColor:self.segmentTextColor forState:UIControlStateNormal]; 297 | [btn setTitleColor:self.segmentHighlightTextColor forState:UIControlStateHighlighted]; 298 | 299 | [self addSubview:btn]; 300 | 301 | CGRect lineFrame = [self lineFrameForbutton:btn]; 302 | if (self.selectedItem != i) { 303 | lineFrame.size.width = 0; 304 | } 305 | 306 | if (self.selectedItem == i) { 307 | [btn setTitleColor:self.selectedTextColor forState:UIControlStateNormal]; 308 | } 309 | 310 | line.frame = lineFrame; 311 | line.backgroundColor = self.lineColor; 312 | line.layer.cornerRadius = line.bounds.size.height/2; 313 | [self addSubview:line]; 314 | } 315 | 316 | for (UIView *line in self.lines) { 317 | [self bringSubviewToFront:line]; 318 | } 319 | } 320 | } 321 | 322 | 323 | -(CGRect)lineFrameForbutton:(UIButton*)btn { 324 | CGRect lineFrame = btn.frame; 325 | lineFrame.size.height = self.lineSelectedHeight; 326 | CGSize btnTitleSize = [btn.titleLabel.text sizeWithFont:btn.titleLabel.font]; 327 | lineFrame.size.width = (self.selectedLineMode == CustomSegmentedSelectedLineModeText) ? btnTitleSize.width + self.selectedLinePaddingWidth*2 : btn.bounds.size.width; 328 | lineFrame.origin.x = btn.center.x - (lineFrame.size.width/2) ; 329 | 330 | switch (self.selectedLineAlign) { 331 | case CustomSegmentedSelectedLineAlignTop: 332 | lineFrame.origin.y = 0; 333 | break; 334 | 335 | case CustomSegmentedSelectedLineAlignText: 336 | lineFrame.origin.y = btn.titleLabel.frame.origin.y + (btnTitleSize.height/2) + self.selectedLinePaddingWidth; 337 | break; 338 | 339 | case CustomSegmentedSelectedLineAlignBottom: 340 | lineFrame.origin.y = btn.bounds.origin.y + btn.bounds.size.height - lineFrame.size.height; 341 | break; 342 | default: 343 | break; 344 | } 345 | 346 | return lineFrame; 347 | } 348 | 349 | 350 | -(void)buttonSelected:(UIButton*)buttonPressed animated:(BOOL)animated { 351 | NSInteger previousSelectedItem = self.selectedItem; 352 | _selectedItem = [self.buttons indexOfObject:buttonPressed]; 353 | 354 | if (previousSelectedItem == self.selectedItem) { 355 | return; 356 | } 357 | if (_selectedWillChange) { 358 | _selectedWillChange(@{@"selected" : @(self.selectedItem)}); 359 | } 360 | 361 | for (int i=0; i previousSelectedItem) { 435 | 436 | tmpFrame.origin.x = (buttonPressed.frame.size.width - lineFrame.size.width)/2 + buttonPressed.frame.origin.x; 437 | 438 | } 439 | else { 440 | tmpFrame.origin.x = buttonPressed.frame.origin.x + buttonPressed.bounds.size.width - tmpFrame.size.width - (buttonPressed.bounds.size.width - lineFrame.size.width)/2; 441 | } 442 | line.frame = tmpFrame; 443 | } 444 | 445 | 446 | [self doRelativeOpenAnimation:line 447 | lineNewFrame:lineFrame 448 | duration:duration 449 | damping:0 450 | button:button buttonPressed:buttonPressed 451 | buttonTextColor:buttonTextColor 452 | initialSpringVelocity:self.initialDampingVelocity]; 453 | } 454 | break; 455 | 456 | default: 457 | { 458 | 459 | [self doTransitionAnimation:line 460 | lineNewFrame:lineFrame 461 | duration:duration 462 | damping:damping 463 | button:button 464 | buttonPressed:buttonPressed 465 | buttonTextColor:buttonTextColor 466 | initialSpringVelocity:self.initialDampingVelocity]; 467 | } 468 | break; 469 | } 470 | } 471 | } 472 | } 473 | 474 | 475 | -(void)buttonSelected:(UIButton*)buttonPressed { 476 | [self buttonSelected:buttonPressed animated:YES]; 477 | } 478 | 479 | 480 | -(void)doTransitionAnimation:(UIView*)line 481 | lineNewFrame:(CGRect)lineFrame 482 | duration:(CGFloat)duration 483 | damping:(CGFloat)damping 484 | button:(UIButton*)button 485 | buttonPressed:(UIButton*)buttonPressed 486 | buttonTextColor:(UIColor*)buttonTextColor 487 | initialSpringVelocity:(CGFloat)velocity { 488 | 489 | CGPoint center = button.center; 490 | center.y = line.center.y; 491 | 492 | if (duration == 0.0) { 493 | line.frame = lineFrame; 494 | line.center = center; 495 | [button setTitleColor:buttonTextColor forState:UIControlStateNormal]; 496 | if (_selectedDidChange && ([self.buttons indexOfObject:button] == (self.buttons.count - 1))) { 497 | _selectedDidChange(@{@"selected" : [NSNumber numberWithInteger:self.selectedItem], @"finished" : [NSNumber numberWithBool:YES]}); 498 | } 499 | } 500 | else { 501 | 502 | [UIView animateWithDuration:duration delay:0 usingSpringWithDamping:damping initialSpringVelocity:velocity options:0 animations:^{ 503 | 504 | line.frame = lineFrame; 505 | line.center = center; 506 | [button setTitleColor:buttonTextColor forState:UIControlStateNormal]; 507 | 508 | } completion:^(BOOL finished) { 509 | if (_selectedDidChange && ([self.buttons indexOfObject:button] == (self.buttons.count - 1))) { 510 | _selectedDidChange(@{@"selected" : [NSNumber numberWithInteger:self.selectedItem], @"finished" : [NSNumber numberWithBool:finished]}); 511 | } 512 | }]; 513 | } 514 | } 515 | 516 | -(void)doRelativeOpenAnimation:(UIView*)line 517 | lineNewFrame:(CGRect)lineFrame 518 | duration:(CGFloat)duration 519 | damping:(CGFloat)damping 520 | button:(UIButton*)button 521 | buttonPressed:(UIButton*)buttonPressed 522 | buttonTextColor:(UIColor*)buttonTextColor 523 | initialSpringVelocity:(CGFloat)velocity { 524 | 525 | if (duration == 0.0) { 526 | line.frame = lineFrame; 527 | [button setTitleColor:buttonTextColor forState:UIControlStateNormal]; 528 | if (_selectedDidChange && ([self.buttons indexOfObject:button] == (self.buttons.count - 1))) { 529 | _selectedDidChange(@{@"selected" : [NSNumber numberWithInteger:self.selectedItem], @"finished" : [NSNumber numberWithBool:YES]}); 530 | } 531 | } 532 | else { 533 | 534 | [UIView animateWithDuration:duration delay:0 usingSpringWithDamping:1 initialSpringVelocity:0 options:UIViewAnimationOptionTransitionNone animations:^{ 535 | 536 | line.frame = lineFrame; 537 | [button setTitleColor:buttonTextColor forState:UIControlStateNormal]; 538 | 539 | } completion:^(BOOL finished) { 540 | if (_selectedDidChange && ([self.buttons indexOfObject:button] == (self.buttons.count - 1))) { 541 | _selectedDidChange(@{@"selected" : [NSNumber numberWithInteger:self.selectedItem], @"finished" : [NSNumber numberWithBool:finished]}); 542 | } 543 | }]; 544 | } 545 | } 546 | 547 | 548 | -(void)setSelectedItem:(NSInteger)selectedItem { 549 | if (self.buttons.count > selectedItem && selectedItem >= 0) { 550 | UIButton *selectedButton = self.buttons[selectedItem]; 551 | [self buttonSelected:selectedButton animated:NO]; 552 | } 553 | else { 554 | // should be called only if the segmentedStrings (JS: textValues) array 555 | // havn't been set yet, to avoid missing setSelected 556 | _selectedItem = selectedItem; 557 | } 558 | } 559 | 560 | 561 | @end 562 | 563 | 564 | @implementation CustomSegmentedControlManager 565 | 566 | 567 | RCT_EXPORT_MODULE() 568 | 569 | 570 | - (UIView *)view { 571 | return [CustomSegmentedControl new]; 572 | } 573 | 574 | 575 | RCT_EXPORT_VIEW_PROPERTY(enabled, BOOL) 576 | 577 | // props 578 | RCT_REMAP_VIEW_PROPERTY(textValues, segmentedStrings, NSArray) 579 | RCT_REMAP_VIEW_PROPERTY(selected, selectedItem, NSInteger) 580 | RCT_REMAP_VIEW_PROPERTY(segmentedStyle, segmentedStyle, NSDictionary) 581 | RCT_REMAP_VIEW_PROPERTY(animation, animation, NSDictionary) 582 | 583 | // callback props 584 | RCT_REMAP_VIEW_PROPERTY(onSelectedWillChange, selectedWillChange, RCTDirectEventBlock) 585 | RCT_REMAP_VIEW_PROPERTY(onSelectedDidChange, selectedDidChange, RCTDirectEventBlock) 586 | 587 | 588 | @end 589 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-native-custom-segmented-control", 3 | "publishConfig": { 4 | "registry": "https://registry.npmjs.org/" 5 | }, 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/wix/react-native-custom-segmented-control" 9 | }, 10 | "version": "3.1.0", 11 | "description": "Native iOS Custom segmented control for React Native", 12 | "nativePackage": true, 13 | "homepage": "https://github.com/wix/react-native-custom-segmented-control", 14 | "main": "src/index.js", 15 | "author": "Ran Greenberg ", 16 | "license": "MIT", 17 | "scripts": { 18 | "start": "watchman watch-del-all && node node_modules/react-native/local-cli/cli.js start", 19 | "xcode": "open ios/example.xcodeproj" 20 | }, 21 | "dependencies": { 22 | "lodash": "^4.0.0" 23 | }, 24 | "devDependencies": { 25 | "react": "16.6.0-alpha.8af6728", 26 | "react-native": "0.57.4" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/CustomSegmentedControl.js: -------------------------------------------------------------------------------- 1 | import * as _ from 'lodash'; 2 | import React, {Component} from 'react'; 3 | import { 4 | requireNativeComponent, 5 | processColor 6 | } from 'react-native'; 7 | 8 | const NativeCustomSegmentedControl = requireNativeComponent('CustomSegmentedControl', null); 9 | 10 | export default class CustomSegmentedControl extends Component { 11 | render() { 12 | const transformedProps = {...this.props}; 13 | _.update(transformedProps, 'segmentedStyle.segmentBackgroundColor', (c) => processColor(c)); 14 | _.update(transformedProps, 'segmentedStyle.segmentTextColor', (c) => processColor(c)); 15 | _.update(transformedProps, 'segmentedStyle.selectedLineColor', (c) => processColor(c)); 16 | _.update(transformedProps, 'segmentedStyle.selectedTextColor', (c) => processColor(c)); 17 | _.update(transformedProps, 'segmentedStyle.segmentHighlightTextColor', (c) => processColor(c)); 18 | return 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import CustomSegmentedControl from './CustomSegmentedControl'; 2 | 3 | export {CustomSegmentedControl}; 4 | --------------------------------------------------------------------------------