TCGBImageNotice Class Reference

Inherits from NSObject
Declared in TCGBImageNotice.h

Request Showing Image Notices

+ showImageNoticesWithViewController:closeCompletion:

This is the method to request showing image notices. There is a viewController parameter and you may put your top most viewController. When finished showing image notices, this method calls closeCompletion.

+ (void)showImageNoticesWithViewController:(UIViewController *)viewController closeCompletion:(void ( ^ ) ( TCGBError *error ))closeCompletion

Parameters

viewController

represent to current viewController

closeCompletion

completion may call when finished showing image notices. If there is an error, TCGBError will be returned.

Usage Example

- (void)showImageNotices {
    [TCGBImageNotice showImageNoticesWithViewController:self closeCompletion:^(TCGBError *error) {
        if (error) {
            dispatch_async(dispatch_get_main_queue(), ^{
                NSLog(@"Error : %@", error);
            });
        } else {
            dispatch_async(dispatch_get_main_queue(), ^{
                NSLog(@"Finish Image Notices");
            });
        }
    }];
}

Discussion

Request Showing Image Notices.

Warning: If viewController is nil, Image Notices set it to top most view controller automatically.

Declared In

TCGBImageNotice.h

+ showImageNoticesWithViewController:configuration:closeCompletion:schemeEvent:

This is the method to request showing image notices. There is a viewController parameter and you may put your top most viewController. When finished showing image notices, this method calls closeCompletion.

+ (void)showImageNoticesWithViewController:(UIViewController *)viewController configuration:(TCGBImageNoticeConfiguration *)configuration closeCompletion:(void ( ^ ) ( TCGBError *error ))closeCompletion schemeEvent:(void ( ^ ) ( NSString *payload , TCGBError *error ))schemeEvent

Parameters

viewController

Represent to current viewController.

configuration

This configuration is applied to the behavior of image notices.

closeCompletion

Completion may call when finished showing image notices.

schemeEvent

SchemeEvent may call when custom scheme event occurred. If there is an error, TCGBError will be returned.

Usage Example

  • (void)showImageNotices { TCGBImageNoticeConfiguration configuration = [[TCGBImageNoticeConfiguration alloc] init]; configuration.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5]; configuration.timeoutMS = 5000; configuration.enableAutoCloseByCustomScheme = YES; [TCGBImageNotice showImageNoticesWithViewController:self configuration:configuration closeCompletion:^(TCGBError error) { if (error) { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@“Error : %@”, error); }); } else { dispatch_async(dispatch_get_main_queue(), ^{ NSLog(@“Finish Image Notices”); }); } } schemeEvent:^(NSString payload, TCGBError error) { NSLog(@“SchemeEvent occurred : %@”, payload); }]; }

Discussion

Request Showing Image Notices.

Warning: If viewController is nil, Image Notices set it to top most view controller automatically.

Warning: If configuration is nil, Image Notices set it to default value. it is described in TCGBImageNoticeConfiguration.

Declared In

TCGBImageNotice.h

Request to close Image Notices

+ closeImageNoticesWithViewController:

This is the method to request to close image notices.

+ (void)closeImageNoticesWithViewController:(UIViewController *)viewController

Parameters

viewController

Represent to current viewController.

Discussion

Request to close Image Notices.

Warning: If viewController is nil, it will be set to top most view controller automatically.

Usage Example

- (void)closeImageNotices {
    [TCGBImageNotice closeImageNoticesWithViewController:self];
}

Declared In

TCGBImageNotice.h