I need to data from one ViewController to another ViewController Here I've Multiple Textfields in first ViewController then it will passed the SecondViewController in Whatever Data i entered in FirstViewController. Can You Please suggest me.
            Asked
            
        
        
            Active
            
        
            Viewed 1,609 times
        
    -3
            
            
        - 
                    maybe you should implement a proper _model-layer_ instead of using the _user defaults_ – because the _user defaults_ is not for transferring massive amount of data in runtime. – holex Nov 27 '14 at 12:34
2 Answers
2
            
            
        You can also use property for this... Because It's easy ..
Make NSMutableDictionary type Property in  another ViewController and send from first ViewController 
Make this type property in your second viewcontroller
  @property (nonatomic,retain) NSMutableDictionary *textFieldDataDic;
and send data from first viewcontroller like this
NSMutableDictionary *textFieldData = [[NSMutableDictionary alloc]init];
 [textFieldData setValue:textfield1 forKeyPath:@"textF1"];
 [textFieldData setValue:textfield2 forKeyPath:@"textF2"];
ViewController *secondView = [[ViewController alloc]init];
secondView.textFieldDataDic = textFieldData;
[self.navigationController pushViewController:secondView animated:YES];
 
    
    
        Jogendra.Com
        
- 6,394
- 2
- 28
- 35
2
            this is for storing
NSString  *verifyStatus=@"Y";
[[NSUserDefaults standardUserDefaults]setObject:verifyStatus forKey:@"verify_status"];
[[NSUserDefaults standardUserDefaults] synchronize];
for retrieving
 NSString *verify_status = [[NSUserDefaults standardUserDefaults]stringForKey:@"verify_status"];
 
    
    
        Anbu.Karthik
        
- 82,064
- 23
- 174
- 143
