1 - the room topic is animated when lon tapping on it

2 - the media picker used to close itself on IOS 8.
This commit is contained in:
ylecollen
2014-12-22 15:45:43 +01:00
parent 9498145fe8
commit 841aa25fe4
3 changed files with 87 additions and 79 deletions
@@ -1813,9 +1813,6 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
// Hide topic field if empty
_roomTitleView.hiddenTopic = !topic.length;
}
// restart the topic animation
[_roomTitleView startTopicAnimation];
}
}
@@ -1862,23 +1859,31 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
weakSelf.actionMenu = [[CustomAlert alloc] initWithTitle:@"Media:" message:nil style:CustomAlertStyleActionSheet];
[weakSelf.actionMenu addActionWithTitle:@"Photo Library" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) {
// Open media gallery
UIImagePickerController *mediaPicker = [[UIImagePickerController alloc] init];
mediaPicker.delegate = weakSelf;
mediaPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
mediaPicker.allowsEditing = NO;
mediaPicker.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeImage, (NSString *)kUTTypeMovie, nil];
[[AppDelegate theDelegate].masterTabBarController presentMediaPicker:mediaPicker];
if (weakSelf) {
weakSelf.actionMenu = nil;
// Open media gallery
UIImagePickerController *mediaPicker = [[UIImagePickerController alloc] init];
mediaPicker.delegate = weakSelf;
mediaPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
mediaPicker.allowsEditing = NO;
mediaPicker.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeImage, (NSString *)kUTTypeMovie, nil];
[[AppDelegate theDelegate].masterTabBarController presentMediaPicker:mediaPicker];
}
}];
[weakSelf.actionMenu addActionWithTitle:@"Take Photo or Video" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) {
// Open media gallery
UIImagePickerController *mediaPicker = [[UIImagePickerController alloc] init];
mediaPicker.delegate = weakSelf;
mediaPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
mediaPicker.allowsEditing = NO;
mediaPicker.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeImage, (NSString *)kUTTypeMovie, nil];
[[AppDelegate theDelegate].masterTabBarController presentMediaPicker:mediaPicker];
if (weakSelf) {
weakSelf.actionMenu = nil;
// Open media gallery
UIImagePickerController *mediaPicker = [[UIImagePickerController alloc] init];
mediaPicker.delegate = weakSelf;
mediaPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
mediaPicker.allowsEditing = NO;
mediaPicker.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeImage, (NSString *)kUTTypeMovie, nil];
[[AppDelegate theDelegate].masterTabBarController presentMediaPicker:mediaPicker];
}
}];
weakSelf.actionMenu.cancelButtonIndex = [weakSelf.actionMenu addActionWithTitle:@"Cancel" style:CustomAlertActionStyleDefault handler:^(CustomAlert *alert) {