0

For adding FloatingMenu Action button in swift I used the following

Creating a floating menu in an iOS application

it is fine for showing FloatingMenuAction when we tapped on Floating Button it shows a view like as

enter image description here

Now I want add 1 transparent view as background on current view and also add a button actions/gestures for each menu option.

How can I do this? Thank you in advance

Community
  • 1
  • 1
WeCan
  • 547
  • 2
  • 9
  • 23
  • You can't. ActionButton library dont have this option. ActionButton has ActionButtonItem as menu elements. You must modify all the library to have ActionButton with ActionButton childs.. – Alessandro Ornano May 14 '16 at 13:07
  • @AlessandroOrnano thank you and sorry for lately reply to you. could you please explain in code wise if possible – WeCan May 16 '16 at 10:50
  • I already tried like 1.Add one button on UIViewController 2.and then button action show another UIViewController along with two small container views 3.and each container view have 1 image and 1 label 4.and apply Gesture on image view 5.and then gesture selector method will fired when user tapped on the image. but i am not succeed if any one guide me – WeCan May 17 '16 at 03:52
  • So your question is not clear, please re-write your question with these new informations, after I try to answer to you because now I dont understand what you mean. – Alessandro Ornano May 17 '16 at 07:08
  • @AlessandroOrnano thank you for your reply, My question is clear. I need to simply add gesture/action to above menu item images twitter, google+. – WeCan May 17 '16 at 09:19
  • You've just action to all menu item images handled by ActionButton library..there is no need to put transparent views and add other gestures.. – Alessandro Ornano May 17 '16 at 09:22
  • @AlessandroOrnano yes but not possible for adding addTarget or PerformSelector to menu item images – WeCan May 17 '16 at 09:45
  • Yes it's possible: let google = ActionButtonItem(title: "Google Plus", image: plusImage) google.action = { item in launchMyFunction() } – Alessandro Ornano May 17 '16 at 09:48
  • @AlessandroOrnano above launchMyFunction() method is not fired when user tapped on either google/twitter. is there any delegate notify? I think not needed or am I missed any thing. – WeCan May 17 '16 at 10:43
  • Yes, you can find more details in the GitHub official project example – Alessandro Ornano May 17 '16 at 10:50
  • @AlessandroOrnano actually I added this action button on top of the UITableView. When I tapped on the either google or twitter images then tableview didSelect delegate method will fired. But I don't want to select the cells and just fire action w.r.to the item tapped by the user. – WeCan May 17 '16 at 10:54
  • @AlessandroOrnano sorry and thank you for pointing the function in let google = ActionButtonItem(title: "Google Plus", image: plusImage) google.action = { item in launchMyFunction() } . The method fired when we tapped on either any one of the item in the orginal downloaded project, but not fired in my tableview project. any way thanks for your help – WeCan May 17 '16 at 11:16
  • You're welcome. Finally you solve this question, if you have another problem open another question or modify this with your code – Alessandro Ornano May 17 '16 at 11:54
  • 1
    @AlessandroOrnano thank you and now I am working on this if any issues I will update you ASAP. – WeCan May 17 '16 at 12:29

0 Answers0