Tuesday 17 December 2013

Transfer value one view to another view in Iphone

1st.h

----------------------------------------------------------------------------------------------------
@class SecondVC;
@property (strong, nonatomic) SecondVC *svc;

- (IBAction)clickPressed:(id)sender;

1st.m

--------------------------------------------------------------
#import "SecondVC.h"

- (IBAction)clickPressed:(id)sender
{
    _svc = [[SecondVC alloc] initWithNibName:@"SecondVC" bundle:nil];
  
    _svc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
  
    [self presentViewController:_svc animated:YES completion:nil]; 
    
}

secondVc.h

--------------------------------------------------------------
- (IBAction)backPressed:(id)sender;

secondVC.m

--------------------------------------------------------------
- (IBAction)backPressed:(id)sender
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

No comments:

Post a Comment

Comment