ipad - can't access UIView from UIViewController -
i have problem access view methods uiviewcontroller. started programming in xcode 2 weeks ago , have modify program made other person.
the uiview drag , drop in interface builder in .xib of uiviewcontroller , initialized method initwithframe , drawrect. view contains nstimer need stop when user click on button close of navigation bar.
so have ibaction in uiviewcontroller activated when button close pressed. , method should launch 1 of uiview's method doesn't work. xcode detects no error or warning code of uiview never ran. when launch application, works fine this.
uiview.h:
@interface clock3d : uiview {
...
nstimer *timer;
nstimer *timers;
}
...
@property (retain, nonatomic) nstimer *timer;
@property (retain, nonatomic) nstimer *timers;
...
-(void) donetest;
@end
uiview.m:
@implementation clock3d
@synthesize timer, timers, ...
...
-(void) donetest{nslog(@"arret timers");
[timers invalidate];
nslog(@"arret timer");
[timer invalidate];}
uiviewcontroller.h:
import "clock3d.h"
@class clock3d;
@interface popup360 : uiviewcontroller {
...
clock3d *clock3d;
}
...
@property(retain, nonatomic) iboutlet clock3d *clock3d; ...
-(ibaction) done;@end
uiviewcontroller.m:
@implementation popup360
@synthesize ..., clock3d;-(ibaction) done{
[clock3d donetest];
[self dismissmodalviewcontrolleranimated:yes];
}
so command [clock3d donetest] doesn't work (nslog donetest never appear in log) command [self dismissmodalviewcontrolleranimated:yes]; works.
thank response.
in ib check type of property view
of popup360. if sets uiview
change clock3d
.
Comments
Post a Comment