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

We updating to Autofac 2.4.4 after moving up to MVC3 and are receiving an
I'm just updating some of my code to 2.9.0, and I've run into a
I'm adding activity indicator view before doing some heavy ui updating (pushViewController takes a
I have a page that contains a WebBrowser control that is frequently updating content.
I am having trouble with a NSTextField (or potentially any NSControl) updating it's visible
Question: Why does my .gif load, but not play when updating using GifSourcePropertyChanged ?
Scenario I have an export.php file that remotely exports a 1000 images. It's broken
I have a managedObjectContext for the main application that has a bound NSArrayController and
I have MainActivity which does some Work before it Executes an AsyncTask called Datensammlung.
I have a SQL table that will be accessed by two console apps (.NET).

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.