Skip to content

Instantly share code, notes, and snippets.

View dhrrgn's full-sized avatar
🦙

Dan Horrigan dhrrgn

🦙
  • OH, USA
  • 10:06 (UTC -04:00)
View GitHub Profile
/**
* @providesModule KeyboardMixin
*/
'use strict';
import React from 'react-native';
var {
DeviceEventEmitter,
} = React;
@dhrrgn
dhrrgn / AppDelegate.m
Last active October 29, 2015 15:47 — forked from arbesfeld/AppDelegate.m
Update app on first load + display alert when new build becomes available.
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <AppHub/AppHub.h>
CSSearchableItemAttributeSet *attributeSet;
attributeSet = [[CSSearchableItemAttributeSet alloc] initWithItemContentType:(NSString *)kUTTypeImage];
attributeSet.title = @"Some Title";
attributeSet.contentDescription = @"Some Destiption";
attributeSet.keywords = @[@"Some", @"Keyword"];
UIImage *image = [UIImage imageNamed:@"someOptionalImage.png"];
NSData *imageData = [NSData dataWithData:UIImagePNGRepresentation(image)];
/**
* @providesModule ProgressBar
*/
import React, { Animated, PropTypes, StyleSheet, View, } from 'react-native';
class ProgressBar extends React.Component {
static propTypes = {
progress: PropTypes.number,
progressColor: PropTypes.string,
trackColor: PropTypes.string,
import htmlparser from '../../vendor/htmlparser2';
import entities from '../../vendor/entities';
import React from 'react-native';
var {
LinkingIOS,
StyleSheet,
Text,
} = React;
var LINE_BREAK = '\n';
diff --git a/node_modules/react-native/Libraries/Components/TextInput/TextInput.js b/node_modules/react-native/Libraries/Components/TextInput/TextInput.js
index f114ac1..70df59f 100644
--- a/node_modules/react-native/Libraries/Components/TextInput/TextInput.js
+++ b/node_modules/react-native/Libraries/Components/TextInput/TextInput.js
@@ -34,6 +34,7 @@ var onlyMultiline = {
onSelectionChange: true, // not supported in Open Source yet
onTextInput: true, // not supported in Open Source yet
children: true,
+ autoGrow: true,
};
RCT_EXPORT_METHOD(measureTextRect:(NSString *)string withWidth:(double)width withFontName:(NSString *)fontName andFontSize:(double)fontSize andCallback:(RCTResponseSenderBlock)callback)
{
UIFont *font = [UIFont fontWithName:fontName size:fontSize];
NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, nil];
CGRect rect = [string boundingRectWithSize:CGSizeMake(width, CGFLOAT_MAX)
options:NSStringDrawingUsesLineFragmentOrigin
attributes:attributes
context:nil];
//
// RNImagePicker.h
//
// Created by Dan Horrigan on 9/8/15.
// Copyright (c) 2015 Tackk, Inc. All rights reserved.
//
#import "RCTBridgeModule.h"
#import <UIKit/UIKit.h>
/**
* @providesModule PusherClient
*/
"use strict";
import React from 'react-native';
var {
NativeAppEventEmitter,
NativeModules: {
PusherClient,
@dhrrgn
dhrrgn / RNDigits.m
Created August 13, 2015 16:16
Digits React Native module.
//
// RNDigits.m
//
// Created by Dan Horrigan on 8/13/15.
// Copyright (c) 2015 Tackk, Inc. All rights reserved.
//
#import <DigitsKit/DigitsKit.h>
#import "RCTBridgeModule.h"
#import "RCTEventDispatcher.h"