Created
August 7, 2014 00:59
-
-
Save pa-w/62b69a237270190303ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static NSUrl URLForResource (this NSBundle source, string for_resource, string with_extension) { | |
var ns_for = new NSString(for_resource); | |
var ns_extension = new NSString(with_extension); | |
//try and get the resource | |
var result = Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr( | |
source.Handle, | |
NSBundleExtensions._Selector_URLForResource, | |
ns_for.Handle, | |
ns_extension.Handle); | |
//return back as a NSUrl | |
return Runtime.GetNSObject(result) as NSUrl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment