Skip to content
This repository has been archived by the owner on Apr 8, 2018. It is now read-only.

Commit

Permalink
Added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
janckoch committed Jul 14, 2014
1 parent 7e83049 commit 9671129
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ Copy the contents of the FOGMJPEGImageView directory into your project:
- FOGJPEGImageMarker.m
- FOGMJPEGDataReader.h
- FOGMJPEGDataReader.m
- FOGMJPEGImageView.
- FOGMJPEGImageView.h
- FOGMJPEGImageView.m
- FOGMJPEGImageViewDelegate.h

Usage
=====
Expand All @@ -34,6 +35,30 @@ You may halt the MJPEG feed by calling `stop`.
[mjpegImageView stop];
```

If you want to get informed about certain event you can make your class conform to the FOGMJPEGImageViewDelegate
```objective-c
@interface MyClass () <FOGMJPEGImageViewDelegate>
```
Set your class as the delegate of the FOGMJPEGImageView
```objective-c
mjpegImageView.delegate = self;
```

And implement some or all of the given delegate methods from the protocol
```objective-c
- (void)FOGMJPEGImageViewDidReceiveImage:(FOGMJPEGImageView *)mjpegImageView
{
// Handle success.
}

- (void)FOGMJPEGImageView:(FOGMJPEGImageView *)mjpegImageView loadingImgaeDidFailWithError:(NSError *)error
{
// Handle error.
}

```

Maintainers
=======

Expand Down

0 comments on commit 9671129

Please sign in to comment.