首页 > 其他 > 详细

iphone中类似的popView效果

时间:2015-09-29 16:47:42      阅读:292      评论:0      收藏:0      [点我收藏+]

第三方库   KxMenu

- (void)add:(UIBarButtonItem *)item

{

    NSLog(@"add");

    if (isKxMenushow == NO) {

        NSArray *menuItems =

        @[

          [KxMenuItem menuItem:@"添加好友"

                         image:[UIImage imageNamed:@"moreBtn"]

                        target:self

                        action:@selector(AddFriends:)],

          

          [KxMenuItem menuItem:@"新建群聊"

                         image:[UIImage imageNamed:@"moreBtn"]

                        target:self

                        action:@selector(createQun:)],

          

          [KxMenuItem menuItem:@"扫一扫"

                         image:[UIImage imageNamed:@"moreBtn"]

                        target:self

                        action:@selector(SaoMa:)],

 

          //          [KxMenuItem menuItem:@"分  享"

          //                         image:[UIImage imageNamed:@"GoodsDetailsSousuo"]

          //                        target:self

          //                        action:@selector(share)],

          [KxMenuItem menuItem:@"通讯录" image:[UIImage imageNamed:@"moreBtn"] target:self action:@selector(AddressBook:)]

          ];

        

        KxMenuItem *first = menuItems[0];

        first.foreColor = [UIColor redColor];

        //[UIColor colorWithRed:47/255.0f green:112/255.0f blue:225/255.0f alpha:1.0];

        first.alignment = NSTextAlignmentCenter;

        

        [KxMenu showMenuInView:self.view

                      fromRect:CGRectMake(WZScreenWidth - 100, -63, 100, 50)

                     menuItems:menuItems];

        isKxMenushow = YES;

    }else if(isKxMenushow == YES){

        [KxMenu dismissMenu];

        isKxMenushow = NO;

    }

}

 

iphone中类似的popView效果

原文:http://www.cnblogs.com/mjisagoodgirl/p/4846409.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!