In the MainViewController .h
file:
-(void)startTrackingParking:(int)hour :(int)minute :(int)second;
In the MainViewController .m
file:
-(void)startTrackingParking:(int)hourTrack :(int)minuteTrack :(int)secondTrack {
NSLog(@"%d %d %d",hourTrack,minuteTrack,secondTrack);
//Set buttons alpha to 0
self.extendParking.alpha = 0;
self.bannerCancelButton.alpha = 0;
self.timeLeftLabel.alpha = 0;
}
In my other class I then do:
MainViewController *class = [[MainViewController alloc]init];
[class startTrackingParking:hourTrack :minuteTrack :secondTrack];
For some reason the NSlog
calls, but the buttons alpha do not get updated? Why is this happening? Is this the wrong way to pass data between classes and call methods?