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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:34:52+00:00 2026-05-26T23:34:52+00:00

This is my hole code which I am using, I want to transfer scrollViewCintroller

  • 0

This is my hole code which I am using, I want to transfer scrollViewCintroller Class value in the page2 class.

scrollAppDelegate.h

@class scrollViewController;
@interface scrollAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
scrollViewController *viewController;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet scrollViewController *viewController;
@end

scrollAppDelegate.m

#import "scrollAppDelegate.h"
#import "scrollViewController.h"

@implementation scrollAppDelegate

@synthesize window;
@synthesize viewController;

#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:     
(NSDictionary *)launchOptions {    

self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];

return YES;
}

scrollViewController.h

#import <UIKit/UIKit.h>
#import "result.h"
#import "page2.h"
@interface scrollViewController : UIViewController{
    IBOutlet UITextField        *txtName; 

}
@property (nonatomic, retain) UITextField        *txtName;
- (IBAction)  next           :(id)sender;

scrollViewController.m

#import "scrollViewController.h"

@implementation scrollViewController
@synthesize txtName;

-(IBAction)next:(id)sender
{
objPage2=[[page2 alloc]initWithNibName:@"page2" bundle:nil];
[self.view addSubview:objPage2.view];       
}
@end

I want to use this txtName in other page2 class
page2.h

#import <UIKit/UIKit.h>
@interface page2 : UIViewController {

}
@end

page.m

#import "page2.h"
@implementation page2
  • 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-26T23:34:53+00:00Added an answer on May 26, 2026 at 11:34 pm
    page1 *obj=[page1 alloc]init];
    

    This is making a new page1 object. None of the variables you have assigned previously will be available. Your page2 object needs to have a pointer to the actual page1 object you have been using before, it should either be passed in when creating page2 or obtained from the navigation controller or similar, it is not possible to say more without knowIng the structure of your app.

    EDIT

    OK, after your additional code I would suggest the following:

    Create a property on your page2 object which refers back to your page 1. Let’s call it page1.

    In your page2.h:

    @property (nonatomic, assign) scrollViewController *page1;
    

    page2.m:

    @synthesize page1;
    

    When you create your page2 object when the button is pressed, pass the text across at this point:

     objPage2.page1 = self;
    

    This line goes between your alloc and when you add it to the subview.

    You will also need to move #import "page2.h" from your scrollViewController.h to your scrollViewController.m, and put @class scrollViewController; in your page2.h, and #import "scrollViewController.h" in your page2.m

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

Sidebar

Related Questions

I'm trying to implement TCP hole punching with windows socket using mingw toolchain. I
GetDllDirectory produces an ambiguous value. When the string this call produces is empty, it
I am having a Password textbox which will have empty value. when the user
Edit: This didn't work because I had: class Animal { ... } class Horse
I can't figure this out. The problem is that the distance, club, cleanclub, hole,
I have found this code to make php file cache and compress. Below is
I'm using a servlet to access the MySQL data. I already have the code
I have the following code which is an implementation of BPM (bipartite matching, from
So basically as my title says, I want to cut a hole in a
Im getting an strange result with this particular code. Let me explain my self

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.