ADPopupView 触摸弹出视窗

来源:互联网 发布:手机删除数据恢复 编辑:程序博客网 时间:2024/04/28 22:40

https://github.com/Antondomashnev/ADPopupView

ADPopupView is an iOS drop-in classes that displays popup at custom point in custom view. It automatically drawing itself according current position and parent view bounds. ADPopupView providing some cusotmization mechanism and support two type: popup with text or popup with custom view.

ADPopupView是一个类,用来在指定的点上弹出一个试图视窗。它自动根据父视图bounds布局来绘制窗口。它提供了一些自定义的组件来支持两种类型的View:一种text或者自定义的View。

Requirements

ADPopupView works on any iOS version only greater or equal than 4.3 and is compatible with only ARC projects. It depends on the following Apple frameworks, which should already be included with most Xcode templates:

ADPopupView能在任何大于4.3版本的iOS系统上运行,只支持ARC。添加如下框架即可:

  • Foundation.framework
  • UIKit.framework
  • CoreGraphics.framework

You will need LLVM 3.0 or later in order to build ADPopupView.

你需要使用 LLVM3.0以上(架构编译器)来编译ADPopupView。

Adding ADPopupView to your project

Source files

The simplest way to add the ADPopupView to your project is to directly add the source files and resources to your project.

直接将源码添加到你的工程中即可。

  1. Download the latest code version or add the repository as a git submodule to your git-tracked project.下载最新源码
  2. Open your project in Xcode, than drag and drop ADPopupView.h and ADPopupView.m from Source directory onto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.将ADPopupView.m与ADpopupView.h 添加到你的Xcode中。
  3. Include ADPopupView wherever you need it with #import "ADPopupView.h".引入头文件

Usage

In ADPopupView project there is a demo UIViewController (as ViewController.m) which show a simple usage example. Just touch on simulator screen and ADPopupView will be shown at touch position.

在ADPopupView工程中已经包含了一个demo演示怎么来使用的示例,触摸模拟器屏幕,ADPopupView就会在触摸点绘制出一个视图窗口。


0 0
原创粉丝点击