ios5 - How can I pass a variable through a segue? -


is possible pass value of double (for example) through segue? given sample code, i'm trying pass value of uistepper (a double) through segue view. know have declare double on other controller, i'm not sure if possible. have declare in other view controller make work?

thanks in advance.

-pauls.

-(void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender {     if ([[segue identifier] isequaltostring:@"home2segue"])      {         double classlength = stepperclasstime.value;          home_1_viewcontroller *vc = (home_1_viewcontroller *)[segue destinationviewcontroller];          vc.classlength = classlength;        }  } 

that should work fine if add classlength property in home_v1_viewcontroller class:

header file (.h):

@property (nonatomic) double classlength; 

implementation file (.m):

@synthesize classlength; 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -