| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // YCXMenuItem.h
- // YCXMenuDemo_ObjC
- //
- // Created by 牛萌 on 15/5/6.
- // Copyright (c) 2015年 NiuMeng. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import <UIKit/UIKit.h>
- @interface YCXMenuItem : NSObject
- @property (readwrite, nonatomic, strong) UIImage *image;
- @property (readwrite, nonatomic, strong) NSString *title;
- @property (readwrite, nonatomic, assign) NSInteger tag;
- @property (readwrite, nonatomic, strong) NSDictionary *userInfo;
- @property (nonatomic, copy) NSString *imageUrl;///<网络图片Url, 如果不为空, 则需要根据这个参数判断, 不根据image去进行界面布局判断
- @property (readwrite, nonatomic, strong) UIFont *titleFont;
- @property (readwrite, nonatomic) NSTextAlignment alignment;
- @property (readwrite, nonatomic, strong) UIColor *foreColor;
- @property (readwrite, nonatomic, weak) id target;
- @property (readwrite, nonatomic) SEL action;
- @property (nonatomic, assign) BOOL showBadge;
- + (instancetype)menuTitle:(NSString *)title WithIcon:(UIImage *)icon;
- + (instancetype)menuItem:(NSString *)title image:(UIImage *)image tag:(NSInteger)tag userInfo:(NSDictionary *)userInfo;
- + (instancetype)menuItem:(NSString *)title image:(UIImage *)image target:(id)target action:(SEL)action;
- + (instancetype)menuItme:(NSString *)title ImageUrl:(NSString *)imageUrl target:(id)target action:(SEL)action;///<网络图片兼容模式, 兼容老版本
- /// 构造方法(新增)
- /// @param title 标题
- /// @param image 图片
- /// @param target 事件接收者
- /// @param action 事件
- /// @param userInfo 传参
- + (instancetype)menuItem:(NSString *)title image:(UIImage *)image target:(id)target action:(SEL)action userInfo:(NSDictionary *)userInfo;
- - (void)performAction;
- - (BOOL)enabled;
- @end
|