Latest 0.1.1
Homepage https://github.com/JunAILiang/JMDropMenu
License MIT
Platforms ios 8.0, requires ARC
Authors

仿QQ、微信下拉菜单封装, 一行代码实现QQ和微信的下拉菜单

  • 支持自定义样式
  • 支持CocoaPods

JMDropMenu

如何使用

  • 通过CocoaPods导入 pod 'JMDropMenu', '~> 0.1.1'
  • 手动导入 直接下载工程把 JMDropMenu 文件夹导入到自己工程中

初始化数据

self.titleArr = @[@"创建群聊",@"加好友/群",@"扫一扫",@"付款",@"拍摄"];
self.imageArr = @[@"img1",@"img2",@"img3",@"img4",@"img5"];

一行代码调用

[JMDropMenu showDropMenuFrame:CGRectMake(8, 64, 120, 208) ArrowOffset:16.f TitleArr:self.titleArr ImageArr:self.imageArr Type:JMDropMenuTypeWeChat LayoutType:JMDropMenuLayoutTypeNormal RowHeight:40.f Delegate:self];

遵守代理

- (void)didSelectRowAtIndex:(NSInteger)index Title:(NSString *)title Image:(NSString *)image {
    NSLog(@"index----%zd,  title---%@, image---%@", index, title, image);
}

你也可以高度自定义

/** 文字颜色 */
@property (nonatomic, strong) UIColor *titleColor;
/** 线条颜色 */
@property (nonatomic, strong) UIColor *lineColor;
/** 箭头x偏移值 */
@property (nonatomic, assign) CGFloat arrowOffset;
/** 布局类型 (图片再左, 文字在右) */
@property (nonatomic, assign) JMDropMenuLayoutType LayoutType;
/** 箭头的颜色(UIColor类型) */
@property (nonatomic, strong) UIColor *arrowColor;
/** 箭头的颜色(16进制类型, 传16进制值即可, 例 #ffffff) */
@property (nonatomic, copy) NSString *arrowColor16;

联系我:

Latest podspec

{
    "name": "JMDropMenu",
    "version": "0.1.1",
    "summary": "u4effQQu3001u5faeu4fe1u4e0bu62c9u83dcu5355u5c01u88c5, u4e00u884cu4ee3u7801u8c03u7528",
    "description": "u4effQQu3001u5faeu4fe1u4e0bu62c9u83dcu5355u5c01u88c5, u4e00u884cu4ee3u7801u8c03u7528",
    "homepage": "https://github.com/JunAILiang/JMDropMenu",
    "license": "MIT",
    "authors": {
        "LJM": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/JunAILiang/JMDropMenu.git",
        "tag": "0.1.1"
    },
    "source_files": "JMDropMenu/JMDropMenu/**/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This