Kxmenu drop-down menu

Source: Internet
Author: User

+ (void) CreateMenu: (IDSender target: (Uiviewcontroller *) t{Nsarray*menuitems =@[[Kxmenuitem menuItem:@"send to a friend"Image:[uiimage imagenamed:@"menu_weixin"] target:t action: @selector (Sharetofriend)], [Kxmenuitem menuItem:@"share to a circle of friends"Image:[uiimage imagenamed:@"menu_weixin_circle"] target:t action: @selector (Sharetocircle)], [Kxmenuitem menuItem:@"shake with a hand"Image:[uiimage imagenamed:@"Menu_shake"] target:t action: @selector (Shakeandshake)], [Kxmenuitem menuItem:@"Check for Updates"Image:[uiimage imagenamed:@"menu_checkupdate"] target:t action: @selector (Checkupdate)], [Kxmenuitem menuItem:@"View Feedback"Image:[uiimage imagenamed:@"Menu_feedback"] target:t action: @selector (Initfeedback)], [Kxmenuitem menuItem:@"about Flash Cool"Image:[uiimage imagenamed:@"Menu_about"] target:t action: @selector (Aboutshanku)]; if(IS_IOS7) {MenuItems=@[[Kxmenuitem menuItem:@"send to a friend"Image:[uiimage imagenamed:@"menu_weixin"] target:t action: @selector (Sharetofriend)], [Kxmenuitem menuItem:@"share to a circle of friends"Image:[uiimage imagenamed:@"menu_weixin_circle"] target:t action: @selector (Sharetocircle)], [Kxmenuitem menuItem:@"shake with a hand"Image:[uiimage imagenamed:@"Menu_shake"] target:t action: @selector (Shakeandshake)], [Kxmenuitem menuItem:@"sweep It with a glance"Image:[uiimage imagenamed:@"Menu_qrcode"] target:t action: @selector (Scanandscan)], [Kxmenuitem menuItem:@"Check for Updates"Image:[uiimage imagenamed:@"menu_checkupdate"] target:t action: @selector (Checkupdate)], [Kxmenuitem menuItem:@"View Feedback"Image:[uiimage imagenamed:@"Menu_feedback"] target:t action: @selector (Initfeedback)], [Kxmenuitem menuItem:@"about Flash Cool"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];}
//Shake a shake+ (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];}//adjusting the camera+ (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 {            }    }//share to a circle of friends+ (void) sharetofriendcircle{skappdelegate*appdelegate = (Skappdelegate *) [[UIApplication sharedapplication]Delegate];    [Appdelegate Changescene:wxscenetimeline];    [Appdelegate sendlinkcontent]; [MobclickEvent:@"sharetocircle"];}+ (void) sharetofriend{skappdelegate*appdelegate = (Skappdelegate *) [[UIApplication sharedapplication]Delegate];    [Appdelegate changescene:wxscenesession];    [Appdelegate sendlinkcontent]; [MobclickEvent:@"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@"is already the latest version" Delegate: Self Cancelbuttontitle:@"Cancel"Otherbuttontitles:nil, nil];    [Alertview show]; }    }+ (NSString *) getbundleversion{NSString*version = [[[NSBundle Mainbundle] infodictionary] Objectforkey: (NSString *) Kcfbundleversionkey]; returnversion;}

Kxmenu drop-down menu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.