Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Commit aa61cf2

Browse files
authored
Merge pull request #152 from wordpress-mobile/update_readme_for_0.12
Update the README to match new architecture
2 parents aebbd35 + 72cecf4 commit aa61cf2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,19 @@ To use the picker do the following:
3333
#import <WPMediaPicker/WPMediaPicker.h>
3434
````
3535

36-
### Create and present WPMediaPickerViewController
36+
### Create and present WPNavigationMediaPickerViewController
3737

3838
```` objective-c
39-
WPMediaPickerViewController * mediaPicker = [[WPMediaPickerViewController alloc] init];
39+
WPNavigationMediaPickerViewController * mediaPicker = [[WPNavigationMediaPickerViewController alloc] init];
4040
mediaPicker.delegate = self;
4141
[self presentViewController:mediaPicker animated:YES completion:nil];
4242
````
4343
44+
`WPNavigationMediaPickerViewController` wraps a `UICollectionViewController`, `WPMediaPickerViewController`, for convenience.
45+
4446
### Implement didFinishPickingAssets delegate
4547
46-
The delegate is responsible for dismissing the picker when the operation completes. To dismiss the picker, call the [dismissViewControllerAnimated:completion:](https://developer.apple.com/library/ios/documentation/uikit/reference/UIViewController_Class/index.html#//apple_ref/occ/instm/UIViewController/dismissViewControllerAnimated:completion:) method of the presenting controller responsible for displaying `WPMediaPickerController` object. Please refer to the demo app.
48+
The delegate is responsible for dismissing the picker when the operation completes. To dismiss the picker, call the [dismissViewControllerAnimated:completion:](https://developer.apple.com/library/ios/documentation/uikit/reference/UIViewController_Class/index.html#//apple_ref/occ/instm/UIViewController/dismissViewControllerAnimated:completion:) method of the presenting controller responsible for displaying the `WPNavigationMediaPickerController` object. Please refer to the demo app.
4749
4850
```` objective-c
4951
- (void)mediaPickerController:(WPMediaPickerViewController *)picker didFinishPickingAssets:(NSArray *)assets
@@ -59,11 +61,11 @@ Just use the standard appearance methods from UIKIT. Here is an example how to c
5961

6062
```` objective-c
6163
//Configure navigation bar background color
62-
[[UINavigationBar appearanceWhenContainedIn:[WPMediaPickerViewController class],nil] setBarTintColor:[UIColor colorWithRed:0/255.0f green:135/255.0f blue:190/255.0f alpha:1.0f]];
64+
[[UINavigationBar appearanceWhenContainedIn:[WPNavigationMediaPickerViewController class],nil] setBarTintColor:[UIColor colorWithRed:0/255.0f green:135/255.0f blue:190/255.0f alpha:1.0f]];
6365
//Configure navigation bar items text color
64-
[[UINavigationBar appearanceWhenContainedIn:[WPMediaPickerViewController class],nil] setTintColor:[UIColor whiteColor]];
66+
[[UINavigationBar appearanceWhenContainedIn:[WPNavigationMediaPickerViewController class],nil] setTintColor:[UIColor whiteColor]];
6567
//Configure navigation bar title text color
66-
[[UINavigationBar appearanceWhenContainedIn:[WPMediaPickerViewController class],nil] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]} ];
68+
[[UINavigationBar appearanceWhenContainedIn:[WPNavigationMediaPickerViewController class],nil] setTitleTextAttributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]} ];
6769
//Configure background color for media scroll view
6870
[[UICollectionView appearanceWhenContainedIn:[WPMediaCollectionViewController class],nil] setBackgroundColor:[UIColor colorWithRed:233/255.0f green:239/255.0f blue:243/255.0f alpha:1.0f]];
6971
//Configure background color for media cell while loading image.

0 commit comments

Comments
 (0)