npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-popover-ios

v0.3.14

Published

A native popover component for react-native, iOS only.

Downloads

18

Readme

react-native-popover-ios

A native popover component for react-native, iOS only.

Install

npm version < 5.0

npm i react-native-popover-ios --save

or npm version >= 5.0

npm i react-native-popover-ios

link

react-native link react-native-popover-ios

properties

Example:

import Popover from 'react-native-popover-ios';

_onPress = (event) => {
	 this.render(event.target);
 };

render(reactTag) {
	return (
		<Popover
		  sourceView={reactTag}
		  onShow={this._onShow}
		  onHide={this._onHide}
		  preferredContentSize={[200, 200]}
		  permittedArrowDirections={[0, 2]}>
		  {content}
		</Popover>
	)
}

visible

determines whether your popover is visible.

default: true

animated

determines whether present or dismiss popover use animation.

default: true

cancelable

determines whether dismiss popover when clicking the out space.

default: true

popoverBackgroundColor

the back ground color of popover.

default: 'white'

sourceViewReactTag

the react tag of The view which containing the anchor rectangle for the popover.

default: -1

sourceViewTag

tag for the native view containing the anchor rectangle for the popover.

default: -1

sourceViewGetterTag

tag for the native view getter which containing the anchor rectangle for the popover.

default: -1

sourceRect

the rectangle in the specified view in which to anchor the popover.

default: the frame of the sourceView

usage: [x, y, width, height]

example: [0, 0, 200, 200]

permittedArrowDirections

The arrow directions that you prefer for the popover.

  • 0: up
  • 1: down
  • 2: left
  • 3: right

default: [0, 1, 2, 3]

preferredContentSize

The preferred size for the view controller’s view.

usage: [width, height].

onShow

a function that will be called once the popover has been shown.

onHide

a function that will be called once the popover has been hidden.

Method

dismiss

dismiss popover

  • reactTag: react tag of The popover
  • animated: whether dismiss use animation, default true

Example:

import Popover from 'react-native-popover-ios';

const reactTag = ReactNative.findNodeHandle(this.refs.popover);
try {
	await Popover.dismiss(reactTag, false);
} catch (e) {
	console.error('error', e);
}

How to use the Example Project

npm >= 5.0

install dependences

cd <react-native-popover-ios>/Example
npm i

fix the error: Unable to resolve module react

cd <react-native-popover-ios>
npm i --no-save [email protected]

start the local server

cd <react-native-popover-ios>/Example
react-native start

open example project

open open <react-native-popover-ios>/Example/ios/Example.xcodeproj/