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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:10:13+00:00 2026-05-25T10:10:13+00:00

I have one controller inheriting UITableViewController, and call the object as below editAlarm *ob

  • 0

I have one controller inheriting UITableViewController, and call the object as below

        editAlarm *ob = [[editAlarm alloc] initWithStyle:UITableViewStyleGrouped];
        UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:ob];
        ob.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
        [self presentModalViewController:nc animated:YES];
        [ob release];
        ob =  nil;
        [nc release];
        nc = nil;

now the table will initialized with groupstyle, but I want an object with it my data as normally I do in many of my projects

-(id)initwithData:(myFaceData *)dat{
id i=[super init];
self.data=dat; where data is object having some variables in it
return i;
 }


    myFaceData *data=[myArray objectAtIndex:tag];
    editAlarm *ob = [[editAlarm alloc] initwithData:data];
[self.navigationController pushViewController:details animated:NO];

Now How can I do two init at same time, what is solution so that my object will pass along with init of new class(Controller)

If someone is not clear about question, then feel free to ask in comments

Thanks in Advance 🙂

  • 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-25T10:10:14+00:00Added an answer on May 25, 2026 at 10:10 am

    What you could do is make your data variable a Property (and synthesise it) so you can set it right after you init it in the class you are initialising it.

    Alternatively you could create your own init method as follows:

    - (id)initWithStyle:(UITableViewStyle)style andData:(myFaceData *)dat {
        if ((self = [super initWithStyle:style])) {
            self.dat = dat;
        }
    
        return self;
    }
    

    And to call your initialiser you could do this in the calling class (where theData is the data to be passed across):

    editAlarm *ob = [editAlarm alloc] initWithStyle:UITableViewStyleGrouped andData:theData];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a controller method that returns a jSON object and in one calling
I have one question regarding domain account. I have one domain controller where all
I have an integer variable ( time ) in one view controller whose value
I have the CakePHP stack in /var/www/site from one view under controller A I
Say you have several webparts, one as a controller and several which take information
When submitting one form from view, how can i also read or have controller
Can somebody explain me one thing. I have two methods in my controller :
I'm running Spring MVC 3.x and I have one Controller with RequestMapping annotations (
In a tab bar based application, If I have one controller pushed in the
I have one View and one Controller in my ASP.net MVC Application. I have

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.