ios - How to pass NSURL to view controller from delgate -


so application opens file format. since app running uses applicationwillenterforeground call application:openurl:sourceapplication:annotation:. once have nsurl in delegate previous view opens , have done nsurl.

my app of course using storyboard can't call xib tutorials have do. question how file view controller open , progress it?

you can create property in appdelegate.h file hold nsurl:

@property (nonatomic, string) nsurl *myurl; 

and in

application:openurl:sourceapplication:annotation:

save url new property:

self.myurl = url; 

after can access url every single view controller in app. passing url delegate not solution because when

application:openurl:sourceapplication:annotation:

is called view controller can nil.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -