zoukankan      html  css  js  c++  java
  • [翻译] DXPopover

    DXPopover

    A Popover mimic Facebook app popover using UIKit.

    使用UIKit框架写了一个类似于Facebook的pop效果的动画。

    The concept of this popover is very simple: add your contentView in a popover, then show the popover in the container view.

    这个popver的使用非常简单:将你的view添加到popover中,然后在这个view中显示这个popover

    Screenshot

    Usage

    The API and demo is fairly straight forward. You can read details in the demo.

    这个API的使用在demo里面已经非常直白了,你可以直接在demo里面去看。

    Showing the popover

    1. make a your contentView, set its frame or bounds. 创建一个你的view,设置它的frame值与bounds值
    2. new a DXPopover. 初始化一个DXPopver
    3. show it. 显示它

    Simple - 简单的使用示例

    eg:

    UIImageView *imageV= [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
    imageV.image = [UIImage imageNamed:@"ig20.jpg"];
    DXPopover *popover = [DXPopover popover];
    [popover showAtView:self.btn1 withContentView:imageV];
    

    More conceret - 复杂一点的例子

    eg:

    [self.popover showAtPoint:yourPoint popoverPostion:DXPopoverPositionDown withContentView:self.tableView inView:self.tabBarController.view]; // 1.Set the show point 2.set The position if up or down staying the showPoint, 3.Your contentView 4.The containerView
    __weak typeof(self)weakSelf = self;
    self.popover.didDismissHandler = ^{ //The callback of popover dimissal.
        [weakSelf bounceTargetView:titleView];
    };
  • 相关阅读:
    MTK 关闭耳机调至最大音量时,提示损伤听力
    MTK LCM的添加
    chmod chown
    ubuntu14.04设置静态IP
    MTK NTP和NITZ更新时间的问题
    Rk3288 双屏异显单触摸
    MTK 修改默认时区
    MTK 屏幕旋转90度
    MTK WIFI底部加入返回按钮
    MTK 自定义按键添加广播
  • 原文地址:https://www.cnblogs.com/YouXianMing/p/4212124.html
Copyright © 2011-2022 走看看