ios - Pass Integer to another UIView -


i'm trying pass integer variable 1 uiview another. basically, have 2 uiview controllers set up. first uiviewcontroller has integer called "page" , seconds uiviewcontroller has integer called "page_num".

what trying pass variable int "page" int "page_num". following error:

property 'page_num' not found on object of type 'imageviewer *'....

here code (header file):

imageviewer *seccondata; @property (nonatomic, retain) imageviewer *seconddata; 

here code (implementation file):

imageviewer *screen = [[imageviewer alloc] initwithnibname:nil bundle:nil]; self.seconddata = screen; seconddata.page_num = page; screen.modaltransitionstyle = uimodaltransitionstylecrossdissolve; [self presentviewcontroller:screen animated:yes completion:nil]; 

what doing wrong? code have shown above worked when wanted pass nsstring 1 uiviewcontroller another.

imageviewer *screen = [[imageviewer alloc] initwithnibname:nil bundle:nil]; screen.page_num = page; [self presentviewcontroller:screen animated:yes completion:nil]; 

try , no need create property.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -