ios - Calling method from different UIViewController -


i attempting clear uibezierpath uiview. have class called linearsig has drawing functionality. (from tutorial followed) have following method inside linearsig:

- (void)clearsig {     nslog(@"clear");     path = nil;       incrementalimage = nil;     path = [uibezierpath bezierpath];      [self setneedsdisplay]; } 

when call method sigviewcontroller nslog statements gets called , prints console, path not cleared. if call method within linearsig, lets after touches method, method works perfect. gets erased.

i calling method different view controller because inside custom uialertview.

this how i'm calling method

- (ibaction)clearsig:(id)sender {     self.ls = [[linearsig alloc] init];     [self.ls clearsig]; } 

ls property have declared. idea why not working?

you're creating new instance of linearsig clearing that. need point instance of linearsig you're trying clear graph off of.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -