Skip to content

Instantly share code, notes, and snippets.

Created Dec 23, 2017
What would you like to do?

React Native Swift

Example of react native swift component implementation

#import <React/RCTBridgeModule.h>
#import <React/RCTViewManager.h>
@interface RCT_EXTERN_MODULE(RNPhoneInputSwift, RCTViewManager)
import Foundation
public class RNPhoneInput : UITextField {
public func setValue(value: String) {
self.text = value
import Foundation
class RNPhoneInputManager : RCTViewManager {
override static func requiresMainQueueSetup() -> Bool {
return false
override func view() -> UIView! {
return RNPhoneInput()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment