FreeRDP
Loading...
Searching...
No Matches
UIView(Toast) Category Reference

Instance Methods

(void) - makeToast:
(void) - makeToast:duration:position:
(void) - makeToast:duration:position:title:
(void) - makeToast:duration:position:title:image:
(void) - makeToast:duration:position:image:
(void) - showToast:
(void) - showToast:duration:position:

Detailed Description

Definition at line 33 of file Toast+UIView.h.

Method Documentation

◆ makeToast:

- (void) makeToast: (NSString *) message

Definition at line 64 of file Toast+UIView.m.

64 :(NSString *)message
65{
66 [self makeToast:message duration:kDefaultLength position:kDefaultPosition];
67}

◆ makeToast:duration:position:

- (void) makeToast: (NSString *) message
duration: (float) interval
position: (id) point 

Definition at line 69 of file Toast+UIView.m.

69 :(NSString *)message duration:(float)interval position:(id)point
70{
71 UIView *toast = [self makeViewForMessage:message title:nil image:nil];
72 [self showToast:toast duration:interval position:point];
73}

◆ makeToast:duration:position:image:

- (void) makeToast: (NSString *) message
duration: (float) interval
position: (id) point
image: (UIImage *) image 

Definition at line 84 of file Toast+UIView.m.

84 :(NSString *)message
85 duration:(float)interval
86 position:(id)point
87 image:(UIImage *)image
88{
89 UIView *toast = [self makeViewForMessage:message title:nil image:image];
90 [self showToast:toast duration:interval position:point];
91}

◆ makeToast:duration:position:title:

- (void) makeToast: (NSString *) message
duration: (float) interval
position: (id) point
title: (NSString *) title 

Definition at line 75 of file Toast+UIView.m.

75 :(NSString *)message
76 duration:(float)interval
77 position:(id)point
78 title:(NSString *)title
79{
80 UIView *toast = [self makeViewForMessage:message title:title image:nil];
81 [self showToast:toast duration:interval position:point];
82}

◆ makeToast:duration:position:title:image:

- (void) makeToast: (NSString *) message
duration: (float) interval
position: (id) point
title: (NSString *) title
image: (UIImage *) image 

Definition at line 93 of file Toast+UIView.m.

93 :(NSString *)message
94 duration:(float)interval
95 position:(id)point
96 title:(NSString *)title
97 image:(UIImage *)image
98{
99 UIView *toast = [self makeViewForMessage:message title:title image:image];
100 [self showToast:toast duration:interval position:point];
101}

◆ showToast:

- (void) showToast: (UIView *) toast

Definition at line 103 of file Toast+UIView.m.

103 :(UIView *)toast
104{
105 [self showToast:toast duration:kDefaultLength position:kDefaultPosition];
106}

◆ showToast:duration:position:

- (void) showToast: (UIView *) toast
duration: (float) interval
position: (id) point 

Definition at line 108 of file Toast+UIView.m.

108 :(UIView *)toast duration:(float)interval position:(id)point
109{
110
111 /****************************************************
112 * *
113 * Displays a view for a given duration & position. *
114 * *
115 ****************************************************/
116
117 CGPoint toastPoint = [self getPositionFor:point toast:toast];
118
119 [toast setCenter:toastPoint];
120 [toast setAlpha:0.0];
121 [self addSubview:toast];
122
123 [UIView animateWithDuration:kFadeDuration
124 delay:0.0
125 options:UIViewAnimationOptionCurveEaseOut
126 animations:^{
127 [toast setAlpha:1.0];
128 }
129 completion:^(BOOL finished) {
130 [UIView animateWithDuration:kFadeDuration
131 delay:interval
132 options:UIViewAnimationOptionCurveEaseIn
133 animations:^{
134 [toast setAlpha:0.0];
135 }
136 completion:^(BOOL finished) {
137 [toast removeFromSuperview];
138 }];
139 }];
140}

The documentation for this category was generated from the following files: