FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
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 53 of file Toast+UIView.m.

67 :(NSString *)message
68{
69 [self makeToast:message duration:kDefaultLength position:kDefaultPosition];
70}

◆ makeToast:duration:position:

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

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

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

◆ makeToast:duration:position:image:

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

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

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

◆ makeToast:duration:position:title:

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

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

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

◆ makeToast:duration:position:title:image:

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

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

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

◆ showToast:

- (void) showToast: (UIView *)  toast

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

106 :(UIView *)toast
107{
108 [self showToast:toast duration:kDefaultLength position:kDefaultPosition];
109}

◆ showToast:duration:position:

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

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

111 :(UIView *)toast duration:(float)interval position:(id)point
112{
113
114 /****************************************************
115 * *
116 * Displays a view for a given duration & position. *
117 * *
118 ****************************************************/
119
120 CGPoint toastPoint = [self getPositionFor:point toast:toast];
121
122 // use an associative reference to associate the toast view with the display interval
123 objc_setAssociatedObject(toast, &kDurationKey, [NSNumber numberWithFloat:interval],
124 OBJC_ASSOCIATION_RETAIN);
125
126 [toast setCenter:toastPoint];
127 [toast setAlpha:0.0];
128 [self addSubview:toast];
129
130 [UIView beginAnimations:@"fade_in" context:toast];
131 [UIView setAnimationDuration:kFadeDuration];
132 [UIView setAnimationDelegate:self];
133 [UIView setAnimationDidStopSelector:@selector(animationDidStop:finished:context:)];
134 [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
135 [toast setAlpha:1.0];
136 [UIView commitAnimations];
137}

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