Latest1.0
Homepagehttps://github.com/remirobert/RRMessageController
LicenseMIT
Platformsios 7.0, requires ARC
Authors

RRMessageController

RRMessageController

Version
License
Platform

RRMessageController is a UIViewController, allows you to write a message with photos as attachment.
A messages UI for iPhone. Support text && image. Works with all custom Keyboard for iOS 8.

RRMessageController


Installation

RRMessageController is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "RRMessageController"

RRMessageController needs AVFoundation Framework

Usage


With block :

- (void) newMessage {
    RRSendMessageViewController *controller = [[RRSendMessageViewController alloc] init];

    [controller presentController:self blockCompletion:^(RRMessageModel *model, BOOL isCancel) {
        if (isCancel == true) {
            self.message.text = @"";
        }
        else {
            self.message.text = model.text;
        }
        [controller dismissViewControllerAnimated:YES completion:nil];
    }];
}

With delegate :

#pragma mark RRSendMessageController Delegate

- (void) messageCancel {
    [self.controllerMessage dismissViewControllerAnimated:YES completion:nil];
}

- (void) getMessage:(RRMessageModel *)message {
    self.message.text = message.text;
    [self.controllerMessage dismissViewControllerAnimated:YES completion:nil];
}

- (void) newMessage {
    [self presentViewController:self.controllerMessage animated:YES completion:nil];
}

- (void) initMessageController {
    self.controllerMessage = [[RRSendMessageViewController alloc] init];
    self.controllerMessage.delegate = self;
}

You can launch a RRSendMessgeController with a existant message:

RRMessageModel *defaultMessage = [[RRMessageModel alloc] init];
defaultMessage.text = @"salut !";
defaultMessage.photos = [self getRandomPhotos];

RRSendMessageViewController *controller = [[RRSendMessageViewController alloc] initWithMessage:defaultMessage];

Latest podspec

{
    "name": "RRMessageController",
    "version": "1.0",
    "summary": "RRMessageController",
    "description": "  RRMessageController is a UIViewController, allows you to write a message with photos as attachment.n  A messages UI for iPhone. Support text && image.n",
    "homepage": "https://github.com/remirobert/RRMessageController",
    "license": "MIT",
    "authors": {
        "remirobert": "[email protected]"
    },
    "source": {
        "git": "https://github.com/remirobert/RRMessageController.git",
        "tag": "v1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "classes/"
}

Pin It on Pinterest

Share This