ios - when i push viewcontroller in navigation controller, shows black screen - empty view -


i tried using storyboard instantiateviewcontrollerwithidentifier , working fine needed delegate method added below code when opening secondviewcontroller firstviewcontroller,

secondviewcontroller *svc=[[seconviewcontroller alloc] init]; svc.delegate=self; [self.navigationcontroller pushviewcontroller:svc animated:yes]; 

but opens black screen.any sort appreciated. thank you.

secondviewcontroller.h file

@protocol senddatatoaudiodelegate <nsobject>  -(void)senddata:(nsmutablearray *) data; @end  @interface audiosavedfilesviewcontroller : uiviewcontroller <uitableviewdatasource, uitableviewdelegate>  @property (strong, nonatomic) iboutlet uitableview *filetable; @property (strong, nonatomic)  nsmutablearray *selectedindices; @property (strong, nonatomic) avaudioplayer *audioplayer; - (ibaction)selectedfiles:(id)sender; @property (nonatomic,assign)id <senddatatoaudiodelegate> delegate;  @end 

here:

secondviewcontroller *svc= [self.storyboard instantiateviewcontrollerwithidentifier @"identifier"];  svc.delegate=self; 

you trying set secondviewcontroller's delegate property. error getting when doing so:

property delegate not found on object type 'uiviewcontroller'

suggest secondviewcontroller class not have property called delegate. hence need:

@interface secondviewcontroller  @property (nonatomic, assign) id delegate;  @end 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -