Skip to content

Commit 60cc228

Browse files
author
Brent Vatne
committed
First release
0 parents  commit 60cc228

25 files changed

+1616
-0
lines changed

.gitignore

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
node_modules/**/*
2+
Examples/LoadingOverlay/node_modules/**/*
3+
4+
build/
5+
*.pbxuser
6+
!default.pbxuser
7+
*.mode1v3
8+
!default.mode1v3
9+
*.mode2v3
10+
!default.mode2v3
11+
*.perspectivev3
12+
!default.perspectivev3
13+
xcuserdata
14+
*.xccheckout
15+
*.moved-aside
16+
DerivedData
17+
*.hmap
18+
*.ipa
19+
*.xcuserstate
20+
21+
# CocoaPods
22+
#
23+
# We recommend against adding the Pods directory to your .gitignore. However
24+
# you should judge for yourself, the pros and cons are mentioned at:
25+
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
26+
#
27+
#Pods/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* @providesModule LoadingOverlay
3+
* @flow
4+
*/
5+
6+
var React = require('react-native');
7+
var Overlay = require('react-native-overlay');
8+
var BlurView = require('react-native-blur').BlurView;
9+
10+
var {
11+
View,
12+
ActivityIndicatorIOS,
13+
StyleSheet,
14+
} = React;
15+
16+
var LoadingOverlay = React.createClass({
17+
getDefaultProps(): StateObject {
18+
return {
19+
isVisible: false
20+
}
21+
},
22+
23+
render(): ReactElement {
24+
return (
25+
<Overlay isVisible={this.props.isVisible}>
26+
<BlurView style={styles.background} blurType="dark">
27+
<ActivityIndicatorIOS
28+
size="large"
29+
animating={true}
30+
style={styles.spinner} />
31+
</BlurView>
32+
</Overlay>
33+
);
34+
}
35+
});
36+
37+
var styles = StyleSheet.create({
38+
background: {
39+
flex: 1,
40+
justifyContent: 'center',
41+
},
42+
})
43+
44+
module.exports = LoadingOverlay;

Examples/LoadingOverlay/LoadingOverlay.xcodeproj/project.pbxproj

+660
Large diffs are not rendered by default.

