[Solved] Int Value from MainViewController to UIImageView Class [closed]


The answer given by JoeFryer is one idea or else you can also use NSNotificationCenter.

It works as below.

Put this in ImageviewController Tap Action.

[[NSNotificationCenter defaultCenter] postNotificationName:@"countUp" object:nil userInfo:nil];

Put this in MainViewController‘s ViewDidLoad method.

[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(increaseCount) name:@"countUp" object:nil];

and also this method

-(void)increaseCount{
    //Here You can increase the count
    count++;
}

Hope this will help you.

0

solved Int Value from MainViewController to UIImageView Class [closed]