+ (void)createMenu:(id)sender target:(UIViewController *)t
{
NSArray *menuItems =
@[ [KxMenuItem menuItem:@"发送给朋友" image:[UIImage imageNamed:@"menu_weixin" ] target:t action:@selector(shareToFriend)],
[KxMenuItem menuItem:@"分享到朋友圈" image:[UIImage imageNamed: @"menu_weixin_circle"] target:t action:@selector(shareToCircle)],
[KxMenuItem menuItem:@"随手摇一摇" image:[UIImage imageNamed: @"menu_shake"] target:t action:@selector(shakeAndShake)],
[KxMenuItem menuItem:@"检查更新" image:[UIImage imageNamed: @"menu_checkupdate"] target:t action:@selector(checkUpdate)],
[KxMenuItem menuItem:@"意见反馈" image:[UIImage imageNamed: @"menu_feedback"] target: t action:@selector(initFeedBack)],
[KxMenuItem menuItem:@"关于闪酷" image:[UIImage imageNamed: @"menu_about"] target:t action:@selector(aboutShanku)], ]; if (IS_IOS7) {
menuItems =
@[ [KxMenuItem menuItem:@"发送给朋友" image:[UIImage imageNamed:@"menu_weixin" ] target:t action:@selector(shareToFriend)],
[KxMenuItem menuItem:@"分享到朋友圈" image:[UIImage imageNamed: @"menu_weixin_circle"] target:t action:@selector(shareToCircle)],
[KxMenuItem menuItem:@"随手摇一摇" image:[UIImage imageNamed: @"menu_shake"] target:t action:@selector(shakeAndShake)],
[KxMenuItem menuItem:@"随手扫一扫" image:[UIImage imageNamed: @"menu_qrcode"] target:t action:@selector(scanAndScan)],
[KxMenuItem menuItem:@"检查更新" image:[UIImage imageNamed: @"menu_checkupdate"] target:t action:@selector(checkUpdate)],
[KxMenuItem menuItem:@"意见反馈" image:[UIImage imageNamed: @"menu_feedback"] target: t action:@selector(initFeedBack)],
[KxMenuItem menuItem:@"关于闪酷" image:[UIImage imageNamed: @"menu_about"] target:t action:@selector(aboutShanku)], ];
} UIView *targetView = (UIView *)[sender performSelector:@selector(view)];
CGRect _rect = targetView.frame;
_rect.origin.y = _rect.origin.y + ;
CGRect rect = _rect; [KxMenu showMenuInView: t.navigationController.view fromRect: rect menuItems:menuItems];
}
// 摇一摇
+ (void) shakeToShake: (NSNotification *) notification
{
NSDictionary *info = [notification userInfo];
SKShakeViewController *shakeView = [[SKShakeViewController alloc] init]; [[info objectForKey:@"controller"] pushViewController:shakeView animated:YES];
} + (void) scanAndScan: (NSNotification *) notification
{
[self setupCamera: notification];
} // 调起相机
+ (void)setupCamera: (NSNotification *) notification
{
NSDictionary *info = [notification userInfo];
if (IS_IOS7) {
SKScanViewController *scan = [[SKScanViewController alloc] init]; [[info objectForKey:@"controller"] presentViewController:scan animated:YES completion:^{ }];
} else { } } // 分享到朋友圈
+ (void) shareToFriendCircle
{ SKAppDelegate *AppDelegate = (SKAppDelegate *)[[UIApplication sharedApplication] delegate];
[AppDelegate changeScene:WXSceneTimeline];
[AppDelegate sendLinkContent];
[MobClick event:@"shareToCircle"];
} + (void) shareToFriend
{
SKAppDelegate *AppDelegate = (SKAppDelegate *)[[UIApplication sharedApplication] delegate];
[AppDelegate changeScene:WXSceneSession];
[AppDelegate sendLinkContent];
[MobClick event:@"shareToFriend"];
} + (void)aboutShanku: (NSNotification *) notification
{
NSDictionary *info = [notification userInfo];
SKAboutViewController *about = [[SKAboutViewController alloc] init];
[[info objectForKey:@"controller"] pushViewController:about animated:YES];
} + (void) checkUpdate
{
[MobClick checkUpdateWithDelegate:self selector:@selector(isUpdate:)];
} + (void)isUpdate:(NSDictionary *)appInfo
{ if ([[appInfo objectForKey:@"update"] isEqualToString:@"NO"]) {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"" message:@"已经是最新版本" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:nil, nil];
[alertView show];
} } + (NSString *) getBundleVersion
{
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey];
return version;
}

