Latest 1.2.0
Homepage https://github.com/seivan/SHMessageUIBlocks
License MIT
Platforms ios 6.0, requires ARC
Authors

Build Status
Version
Platform

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.

Latest podspec

{
    "name": "SHMessageUIBlocks",
    "version": "1.2.0",
    "summary": "CompletionBlocks for MFMailComposeViewController and MFMessageComposeViewController (MessageUI framework).",
    "description": "n                    * Swizzle and junk freen                    * No need to clean up after - The control blocks are self maintained.n                    * The controllers are referenced in a map with weak propertiesn                    * Prefixed selectors.n                    * Minimum clutter on top of the public interface.n                    n",
    "homepage": "https://github.com/seivan/SHMessageUIBlocks",
    "license": "MIT",
    "authors": {
        "Seivan Heidari": "[email protected]"
    },
    "source": {
        "git": "https://github.com/seivan/SHMessageUIBlocks.git",
        "tag": "1.2.0"
    },
    "ios": {
        "frameworks": "MessageUI"
    },
    "platforms": {
        "ios": "6.0"
    },
    "source_files": "SHMessageUIBlocks/**/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This