HHAttachmentSheetView 1.4.0

HHAttachmentSheetView 1.4.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jun 2016

Maintained by Herui.



  • By
  • Herui

HHAttachmentSheetView is inspired by this repo: Telegram Messenger for iOS.

image

For more details: blog.coderhr.com

Feature

  • Swipe to dismiss.
  • Support to using the UI_APPEARANCE_SELECTOR to customize the appearance.
  • Support both the iPhone and iPad, and also support both the portrait mode and landscape mode.

Requirements

  • Xcode7 or higher
  • iOS 6.0 or higher
  • ARC
  • Objective-C

Installation

Manual

Add HHAttachmentSheetView folder into your project.

Demo

Open and run the HHAttachmentSheetViewDemo.xcodeproj in Xcode to see HHAttachmentSheetView in action

Example usage

     NSMutableArray *items = [[NSMutableArray alloc] initWithCapacity:5];

    [items addObject:[[HHAttachmentSheetButtonItemView alloc] initWithTitle:@"ChoosePhoto" pressed:^ {
        NSLog(@"choose photo");

    }]];
    [items addObject:[[HHAttachmentSheetButtonItemView alloc] initWithTitle:@"ChooseViedo" pressed:^ {
        NSLog(@"choose viedo");

    }]];
    [items addObject:[[HHAttachmentSheetButtonItemView alloc] initWithTitle:@"SearchPhoto" pressed:^ {
        NSLog(@"search photo");

    }]];
    HHAttachmentSheetButtonItemView *deleteItem = [[HHAttachmentSheetButtonItemView alloc] initWithTitle:@"DeletePhoto" pressed:^{
        NSLog(@"delete photo");
    }];
    deleteItem.destructive = YES;
    [items addObject:deleteItem];

    HHAttachmentSheetButtonItemView *cancelItem = [[HHAttachmentSheetButtonItemView alloc] initWithTitle:@"Cancel" pressed:^{
        NSLog(@"cancel");
    }];
    cancelItem.bold = YES;
    [items addObject:cancelItem];

    HHAttachmentSheetView *sheetView = [[HHAttachmentSheetView alloc] initWithItems:items];
    [sheetView showWithAnimate:YES completion:^{
        NSLog(@"show complete");
    }];

TODO

  • Add more customized item sample like HHAttachmentSheetButtonItemView

Update Logs

2016.06.09 (Tag: 1.4.0)

  • Support for reloadItemsmethod to update the items with animation.

2016.05.06 (Tag: 1.2.0)

  • Add new HHAttachmentSheet.h file to support for Manual install.

2016.03.21 (Tag: 1.1.0)

  • Support for Carthage

2015.12.29 (Tag: 1.0.0)

  • Support for CocoaPods

2015.12.23

  • first commit

Support

  • If you have any questions, please Issues me, thank you. :)
  • Blog: hirain
  • Buy me a cup of coffee? 👇

License

HHAttachmentSheetView is available under the MIT license. See the LICENSE file for more info.