Examples/LoadingOverlay/LoadingOverlay.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0620"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
18+
BuildableName = "LoadingOverlay.app"
19+
BlueprintName = "LoadingOverlay"
20+
ReferencedContainer = "container:LoadingOverlay.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28+
shouldUseLaunchSchemeArgsEnv = "YES"
29+
buildConfiguration = "Debug">
30+
<Testables>
31+
</Testables>
32+
<MacroExpansion>
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
36+
BuildableName = "LoadingOverlay.app"
37+
BlueprintName = "LoadingOverlay"
38+
ReferencedContainer = "container:LoadingOverlay.xcodeproj">
39+
</BuildableReference>
40+
</MacroExpansion>
41+
</TestAction>
42+
<LaunchAction
43+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
44+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
45+
launchStyle = "0"
46+
useCustomWorkingDirectory = "NO"
47+
buildConfiguration = "Debug"
48+
ignoresPersistentStateOnLaunch = "NO"
49+
debugDocumentVersioning = "YES"
50+
allowLocationSimulation = "YES">
51+
<BuildableProductRunnable
52+
runnableDebuggingMode = "0">
53+
<BuildableReference
54+
BuildableIdentifier = "primary"
55+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
56+
BuildableName = "LoadingOverlay.app"
57+
BlueprintName = "LoadingOverlay"
58+
ReferencedContainer = "container:LoadingOverlay.xcodeproj">
59+
</BuildableReference>
60+
</BuildableProductRunnable>
61+
<AdditionalOptions>
62+
</AdditionalOptions>
63+
</LaunchAction>
64+
<ProfileAction
65+
shouldUseLaunchSchemeArgsEnv = "YES"
66+
savedToolIdentifier = ""
67+
useCustomWorkingDirectory = "NO"
68+
buildConfiguration = "Release"
69+
debugDocumentVersioning = "YES">
70+
<BuildableProductRunnable
71+
runnableDebuggingMode = "0">
72+
<BuildableReference
73+
BuildableIdentifier = "primary"
74+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
75+
BuildableName = "LoadingOverlay.app"
76+
BlueprintName = "LoadingOverlay"
77+
ReferencedContainer = "container:LoadingOverlay.xcodeproj">
78+
</BuildableReference>
79+
</BuildableProductRunnable>
80+
</ProfileAction>
81+
<AnalyzeAction
82+
buildConfiguration = "Debug">
83+
</AnalyzeAction>
84+
<ArchiveAction
85+
buildConfiguration = "Release"
86+
revealArchiveInOrganizer = "YES">
87+
</ArchiveAction>
88+
</Scheme>
945 KB
Loading
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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 <UIKit/UIKit.h>
11+
12+
@interface AppDelegate : UIResponder <UIApplicationDelegate>
13+
14+
@property (nonatomic, strong) UIWindow *window;
15+
16+
@end
+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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 "RCTRootView.h"
13+
14+
@implementation AppDelegate
15+
16+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
17+
{
18+
NSURL *jsCodeLocation;
19+
20+
// Loading JavaScript code - uncomment the one you want.
21+
22+
// OPTION 1
23+
// Load from development server. Start the server from the repository root:
24+
//
25+
// $ npm start
26+
//
27+
// To run on device, change `localhost` to the IP address of your computer, and make sure your computer and
28+
// iOS device are on the same Wi-Fi network.
29+
jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"];
30+
31+
// OPTION 2
32+
// Load from pre-bundled file on disk. To re-generate the static bundle, run
33+
//
34+
// $ curl 'http://localhost:8081/index.ios.bundle?dev=false&minify=true' -o iOS/main.jsbundle
35+
//
36+
// and uncomment the next following line
37+
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
38+
39+
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
40+
moduleName:@"LoadingOverlayExampleApp"
41+
launchOptions:launchOptions];
42+
43+
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
44+
UIViewController *rootViewController = [[UIViewController alloc] init];
45+
rootViewController.view = rootView;
46+
self.window.rootViewController = rootViewController;
47+
[self.window makeKeyAndVisible];
48+
return YES;
49+
}
50+
51+
@end
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6751" systemVersion="14C1510" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
3+
<dependencies>
4+
<deployment identifier="iOS"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6736"/>
6+
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
7+
</dependencies>
8+
<objects>
9+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
10+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
11+
<view contentMode="scaleToFill" id="iN0-l3-epB">
12+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
13+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
14+
<subviews>
15+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Powered by React Native" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
16+
<rect key="frame" x="20" y="439" width="441" height="21"/>
17+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
18+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
19+
<nil key="highlightedColor"/>
20+
</label>
21+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LoadingOverlay" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
22+
<rect key="frame" x="20" y="140" width="441" height="43"/>
23+
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
24+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
25+
<nil key="highlightedColor"/>
26+
</label>
27+
</subviews>
28+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
29+
<constraints>
30+
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
31+
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
32+
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
33+
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
34+
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
35+
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
36+
</constraints>
37+
<nil key="simulatedStatusBarMetrics"/>
38+
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
39+
<point key="canvasLocation" x="548" y="455"/>
40+
</view>
41+
</objects>
42+
</document>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
}
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>APPL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>1</string>
23+
<key>LSRequiresIPhoneOS</key>
24+
<true/>
25+
<key>UILaunchStoryboardName</key>
26+
<string>LaunchScreen</string>
27+
<key>UIRequiredDeviceCapabilities</key>
28+
<array>
29+
<string>armv7</string>
30+
</array>
31+
<key>UISupportedInterfaceOrientations</key>
32+
<array>
33+
<string>UIInterfaceOrientationPortrait</string>
34+
<string>UIInterfaceOrientationLandscapeLeft</string>
35+
<string>UIInterfaceOrientationLandscapeRight</string>
36+
</array>
37+
<key>UIViewControllerBasedStatusBarAppearance</key>
38+
<false/>
39+
<key>NSLocationWhenInUseUsageDescription</key>
40+
<string></string>
41+
</dict>
42+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Offline JS
2+
// To re-generate the offline bundle, run this from root of your project
3+
// $ curl 'http://localhost:8081/index.ios.bundle?dev=false&minify=true' -o iOS/main.jsbundle
4+
5+
throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions');

Examples/LoadingOverlay/iOS/main.m

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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 <UIKit/UIKit.h>
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+
}

0 commit comments

Comments
 (0)