SLNPopupMenu 0.3

SLNPopupMenu 0.3

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布时间最后发布2017年1月

Puvanarajan Mohanaram 维护。



  • 作者
  • Puvanarajan

欢迎使用 SLNPopupMenu!

SLNPopupMenu 是一个用于创建弹出菜单的 iOS 简单类库

导入文件 方法 01

  1. 将 SLNPopupMenu 文件夹(SLNPopupView.hSLNPopupView.m)拖放到适当的目录

  2. 在你要导入的文件中添加 #import "SLNPopupView.h"

方法 2: 使用 pod

pod 'SLNPopupMenu' #import "SLNPopupView.h"

如何使用

  1. 带标题、描述和菜单图标的菜单

enter image description here

  NSArray *menu = @[
    @["Title 1", "Description", [UIImage ImageWithName:@"img1.png"]],
    @["Title 2", "Description", [UIImage ImageWithName:@"img2.png"]],
    @["Title 3", "Description", [UIImage ImageWithName:@"img3.png"]],
    @["Title 4", "Description", [UIImage ImageWithName:@"img4.png"]]
    ]



    [PopupView showPopWithDescriptionImage:menu font:nil touchPoint:[recognizer locationInView:self.view] success:^(NSInteger selectedIndex) {
                NSLog(@"Selected Index %li", (long)selectedIndex);
            } dismiss:^{
                NSLog(@"Disissed");
            }];
  1. 带标题和描述的菜单

enter image description here

NSArray *menu = @[
    @["Title 1", "Description"],
    @["Title 2", "Description"],
    @["Title 3", "Description"],
    @["Title 4", "Description"]
    ]


[PopupView showPopOnlyWithTitleAndDescription:menu font:nil touchPoint:[recognizer locationInView:self.view] success:^(NSInteger selectedIndex) {
            NSLog(@"Selected Index %li", (long)selectedIndex);
        } dismiss:^{
            NSLog(@"Disissed");
        }];
  1. 带标题和图片的菜单

enter image description here

NSArray *menu = @[
    @["Title 1", [UIImage ImageWithName:@"img1.png"]],
    @["Title 2", [UIImage ImageWithName:@"img2.png"]],
    @["Title 3", [UIImage ImageWithName:@"img3.png"]],
    @["Title 4", [UIImage ImageWithName:@"img4.png"]]
    ]



 [PopupView showPopOnlyWithTitleAndImage:menuArrayImage font:nil touchPoint:[recognizer locationInView:self.view] success:^(NSInteger selectedIndex) {
                NSLog(@"Selected Index %li", (long)selectedIndex);
            } dismiss:^{
                NSLog(@"Disissed");
            }];