Skip to content

Commit 5f325a2

Browse files
committed
Fixed formatting of README
1 parent f3df8d4 commit 5f325a2

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## A simple iOS photo browser with optional grid view, captions and selections.
1111

12-
MWPhotoBrowser can display one or more images by providing either `UIImage` objects, or URLs to files, web images or library assets. The photo browser handles the downloading and caching of photos from the web seamlessly. Photos can be zoomed and panned, and optional (customisable) captions can be displayed.
12+
MWPhotoBrowser can display one or more images by providing either `UIImage` objects, or URLs to files, web images or library assets. The photo browser handles the downloading and caching of photos from the web seamlessly. Photos can be zoomed and panned, and optional (customisable) captions can be displayed.
1313

1414
The browser can also be used to allow the user to select one or more photos using either the grid or main image view.
1515

@@ -75,13 +75,14 @@ Then respond to the required delegate methods:
7575
7676
```obj-c
7777
- (NSUInteger)numberOfPhotosInPhotoBrowser:(MWPhotoBrowser *)photoBrowser {
78-
return self.photos.count;
78+
return self.photos.count;
7979
}
8080
8181
- (id <MWPhoto>)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index {
82-
if (index < self.photos.count)
83-
return [self.photos objectAtIndex:index];
84-
return nil;
82+
if (index < self.photos.count) {
83+
return [self.photos objectAtIndex:index];
84+
}
85+
return nil;
8586
}
8687
```
8788

@@ -109,7 +110,7 @@ You can provide a custom action by implementing the following delegate method:
109110

110111
```obj-c
111112
- (void)photoBrowser:(MWPhotoBrowser *)photoBrowser actionButtonPressedForPhotoAtIndex:(NSUInteger)index {
112-
// Do your thing!
113+
// Do your thing!
113114
}
114115
```
115116

@@ -138,9 +139,9 @@ Example delegate method for custom caption view:
138139
139140
```obj-c
140141
- (MWCaptionView *)photoBrowser:(MWPhotoBrowser *)photoBrowser captionViewForPhotoAtIndex:(NSUInteger)index {
141-
MWPhoto *photo = [self.photos objectAtIndex:index];
142-
MyMWCaptionViewSubclass *captionView = [[MyMWCaptionViewSubclass alloc] initWithPhoto:photo];
143-
return captionView;
142+
MWPhoto *photo = [self.photos objectAtIndex:index];
143+
MyMWCaptionViewSubclass *captionView = [[MyMWCaptionViewSubclass alloc] initWithPhoto:photo];
144+
return captionView;
144145
}
145146
```
146147

@@ -151,11 +152,11 @@ The photo browser can display check boxes allowing the user to select one or mor
151152

152153
```obj-c
153154
- (BOOL)photoBrowser:(MWPhotoBrowser *)photoBrowser isPhotoSelectedAtIndex:(NSUInteger)index {
154-
return [[_selections objectAtIndex:index] boolValue];
155+
return [[_selections objectAtIndex:index] boolValue];
155156
}
156157

157158
- (void)photoBrowser:(MWPhotoBrowser *)photoBrowser photoAtIndex:(NSUInteger)index selectedChanged:(BOOL)selected {
158-
[_selections replaceObjectAtIndex:index withObject:[NSNumber numberWithBool:selected]];
159+
[_selections replaceObjectAtIndex:index withObject:[NSNumber numberWithBool:selected]];
159160
}
160161
```
161162

0 commit comments

Comments
 (0)