Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6388975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:20:47+00:00 2026-05-25T03:20:47+00:00

Up until updating Xcode last night, this was working great (though probably through sheer

  • 0

Up until updating Xcode last night, this was working great (though probably through sheer dumb luck!).

I’m getting an error now for my UITextViews, Fields and UIPickerViews when assigning the delegate:

[m_textField setDelegate:GAMESTATE->glView.self];

m_textField is defined as UITextField*. glView is defined as a UIView*. To keep things simple, I’m using just one UIView for the entire app (could also be a problem). I only need access to a couple of basic operations in the app to get simple text info from the user. Now I get the error:

Cannot initialize a parameter of type 'id<UITextFieldDelegate>' with an rvalue of type 'UIView*'

Like I said, I probably was doing something wrong in the first place, and it only worked through sheer, dumb luck! If it helps, I’m already subclassing my UIView as an Accelerometer Delegate, as such:

@interface GLView : UIView <UIAccelerometerDelegate>

Any help, suggestions or tips would be greatly appreciated. I’ve stumbled through some books this morning and brushed up on several Apple docs, but a quick work-around doesn’t seem possible. I’m not adverse to refactoring the way I take input from the user, I could just use a hand getting there.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:20:47+00:00Added an answer on May 25, 2026 at 3:20 am

    You should create, for example, NSObject that will delegate

    1. for UITextView : UITextViewDelegate.
    2. for UIPickerView : UIPickerViewDelegate

    Your class declaration should look like this:

    @interface MyViewDelegator:NSObject<UITextViewDelegate, UIPickerViewDelegate>
    

    Then you should alloc+init it and set it as delegator of your text/picker views:

    MyViewDelegator *delegator = [[MyViewDelegator alloc] init];
    [m_textField setDelegate:delegator];
    

    Don’t forget to implement appropriate methods in MyViewDelegator that are not optional for protocols.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not having much luck with updating an app widget with AlarmManager generated broadcasts.
I am going to start updating this to help those seeking to use this
I have controls which are not updating their bound object's respective properties until focus
I have a WordPress self hosted blog which was down until last week. After
This is for an ASP.NET MVC 3 application and deals with updating children nodes
Im am currently coding an application for auto updating ccleaner. Everything worked well until
Until Office 2007, Excel has a maximum of 65,000 rows. Office 2007 bumped that
Until now I've always used the ASP.NET MVC framework source for debugging ASP.NET MVC.
Until recently I'd considered myself to be a pretty good web programmer (coming up
Until Windows Vista, ATI and nVidia supported a feature called horizontal span, which combined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.