tags:

views:

17

answers:

1

hi all

in one .m file i have these codes.

i want to set num variable ( int num ) to static variable i. static int i = num;

#import "RecentView.h"

@implementation RecentView

static int i=0;

- (void)viewDidLoad {

//some code here ...

 //int num = [latest intValue];

int num = 10 ;//for example

[super viewDidLoad];
}
A: 

problem solved.

i should define a method in implementation which can change the value of i variable.then calling this method in viewDidload .

Naeim