Sharing same properties of ViewController for iPhone Stroryboard and iPad Story Board
        Posted  
        
            by 
                Ruhul Amin
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Ruhul Amin
        
        
        
        Published on 2014-08-22T04:17:24Z
        Indexed on 
            2014/08/22
            4:20 UTC
        
        
        Read the original article
        Hit count: 279
        
I'm developing a universal application. in the first view, I have the login screen for the user. In iPhone storyBoard, I have added 2 text field and one button( login check). I have added properties in ViewController.h file by dragging those objects(Ctrl key + Dragg) to .h file. I have added code for login check and it is working fine for iPhone.
This is the code in ViewController.h
@property (strong, nonatomic) IBOutlet UITextField *txtUserId;
@property (strong, nonatomic) IBOutlet UITextField *txtUserPwd;
@property (strong, nonatomic) IBOutlet UIButton *btnLogin;
In the iPad storyBoard, I have added 2 text field( userid and password) and i button for login. So now, I want to bind those objects with the veriable which I declared already in ViewController.h file in case of iPhone.
My questions: 1. What is the right way to bind properties for both storyboard? 2. Am I on the right direction or should I think in a different way to do it?
I am new with iPhone development. Please help.
Thanks. --Amin
© Stack Overflow or respective owner