Latest 0.0.9
Homepage https://github.com/Aster0id/YCXMenuDemo_ObjC
License MIT
Platforms ios 7.0
Frameworks UIKit, QuartzCore

YCXMenuDemo_ObjC

CocoaPods Version
License

TCXMenu is an easy-to-use menu. Reference kxmenu effect

YCXMenu
YCXMenu

Installation

CocoaPods

# Your Podfile
platform :ios, '7.0'
pod 'YCXMenu', '~> 0.0.9'

Manually

  • Drag the YCXMenu folder into your project.
  • Add the QuartzCore framework to your project.

Usage


    //set title
    YCXMenuItem *menuTitle = [YCXMenuItem menuTitle:@"Menu" WithIcon:nil];
    menuTitle.foreColor = [UIColor whiteColor];
    menuTitle.titleFont = [UIFont boldSystemFontOfSize:20.0f];

    //set logout button
    YCXMenuItem *logoutItem = [YCXMenuItem menuItem:@"Logout" image:nil target:self action:@selector(logout:)];
    logoutItem.foreColor = [UIColor redColor];
    logoutItem.alignment = NSTextAlignmentCenter;

    NSArray *items = @[menuTitle,
                     [YCXMenuItem menuItem:@"UserCenter"
                                    image:nil
                                      tag:100
                                 userInfo:@{@"title":@"Menu"}],
                     [YCXMenuItem menuItem:@"CheckOut"
                                    image:nil
                                      tag:102
                                 userInfo:@{@"title":@"Menu"}],
                    logoutItem
                    ];

    [YCXMenu showMenuInView:self.view fromRect:btn.frame menuItems:items selected:^(NSInteger index, YCXMenuItem *item) {
            NSLog(@"%@",item);
    }];

Change

0.0.9

  • 添加+(void)setMenuItemMarginY:方法,可以根据此方法控制菜单中每个元素在垂直方向上的内边距值,默认 12.0f;
  • Add function +(void)setMenuItemMarginY:, you can use this function to set item’s margin, default 12.0f;

0.0.7

  • 添加+(void)setSeparatorColor:方法,可以根据此方法控制分割线的颜色,默认 [UIColor colorWithRed:0.44 green:0.44 blue:0.44 alpha:1];
  • Add function +(void)setSeparatorColor:, you can use this function to set menu’s separator color, default [UIColor colorWithRed:0.44 green:0.44 blue:0.44 alpha:1];

0.0.5

  • 添加+(void)setCornerRadius:(CGFloat)cornerRadius;方法,可以根据此方法控制选择的Item圆角,默认 6.0f;
  • Add function +(void)setCornerRadius:(CGFloat)cornerRadius;, you can use this function to set item’s corner radius, default 6.0f;

  • 添加+(void)setArrowSize:(CGFloat)arrowSize;方法,可以根据此方法控制选择的Item箭头尺寸,默认 10.0f;
  • Add function +(void)setArrowSize:(CGFloat)arrowSize;, you can use this function to set item’s arrow size, default 10.0f;

0.0.4

  • 添加+(UIColor*)setSelectedColor方法,可以根据此方法控制选择的Item颜色,默认蓝色;
  • Add function +(UIColor*)setSelectedColor;,you can use this function to set item’s selected Color,default blue;

0.0.3

  • 添加 +(BOOL)isShow 方法, 可以根据此方法手动控制YCXMenu的显示和隐藏;
  • Add function +(BOOL)isShow, you can set show or hide YCXMenu expediently;

Thanks

XFerris

Licenses

MIT License.

Latest podspec

{
    "name": "YCXMenu",
    "version": "0.0.9",
    "summary": "TCXMenu is an easy-to-use menu.",
    "homepage": "https://github.com/Aster0id/YCXMenuDemo_ObjC",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "aster0id",
    "social_media_url": "http://weibo.com/aster0id",
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/Aster0id/YCXMenuDemo_ObjC.git",
        "tag": "0.0.9"
    },
    "source_files": "YCXMenuDemo_ObjC/YCXMenu/*.{h,m}",
    "frameworks": [
        "UIKit",
        "QuartzCore"
    ]
}

Pin It on Pinterest

Share This