Latest 0.1.0
Homepage https://github.com/jjochen/JPMessageHandler
License MIT
Platforms ios 5.0, requires ARC
Authors

Handles and shows status messages on iOS devices.

Installation

Important note if your project doesn’t use ARC: you must add the -fobjc-arc compiler flag to JPMessageHandler.m, JPMessage.m, JPMessageCell.m and XButton.m in Target Settings > Build Phases > Compile Sources.

  • Drag the JPMessageHandler/JPMessageHandler folder into your project.
  • Add the QuartzCore framework to your project.

Usage

(see sample Xcode project in /Demo)

Init

In viewDidLoad

self.messageHandler = [[JPMessageHandler alloc] initWithSuperview:self.view];

Showing a message

[self.messageHandler showMessage:@"Info Message" type:JPMessageTypeInfo];

[self.messageHandler showMessage:@"Long Error Message (min 4sec)" type:JPMessageTypeError minDuration:4.0 maxDuration:10.0];

Customization

You can customize the following properties of JPMessageHandler:

@property (nonatomic, assign) CGFloat rowHeight;
@property (nonatomic, assign) UITableViewCellSeparatorStyle separatorStyle;
@property (nonatomic, strong) UIView *backgroundView;
@property (nonatomic, strong) UIColor *backgroundColor;
@property (nonatomic, assign) CGFloat marginBottom;
@property (nonatomic, strong) UIColor *messageShadowColor;
@property (nonatomic, assign) CGSize messageShadowOffset;
@property (nonatomic, strong) NSArray *messageGradientColors;
@property (nonatomic, strong) UIFont *font;
@property (nonatomic, strong) UIColor *textColor;
@property (nonatomic, strong) UIColor *hideButtonColor;
@property (nonatomic, strong) UIColor *imageColor;
@property (nonatomic, assign) NSTimeInterval defaultMinDuration;
@property (nonatomic, assign) NSTimeInterval defaultMaxDuration;

Example

As an example see the iOS BBBike app.

Credits

JPMessageHandler is brought to you by Jochen Pfeiffer and contributors to the project. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by creating new issues. If you’re using JPMessageHandler in your project, attribution would be nice.

Latest podspec

{
    "name": "JPMessageHandler",
    "version": "0.1.0",
    "summary": "Handles and shows status messages on iOS devices.",
    "homepage": "https://github.com/jjochen/JPMessageHandler",
    "license": "MIT",
    "authors": {
        "Jochen Pfeiffer": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jjochen/JPMessageHandler.git",
        "tag": "0.1.0"
    },
    "source_files": "JPMessageHandler",
    "public_header_files": "JPMessageHandler/*.h",
    "resources": "JPMessageHandler/Resources/*.png",
    "requires_arc": true,
    "platforms": {
        "ios": "5.0"
    },
    "ios": {
        "frameworks": "QuartzCore"
    }
}

Pin It on Pinterest

Share This