SHMessageUIBlocks 1.2.0

SHMessageUIBlocks 1.2.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Seivan Heidari.



  • By
  • Seivan Heidari

Overview

Composer Completion block for MFMailComposeViewController and MFMessageComposeViewController. The blocks are automatically removed once the alert is gone, so it isn't necessary to clean up - Swizzle Free(™)

API

Init Mail

Properties Mail

Init Message

Properties Message

Installation

pod 'SHMessageUIBlocks'

Setup

Put this either in specific files or your project prefix file

For all controllers

#import "SHMessageUIBlocks.h"

For just Mail

#import "MFMailComposeViewController+SHMessageUIBlocks.h"

For just Message

#import "MFMessageComposeViewController+SHMessageUIBlocks.h"

API

Init Mail

#pragma mark -
#pragma mark Init
+(instancetype)SH_mailComposeViewController;
+(instancetype)SH_mailComposeViewControllerWithBlock:(SHMailComposerBlock)theBlock;

Properties Mail

#pragma mark -
#pragma mark Block Defs

typedef void (^SHMailComposerBlock)(MFMailComposeViewController * theController,
                                    MFMailComposeResult theResults,
                                    NSError * theError);

#pragma mark -
#pragma mark Properties

#pragma mark -
#pragma mark Setters
-(void)SH_setComposerCompletionBlock:(SHMailComposerBlock)theBlock;


#pragma mark -
#pragma mark Getters
@property(nonatomic,readonly) SHMailComposerBlock SH_blockComposerCompletion;

Init Message

#pragma mark -
#pragma mark Init
+(instancetype)SH_messageComposeViewController;
+(instancetype)SH_messageComposeViewControllerWithBlock:(SHMessageComposerBlock)theBlock;

Properties Message

#pragma mark -
#pragma mark Block Defs

typedef void (^SHMessageComposerBlock)(MFMessageComposeViewController * theController,
                                       MessageComposeResult theResults);


#pragma mark -
#pragma mark Properties

#pragma mark -
#pragma mark Setters
-(void)SH_setComposerCompletionBlock:(SHMessageComposerBlock)theBlock;


#pragma mark -
#pragma mark Getters
@property(nonatomic,readonly) SHMessageComposerBlock SH_blockComposerCompletion;

Contact

If you end up using SHMessageUIBlocks in a project, I'd love to hear about it.

email: [email protected]
twitter: @seivanheidari

License

SHMessageUIBlocks is © 2013 Seivan and may be freely distributed under the MIT license. See the LICENSE.md file.