Post

Replies

Boosts

Views

Activity

Reply to “Unrecognized selector sent to instance” when calling UIButton.addTarget in a class
Thank you for trying to help me with my problem. The #selector(DropDownMenu.onclick) vs #selector(DropDownMenu.onclick(_:)) makes no difference. When I set the target to self inside of the class, it doesn't cause any error anymore, but it doesn't call the function. The error also comes up when trying to call addTarget from ViewController.let titleButton = UIButton(frame: CGRect(x: 100, y: 300, width: 180, height: 40)) titleButton.backgroundColor = UIColor.white titleButton.setTitle("DropDownMenu", for: .normal) titleButton.setTitleColor(UIColor.black, for: .normal) titleButton.layer.borderWidth = 2 let dp = DropDownMenu(main: titleButton) titleButton.addTarget(self, action: #selector(dp.openDropDown), for: .touchUpInside) The error gets called when I click on the button, not when I call addTarget. The function never gets called though.
Nov ’20
Reply to Core Location API
Core Location Provides a few things like the name, address, zip code, state, street, and country. But not things like phone number. I don't personally use react native, but I feel like with some research you could use CoreLocation with react native, or maybe some other api like google places or yelp fusion, those apis have the possibility to use Javascript. CoreLocation is free to use, just import it in your Xcode project. I hope this answered some of your questions.
Aug ’20