How do you connect the “delegate” of the Picker Wheel to the interface? This seemed so simple in the tutorial, but in Xcode there is no “pickerview delegate” button I can use to drag to interface.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Welcome to stack overflow!
You need to connect the delegate to the
pickerView, even though there is no spesific button for it. Just right-click the orange square box beside your interface builder, and press downCTRLwhile you drag ‘New referencing outlet’ to the picker. When you drop the line on the picker, there will be an option to add pickerView delegate and datasource! 🙂You will need to implement the delegates in your header file aswell, like this: