Blame client/iOS/Additions/Toast+UIView.h

Packit Service fa4841
/***************************************************************************
Packit Service b1ea74
Packit Service fa4841
    Toast+UIView.h
Packit Service fa4841
    Toast
Packit Service fa4841
    Version 0.1
Packit Service fa4841
Packit Service fa4841
    Copyright (c) 2011 Charles Scalesse.
Packit Service b1ea74
Packit Service fa4841
    Permission is hereby granted, free of charge, to any person obtaining a
Packit Service fa4841
    copy of this software and associated documentation files (the
Packit Service fa4841
    "Software"), to deal in the Software without restriction, including
Packit Service fa4841
    without limitation the rights to use, copy, modify, merge, publish,
Packit Service fa4841
    distribute, sublicense, and/or sell copies of the Software, and to
Packit Service fa4841
    permit persons to whom the Software is furnished to do so, subject to
Packit Service fa4841
    the following conditions:
Packit Service b1ea74
Packit Service fa4841
    The above copyright notice and this permission notice shall be included
Packit Service fa4841
    in all copies or substantial portions of the Software.
Packit Service b1ea74
Packit Service fa4841
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Packit Service fa4841
    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit Service fa4841
    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Packit Service fa4841
    IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
Packit Service fa4841
    CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
Packit Service fa4841
    TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
Packit Service fa4841
    SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Packit Service fa4841
Packit Service b1ea74
***************************************************************************/
Packit Service bb5c11
Packit Service fa4841
#import <Foundation/Foundation.h>
Packit Service fa4841
#import <UIKit/UIKit.h>
Packit Service fa4841
Packit Service fa4841
@interface UIView (Toast)
Packit Service fa4841
Packit Service fa4841
#define ToastDurationLong 5.0
Packit Service fa4841
#define ToastDurationNormal 3.0
Packit Service fa4841
#define ToastDurationShort 1.0
Packit Service fa4841
Packit Service fa4841
// each makeToast method creates a view and displays it as toast
Packit Service b1ea74
- (void)makeToast:(NSString *)message;
Packit Service b1ea74
- (void)makeToast:(NSString *)message duration:(float)interval position:(id)point;
Packit Service b1ea74
- (void)makeToast:(NSString *)message
Packit Service b1ea74
         duration:(float)interval
Packit Service b1ea74
         position:(id)point
Packit Service b1ea74
            title:(NSString *)title;
Packit Service b1ea74
- (void)makeToast:(NSString *)message
Packit Service b1ea74
         duration:(float)interval
Packit Service b1ea74
         position:(id)point
Packit Service b1ea74
            title:(NSString *)title
Packit Service b1ea74
            image:(UIImage *)image;
Packit Service b1ea74
- (void)makeToast:(NSString *)message
Packit Service b1ea74
         duration:(float)interval
Packit Service b1ea74
         position:(id)point
Packit Service b1ea74
            image:(UIImage *)image;
Packit Service fa4841
Packit Service fa4841
// the showToast method displays an existing view as toast
Packit Service b1ea74
- (void)showToast:(UIView *)toast;
Packit Service b1ea74
- (void)showToast:(UIView *)toast duration:(float)interval position:(id)point;
Packit Service fa4841
Packit Service fa4841
@end