KxMenu下拉菜单的更多相关文章

  1. 初学者--bootstrap(六)组件中的下拉菜单----在路上(10)

    组件---下拉菜单 用于显示链接列表的可切换.有上下文的菜单.下拉菜单的 JavaScript 插件让它具有了交互性. 将下拉菜单触发器和下拉菜单都包裹在 .dropdown 里,或者另一个声明了 p ...

  2. Bootstrap3系列:按钮式下拉菜单

    1. 基本实例 把按钮放入 .btn-group 中,加入适当的菜单标签,让按钮触发下拉菜单. 1.1 示例代码 <div class="btn-group"> < ...

  3. Bootstrap3系列:下拉菜单

    1.引用Bootstrap 示例引用的Bootstrap版本:v3.3.7 <script src="~/Scripts/jquery-2.2.4.min.js">&l ...

  4. 如何在webapp中做出原生的ios下拉菜单效果

    github:https://github.com/zhoushengmufc/iosselect webapp模仿ios下拉菜单 html下拉菜单select在安卓和IOS下表现不一样,iossel ...

  5. Html5+Css3制作下拉菜单的三种方式

    一.渐变式改变ol的高度 1.外部为ul标签,在每个li里嵌套一个ol列表2.设置外部li左浮动,内部ol标签绝对定位,外部li标签相对定位3.设置ol的高为0,溢出隐藏4.外部li标签:hover ...

  6. IOS第二天-新浪微博 - 添加搜索框,弹出下拉菜单 ,代理的使用 ,HWTabBar.h(自定义TabBar)

    ********HWDiscoverViewController.m(发现) - (void)viewDidLoad { [super viewDidLoad]; // 创建搜索框对象 HWSearc ...

  7. JS实现带复选框的下拉菜单

    这段时间在做后台的时候需要一个可以复选的下拉菜单,用到的是easyUI中的combo的Demo,先看看官方easyUI:http://www.jeasyui.com/documentation/ind ...

  8. 可控制导航下拉方向的jQuery下拉菜单代码

    效果:http://hovertree.com/texiao/nav/1/ 代码如下: <!DOCTYPE html> <html> <head> <meta ...

  9. jquery实现多级下拉菜单

    支持多种浏览器,体验效果:http://keleyi.com/keleyi/phtml/jqmenu/4.htm 多级菜单,理论上支持无限多的层级,文件结构非常简单的,以下是完整代码: <!DO ...

随机推荐

  1. IT客学院《构建高转化率的着陆页-PS+HTML+网络营销》共25节【价值199元】无水印版

    课程简介本课程是全网独家专业的着陆页课程,课程完整的再现了整个着陆页实战案例的开发过程,包括:策划.设计和实现.上线后的推广.优化及提高转化率的技巧等,本套课程能帮助您迅速掌握着陆页的能力,迅速洞察完 ...

  2. PagerIndicator主题样式修改

    默认的黑色好丑 所以大家需要动手改造一下, 1 打开 Manifest.xml <activity android:name="com.zb.zhihuianyang.MainActi ...

  3. [CareerCup] 4.2 Route between Two Nodes in Directed Graph 有向图中两点的路径

    4.2 Given a directed graph, design an algorithm to find out whether there is a route between two nod ...

  4. [CareerCup] 11.2 Sort Anagrams Array 异位词数组排序

    11.2 Write a method to sort an array of strings so that all the anagrams are next to each other. 这道题 ...

  5. 信息安全系统设计基础实验五:简单嵌入式 WEB 服务器实验 (20135229,20135234)

    http://www.cnblogs.com/mqy123/p/5002683.html

  6. 如何下载Hibernate

    官网: http://hibernate.org/ 打开hibernate官网,选择Hibernate ORM,点击左侧的Downloads 点击Downloads后,可以看到如下页面,右侧是各个版本 ...

  7. libtool: Version mismatch error 解决

    在编译一个软件的时候,在 ./configure 和 make  之后可能会出现如下错误: libtool: Version mismatch error.  This is libtool 2.4. ...

  8. grootJs属性扩展 groot.bindExtend

    index12.html <html><head> <title>grootJs属性扩展 groot.bindExtend</title> <sc ...

  9. 求根号m(巴比伦算法)

    巴比伦算法是针对求根号m的近似值情况的,它的思想是这样的: 设根号m=X0,则如果枚举有答案X(X<X0),则m/X>X0,当精度要求不高的时候,我们可以看成X=m/X=X0,而如果精度要 ...

  10. WCF入门(8)

    前言 昨天买的usb无线路由到了,笔记本又可以愉快的上网了. 下午去办市民卡,被告知说“本人医保现在停保,要等继续缴才行”,白公交坐了那么远的路. 需要视频的进群,378190436. 第八集 Dif ...