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

  • Home
  • SEARCH
  • 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 8976313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:06:09+00:00 2026-06-15T19:06:09+00:00

I am beginner with Objective-C. So I write my app using C# + Monotouch.

  • 0

I am beginner with Objective-C. So I write my app using C# + Monotouch. Now I need to use third-party library TTTAttributedLabel written in ObjC. It is neccessary to bind it’s code to C#. There is some interesting construction:

@protocol TTTAttributedLabel <NSObject>
@property (nonatomic, copy) id text;
@end

@interface TTTAttributedLabel : UILabel <TTTAttributedLabel, UIGestureRecognizerDelegate>
/* some code here */
@end

It is clear to me about TTTAttributedLabel and UILabel inheritance. I did it this way:

[BaseType (typeof (NSObject))]
interface TTTAttributedLabel{
     // code here
}

[BaseType (typeof (UILabel))]
interface UITextField : TTTAttributedLabel{
}

But I don’t know how to inherite UIGestureRecognizerDelegate, because in Objective-C it is a protocol but in Monotouch it is a class. So I can not inherite interface from class.

What is the correct way to do this?

  • 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-06-15T19:06:10+00:00Added an answer on June 15, 2026 at 7:06 pm

    In this case, what the UIGestureRecognizerDelegate means is that the object will conform to the protocol, and as you noticed, we mapped protocols to classes which prevents this from working.

    But at the core what this does is allow instance sof TTTAttributedLabel to be passed to a UIGestureRecognizer’s Delegate property.

    For these cases, you can instead use the WeakDelegate, which will not perform C#-level type checking and allow you to assign the instance of TTTAttributedLabel to a UIGestureRecognizer.WeakDelegate property.

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

Sidebar

Related Questions

I'm a Objective-C beginner and now I want to loop trough an array and
I want to recognize uppercase letters using objective-c. I have an implementation now that
Objective-C/iPhone beginner here...looking for a shove in the right direction. I need to create
Im a beginner so please bear with me... In my app using xcode and
I'm a beginner in Objective-C, and I decided to try to write some simple
I'm an objective-c beginner and I was assigned to create an iPhone app for
I am a beginner of Objective C and XCode. I use Mac os X
I'm a beginner at Objective-C programming and I need to access data stored in
i've been doing a thing here using objective-c, but i'm a beginner in this
I am a beginner in i phone development.I am,right now, using web service to

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.