mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
+ Fixes ActionSheet madness
This commit is contained in:
13
Classes/BITArrowImageAnnotation.h
Normal file
13
Classes/BITArrowImageAnnotation.h
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// BITArrowImageAnnotation.h
|
||||
// HockeySDK
|
||||
//
|
||||
// Created by Moritz Haarmann on 26.02.14.
|
||||
//
|
||||
//
|
||||
|
||||
#import "BITImageAnnotation.h"
|
||||
|
||||
@interface BITArrowImageAnnotation : BITImageAnnotation
|
||||
|
||||
@end
|
||||
31
Classes/BITArrowImageAnnotation.m
Normal file
31
Classes/BITArrowImageAnnotation.m
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// BITArrowImageAnnotation.m
|
||||
// HockeySDK
|
||||
//
|
||||
// Created by Moritz Haarmann on 26.02.14.
|
||||
//
|
||||
//
|
||||
|
||||
#import "BITArrowImageAnnotation.h"
|
||||
|
||||
@implementation BITArrowImageAnnotation
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
// Initialization code
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect
|
||||
{
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
@@ -421,8 +421,8 @@
|
||||
self.selectedAttachmentIndex = index;
|
||||
UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle: nil
|
||||
delegate: self
|
||||
cancelButtonTitle: @"Delete Attachment"
|
||||
destructiveButtonTitle: nil
|
||||
cancelButtonTitle:@"Cancel"
|
||||
destructiveButtonTitle: @"Delete Attachment"
|
||||
otherButtonTitles: @"Edit Attachment", nil];
|
||||
|
||||
[actionSheet showFromRect: sender.frame inView: self.attachmentScrollView animated: YES];
|
||||
@@ -464,7 +464,7 @@
|
||||
#pragma mark - UIActionSheet Delegate
|
||||
|
||||
- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex {
|
||||
if (buttonIndex == [actionSheet cancelButtonIndex]){
|
||||
if (buttonIndex == [actionSheet destructiveButtonIndex]){
|
||||
|
||||
if (self.selectedAttachmentIndex != NSNotFound){
|
||||
BITFeedbackMessageAttachment* attachment = [self.attachments objectAtIndex:self.selectedAttachmentIndex];
|
||||
@@ -474,7 +474,7 @@
|
||||
self.selectedAttachmentIndex = NSNotFound;
|
||||
|
||||
[self refreshAttachmentScrollview];
|
||||
} else {
|
||||
} else if(buttonIndex != [actionSheet cancelButtonIndex]){
|
||||
if (self.selectedAttachmentIndex != NSNotFound){
|
||||
BITFeedbackMessageAttachment* attachment = [self.attachments objectAtIndex:self.selectedAttachmentIndex];
|
||||
BITImageAnnotationViewController *annotationEditor = [[BITImageAnnotationViewController alloc ] init];
|
||||
|
||||
Reference in New Issue
Block a user