ImageView is defined in class named Third
- (void)viewDidLoad
{
// Displays UIImageView
UIImageView* ImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 5, 300, 235)];
self.view.backgroundColor = [UIColor brownColor];
// load all the frames of our animation
ImageView.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"3a.png"],
[UIImage imageNamed:@"3b.png"],
nil];
// all frames will execute in 24 seconds
ImageView.animationDuration = 24;
// start animating
[ImageView startAnimating];
ImageView.layer.borderWidth = 2;
ImageView.layer.borderColor = [[UIColor whiteColor]CGColor];
[ImageView.layer setMasksToBounds:YES];
[ImageView.layer setCornerRadius:15.0f];
[self.view addSubview:ImageView]; }
How can i get reference of this image view.layer from this third class to another class.
Basically i want to use pause layer and resume layer for image view animation.
To use
[self pauseLayer:myImageView.layer]; // Pause the CALayer of the UIImageView
I should have reference some thing like this but don't know how to implement it in viewdidload of third class or where to implement it in third class or in another class.
UIImageView *myImageView = [OtherClass getTheImageView];
So looking for some help.
Thanks.