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 941049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:03:21+00:00 2026-05-15T22:03:21+00:00

I am just getting started with iphone development I have a Tabbed application and

  • 0

I am just getting started with iphone development
I have a Tabbed application and I wanted to display a log in form modally
so i looked here Apple Dev and did this inside one of my view controllers
I connected a button to the following action:

 #import "LoginForm.h"
...
-(IBAction)showLogin{
LoginForm *lf = [[LoginForm alloc]initWithNibName:@"LoginForm" bundle:nil];
lf.delegate = self;
lf.modalPresentationStyle =  UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:lf animated:YES];
}

when I build I get “request for member ‘delegate’ in something not a structure or union”
If I get rid of the second line, it builds but pressing the button does nothing.

What am I missing here?

  • 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-15T22:03:23+00:00Added an answer on May 15, 2026 at 10:03 pm

    Sounds like you haven’t declared a delegate member for LoginForm. You’ll need to add code that lets the UIViewController instance that’s presenting LoginForm modally when LoginForm is done. Here’s how to declare your own delegate:

    In LoginForm.h:

    @class LoginForm;
    
    @protocol LoginFormDelegate
    - (void)loginFormDidFinish:(LoginForm*)loginForm;
    @end
    
    @interface LoginForm {
        // ... all your other members ...
        id<LoginFormDelegate> delegate;
    }
    
    // ... all your other methods and properties ...
    
    @property (retain) id<LoginFormDelegate> delegate;
    
    @end
    

    In LoginForm.m:

    @implementation
    
    @synthesize delegate;
    
    //... the rest of LoginForm's implementation ...
    
    @end
    

    Then in the UIViewController instance that presents LoginForm (let’s call it MyViewController):

    In MyViewController.h:

    @interface MyViewController : UIViewController <LoginFormDelegate>
    
    @end
    

    In MyViewController.m:

    /**
     * LoginFormDelegate implementation
     */
    - (void)loginFormDidFinish:(LoginForm*)loginForm {
       // do whatever, then
       // hide the modal view
       [self dismissModalViewControllerAnimated:YES];
       // clean up
       [loginForm release];
    }
    
    - (IBAction)showLogin:(id)sender {
        LoginForm *lf = [[LoginForm alloc]initWithNibName:@"LoginForm" bundle:nil];
        lf.delegate = self;
        lf.modalPresentationStyle =  UIModalTransitionStyleCrossDissolve;
        [self presentModalViewController:lf animated:YES];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started getting into iPhone development. I have been mish-mashing tutorials and material
I'm just getting started with Mac and iPhone development, and naturally my first step
I have found the Getting Started documents for developing apps on iPhone. I wanted
I am just getting started with iPhone development. I've done some tutorials to get
Just getting started with Android development and Java. So, here's the code I'm working
Just getting started on iPhone dev today and have run through Apple's HelloWorld tutorial:
I am just getting stated with iPhone development and can't seem to find the
Just getting started with C++ here. I am working on OSX with Eclipse CDT.
So just getting started with Azure tables- haven't played with them before so wanted
I am just getting started couchdb and have been looking into writing couch apps.

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.