Get nul value from one ViewController to one ViewController
Posted
by
sovannarith
on Stack Overflow
See other posts from Stack Overflow
or by sovannarith
Published on 2012-09-27T03:29:18Z
Indexed on
2012/09/27
3:37 UTC
Read the original article
Hit count: 197
ios
I have 2 ViewControllers namely V1 and V2. I want to pass value from V2 to V1 but I get value 0 for countV1 in V1. I saw more questions in stackoverflow but I can't deal with this small problem. I use ARC.
In V1
.h file
@property(nonatomic,unsafe_unretained) int countV1;
.m file
@synthesize countV1;
In V2
.m file
int countV2 = 1;
V1 *v1 = [V1 alloc] initWithNibName:@"V1" bundle:nil];
v1.countV1 = countV2;
© Stack Overflow or respective owner