Created
February 28, 2012 21:24
-
-
Save conceptdev/1935253 to your computer and use it in GitHub Desktop.
NSURLConnectionDownloadDelegate binding
This file contains 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
THE OBJECTIVE-C | |
- (void)connection:(NSURLConnection *)connection didWriteData:(long long)bytesWritten totalBytesWritten:(long long)totalBytesWritten expectedTotalBytes:(long long)expectedTotalBytes | |
THE MT BINDING | |
[Export("connection:didWriteData:totalBytesWritten:expectedTotalBytes:")] | |
public void DidWriteData (NSUrlConnection connection, long bytesWritten, long totalBytesWritten, long expectedTotalBytes) { | |
----------- LOG (excerpt) ------------ | |
bytesWritten:11261 | |
totalBytesWritten:48365626720256 | |
expectedTotalBytes:11261 | |
bytesWritten:24480 | |
totalBytesWritten:153506426126336 | |
expectedTotalBytes:98106914285587357 | |
bytesWritten:54720 | |
totalBytesWritten:388527036563456 | |
expectedTotalBytes:98106914285642077 | |
bytesWritten:108000 | |
---------------------------- | |
MY HACK | |
[Export("connection:didWriteData:totalBytesWritten:expectedTotalBytes:")] | |
public void DidWriteData (NSUrlConnection connection, long bytesWritten, IntPtr totalBytesWritten, IntPtr expectedTotalBytes) { | |
----------- LOG (excerpt) ------------ | |
bytesWritten:9837 | |
totalBytesWritten:0 | |
expectedTotalBytes:9837 | |
bytesWritten:24480 | |
totalBytesWritten:0 | |
expectedTotalBytes:34317 | |
bytesWritten:53280 | |
totalBytesWritten:0 | |
expectedTotalBytes:87597 | |
---------------------------- | |
https://developer.apple.com/library/ios/#documentation/Foundation/Reference/NSURLConnectionDownloadDelegate_Protocol/NSURLConnectionDownloadDelegate/NSURLConnectionDownloadDelegate.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment