Merge remote-tracking branch 'origin/develop' into public_rooms_search

Conflicts:
	Vector/Base.lproj/Main.storyboard
	Vector/Model/RoomList/RecentsDataSource.m
This commit is contained in:
manuroe
2015-12-21 10:35:48 +01:00
parent 92e0fdbe92
commit 68fd187509
64 changed files with 2452 additions and 1112 deletions
+23 -1
View File
@@ -24,6 +24,9 @@
#import "AvatarGenerator.h"
#import <Photos/Photos.h>
#import <MediaPlayer/MediaPlayer.h>
#define SETTINGS_SECTION_SIGN_OUT_INDEX 0
#define SETTINGS_SECTION_USER_SETTINGS_INDEX 1
#define SETTINGS_SECTION_NOTIFICATIONS_SETTINGS_INDEX 2
@@ -1001,7 +1004,26 @@
- (void)mediaPickerController:(MediaPickerViewController *)mediaPickerController didSelectAssets:(NSArray *)assets
{
// this method should not be called
if (assets.count > 0)
{
PHAsset* asset = [assets objectAtIndex:0];
PHContentEditingInputRequestOptions *editOptions = [[PHContentEditingInputRequestOptions alloc] init];
[asset requestContentEditingInputWithOptions:editOptions
completionHandler:^(PHContentEditingInput *contentEditingInput, NSDictionary *info) {
if (contentEditingInput.mediaType == PHAssetMediaTypeImage)
{
// Here the fullSizeImageURL is related to a local file path
NSData *data = [NSData dataWithContentsOfURL:contentEditingInput.fullSizeImageURL];
UIImage *image = [UIImage imageWithData:data];
newAvatarImage = image;
[self.tableView reloadData];
}
}];
}
[self dismissMediaPicker];
}