zoukankan      html  css  js  c++  java
  • Ios 弹框 MJPopup,KxMenu

    IOS 弹框 如果直接弹出一个自定义的视图 可以选用第三方:

    MJPopup

    弹出:

    if(!bandview)

        {

            bandview=[[[NSBundle mainBundle]loadNibNamed:@"bandView" owner:selfoptions:nil] firstObject];

            bandview.bdelagate=self;

            [bandview setFrame:CGRectMake(0, 0, 320, 160)];

        }

        int offset=ISIPhone5?100:50;

        [self presentPopupView:bandview animationType:MJPopupViewAnimationFadeoffset:offset];

    收起

    [self dismissPopupViewControllerWithanimationType:MJPopupViewAnimationFade];

    一般的菜单弹出可用

    KxMenu

     NSArray *menuItems =

        @[

          [KxMenuItem menuItem:@"明细统计方式"

                         image:nil

                        target:nil

                        action:NULL],

          

          [KxMenuItem menuItem:@"现金"

                         image:[UIImageimageNamed:@"action_icon"]

                        target:self

                       action:@selector(pushMenuItem:)],

          

          [KxMenuItem menuItem:@"余额"

                         image:[UIImageimageNamed:@"check_icon"]

                        target:self

                       action:@selector(pushMenuItem:)],

          

          [KxMenuItem menuItem:@"POS"

                         image:[UIImageimageNamed:@"reload"]

                        target:self

                       action:@selector(pushMenuItem:)]

          ];

        

        KxMenuItem *first = menuItems[0];

        first.foreColor = [UIColorcolorWithRed:47/255.0f green:112/255.0f blue:225/255.0f alpha:1.0];

        first.alignment = NSTextAlignmentCenter;

        

        CGRect rect=button.frame;

        CGFloat height=0.0;

        if(IOS7>=7.0)

        {

            height=64;

        }

        else

        {

            height=0.0;

        }

        [KxMenu showMenuInView:self.view

                     fromRect:CGRectMake(rect.origin.x, rect.origin.y, rect.size.width, height)

                     menuItems:menuItems];

    点击事件实现:

    - (void) pushMenuItem:(KxMenuItem*)sender

  • 相关阅读:
    概率dp——cf148D
    概率dp——处理分母为0的情况hdu3853
    概率dp的迭代方式小结——zoj3329,hdu4089,hdu4035
    概率dp——hdu4089推公式+循环迭代
    概率dp——期望水题hdu4405
    概率dp——逆推期望+循环迭代zoj3329
    单调栈——cf777E
    springMVC 返回类型选择 以及 SpringMVC中model,modelMap.request,session取值顺序
    spring MVC、mybatis配置读写分离
    Spring 实现数据库读写分离
  • 原文地址:https://www.cnblogs.com/wanghuaijun/p/5584105.html
Copyright © 2011-2022 走看看