1.1.0 • Published 4 years ago

uiviewbridge v1.1.0

Weekly downloads
36
License
-
Repository
-
Last release
4 years ago

UIView Bridge

This is a component you can use to display a Swift UIView in your React Native app.

Installation

npm install uiviewbridge

Set up

Before being able to use the component, you need to add the native files to your app so they can be compiled with it.

iOS

  • Open your projectname.xcworkspace/ by using the following command from the root of your React Native app:
open ios/projectname.xcworkspace
  • Then, go to Build Phases and click on the + sign in Compile Sources.
  • In the popup window, click on Add Other...
  • Select for the UIViewBridge.swift, UIViewBridgeManager.m and UIViewBridgeManager.swift files of the package in projectname > node_nodules > uiviewbridge > ios and click Open.
  • Make sure Create folder references is checked and click on Finish.

The added files should now be on the list in Compile Sources.

Usage

Import the component using the following line:

import UIView from 'uiviewbridge'

Render you UIView in your React Native app:

render() {
	return(
		<UIView
			viewControllerName="nameOfSwiftViewController"
			viewControllerAppName="nameOfViewControllersApp"
		/>
	)
}
1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago