iOS 可拖拽菜單:OECentreMenu
OECentreMenu 是一個可在屏幕中心拖拽動畫菜單的簡單解決方案。
UIButton *button1 = [[UIButton alloc] init]; [button1 setBackgroundImage:[UIImage imageNamed:@"quaver.png"] forState:UIControlStateNormal]; [button1 addTarget:self action:@selector(buttonPressed) forControlEvents:UIControlEventTouchUpInside]; button1.backgroundColor = [UIColor redColor]; . . . UIButton *button6 = [[UIButton alloc] init]; [button6 setBackgroundImage:[UIImage imageNamed:@"quaver.png"] forState:UIControlStateNormal]; [button6 addTarget:self action:@selector(buttonPressed) forControlEvents:UIControlEventTouchUpInside]; button6.backgroundColor = [UIColor yellowColor]; NSArray *myButtons = @[button1, button2, button3, button4, button5, button6]; OECentreMenu *menu = [[OECentreMenu alloc] initInViewController:self withButtons:buttons thatHasTabBar:YES]; // Alternatively the line below can be used to specify the vertical offset of the Menu //OECentreMenu *menu = [[OECentreMenu alloc] initInViewController:self withButtons:buttons andVerticalOffset:90];
本文由用戶 byb1234 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!