├── .gitignore ├── LICENSE.md ├── README.md ├── SIToastView.podspec ├── SIToastView ├── SIToastView.h └── SIToastView.m └── SIToastViewExample ├── Icon-72.png ├── Icon-72@2x.png ├── Icon.png ├── Icon@2x.png ├── Podfile ├── SIToastViewExample.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── SIToastViewExample.xccheckout ├── SIToastViewExample.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── SIToastViewExample.xccheckout └── SIToastViewExample ├── AppDelegate.h ├── AppDelegate.m ├── Default-568h@2x.png ├── Default.png ├── Default@2x.png ├── SIToastViewExample-Info.plist ├── SIToastViewExample-Prefix.pch ├── ViewController.h ├── ViewController.m ├── checkmark.png ├── checkmark@2x.png ├── en.lproj ├── InfoPlist.strings ├── MainStoryboard_iPad.storyboard └── MainStoryboard_iPhone.storyboard └── main.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | */build/* 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | profile 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | 19 | #Pods 20 | Pods 21 | Podfile.lock -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014 Sumi Interactive 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SIToastView 2 | ============= 3 | 4 | Another toast view. As seen in [Grid Diary](http://griddiaryapp.com/). 5 | 6 | ## FEATURES 7 | 8 | - use window to present 9 | - happy with rotation 10 | - support image and activity indicator 11 | 12 | ## HOW TO USE 13 | 14 | **Required:** iOS 6+, ARC 15 | 16 | 1. Add all files under `SIToastView/SIToastView` to your project 17 | 3. Add `#import "SIToastView.h"` before using it 18 | 19 | ## EXAMPLES 20 | 21 | coming soon. 22 | 23 | ## LICENSE 24 | 25 | SIToastView is available under the MIT license. See the LICENSE file for more info. -------------------------------------------------------------------------------- /SIToastView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'SIToastView' 3 | s.version = '0.1' 4 | s.platform = :ios 5 | s.license = 'MIT' 6 | s.summary = 'Another toast view.' 7 | s.homepage = 'https://github.com/Sumi-Interactive/SIToastView' 8 | s.author = { 'Sumi Interactive' => 'developer@sumi-sumi.com' } 9 | s.source = { :git => 'https://github.com/Sumi-Interactive/SIToastView.git', 10 | :tag => '0.1' } 11 | 12 | s.description = 'Another toast view.' 13 | 14 | s.requires_arc = true 15 | s.framework = 'QuartzCore' 16 | s.source_files = 'SIToastView/*.{h,m}' 17 | s.dependency 'SISecondaryWindowRootViewController', '~> 0.1' 18 | end 19 | -------------------------------------------------------------------------------- /SIToastView/SIToastView.h: -------------------------------------------------------------------------------- 1 | // 2 | // SIToastView.h 3 | // 4 | // Created by Kevin Cao on 13-6-14. 5 | // Copyright (c) 2013年 Sumi Interactive. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | extern NSString *const SIToastViewWillShowNotification; 11 | extern NSString *const SIToastViewDidShowNotification; 12 | extern NSString *const SIToastViewWillDismissNotification; 13 | extern NSString *const SIToastViewDidDismissNotification; 14 | extern NSString *const SIToastViewDidTapNotification; 15 | 16 | typedef NS_ENUM(NSInteger, SIToastViewGravity) { 17 | SIToastViewGravityBottom = 0, 18 | SIToastViewGravityTop, 19 | SIToastViewGravityNone 20 | }; 21 | 22 | typedef NS_ENUM(NSInteger, SIToastViewMask) { 23 | SIToastViewMaskNone = 0, 24 | SIToastViewMaskClear, 25 | SIToastViewMaskSolid 26 | }; 27 | 28 | typedef NS_ENUM(NSInteger, SIToastViewStyle) { 29 | SIToastViewStyleDefault = 0, 30 | SIToastViewStyleBanner 31 | }; 32 | 33 | @class SIToastView; 34 | typedef void(^SIToastViewHandler)(SIToastView *toastView); 35 | 36 | @interface SIToastView : UIView 37 | 38 | @property (nonatomic, strong) UIColor *viewBackgroundColor NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; // default is [UIColor whiteColor] 39 | @property (nonatomic, strong) UIColor *messageColor NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; // [UIColor darkGrayColor] 40 | @property (nonatomic, strong) UIFont *messageFont NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; 41 | @property (nonatomic, strong) UIColor *activityIndicatorColor NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; 42 | @property (nonatomic, assign) CGFloat cornerRadius NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; // default is 2.0 43 | @property (nonatomic, assign) CGFloat shadowRadius NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; // default is 0.0 44 | @property (nonatomic, assign) CGFloat shadowOpacity NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR; // default is 0.0 45 | 46 | @property (nonatomic, copy) NSString *message; 47 | @property (nonatomic, strong) UIImage *image; 48 | @property (nonatomic, assign) BOOL showsActivity; 49 | @property (nonatomic, assign) NSTimeInterval duration; 50 | 51 | @property (nonatomic, assign) SIToastViewGravity gravity; // default is SIToastViewGravityBottom 52 | @property (nonatomic, assign) SIToastViewStyle style; // default is SIToastViewStyleToast 53 | @property (nonatomic, assign) CGFloat offset; // default is 30.0 54 | 55 | @property (nonatomic, assign) SIToastViewMask mask; // default is SIToastViewMaskNone 56 | 57 | @property (nonatomic, readonly, getter = isVisible) BOOL visible; 58 | 59 | @property (nonatomic, copy) SIToastViewHandler willShowHandler; 60 | @property (nonatomic, copy) SIToastViewHandler didShowHandler; 61 | @property (nonatomic, copy) SIToastViewHandler willDismissHandler; 62 | @property (nonatomic, copy) SIToastViewHandler didDismissHandler; 63 | @property (nonatomic, copy) SIToastViewHandler tapHandler; 64 | 65 | + (instancetype)toastView; 66 | 67 | + (instancetype)showToastWithMessage:(NSString *)message; 68 | + (instancetype)showToastWithMessage:(NSString *)message duration:(NSTimeInterval)duration; 69 | + (instancetype)showToastWithMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity; 70 | + (instancetype)showToastWithMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset; 71 | + (instancetype)showToastWithMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask; 72 | + (instancetype)showToastWithMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style; 73 | 74 | + (instancetype)showToastWithActivityAndMessage:(NSString *)message; 75 | + (instancetype)showToastWithActivityAndMessage:(NSString *)message gravity:(SIToastViewGravity)gravity; 76 | + (instancetype)showToastWithActivityAndMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset; 77 | + (instancetype)showToastWithActivityAndMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask; 78 | + (instancetype)showToastWithActivityAndMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style; 79 | 80 | + (instancetype)showToastWithImage:(UIImage *)image message:(NSString *)message; 81 | + (instancetype)showToastWithImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration; 82 | + (instancetype)showToastWithImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity; 83 | + (instancetype)showToastWithImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset; 84 | + (instancetype)showToastWithImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask; 85 | + (instancetype)showToastWithImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style; 86 | 87 | + (NSArray *)visibleToastViews; 88 | + (BOOL)isShowingToastView; 89 | 90 | - (void)showMessage:(NSString *)message; 91 | - (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration; 92 | - (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity; 93 | - (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset; 94 | - (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask; 95 | - (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style; 96 | 97 | - (void)showActivityWithMessage:(NSString *)message; 98 | - (void)showActivityWithMessage:(NSString *)message gravity:(SIToastViewGravity)gravity; 99 | - (void)showActivityWithMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset; 100 | - (void)showActivityWithMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask; 101 | - (void)showActivityWithMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style; 102 | 103 | - (void)showImage:(UIImage *)image message:(NSString *)message; 104 | - (void)showImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration; 105 | - (void)showImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity; 106 | - (void)showImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset; 107 | - (void)showImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask; 108 | - (void)showImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style; 109 | 110 | - (void)show; 111 | - (void)dismiss; 112 | 113 | @end 114 | -------------------------------------------------------------------------------- /SIToastView/SIToastView.m: -------------------------------------------------------------------------------- 1 | // 2 | // SIToastView.m 3 | // 4 | // Created by Kevin Cao on 13-6-14. 5 | // Copyright (c) 2013年 Sumi Interactive. All rights reserved. 6 | // 7 | 8 | #import "SIToastView.h" 9 | #import "SISecondaryWindowRootViewController.h" 10 | #import 11 | 12 | #define MARGIN 10 13 | #define TRANSITION_DURATION 0.3 14 | #define DEFAULT_OFFSET 30.0 15 | 16 | NSString *const SIToastViewWillShowNotification = @"SIToastViewWillShowNotification"; 17 | NSString *const SIToastViewDidShowNotification = @"SIToastViewDidShowNotification"; 18 | NSString *const SIToastViewWillDismissNotification = @"SIToastViewWillDismissNotification"; 19 | NSString *const SIToastViewDidDismissNotification = @"SIToastViewDidDismissNotification"; 20 | NSString *const SIToastViewDidTapNotification = @"SIToastViewDidTapNotification"; 21 | 22 | static NSMutableArray *__si_visible_toast_views; 23 | 24 | @interface SIToastWindow : UIWindow 25 | 26 | @end 27 | 28 | @implementation SIToastWindow 29 | 30 | - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event 31 | { 32 | UIView *result = [super hitTest:point withEvent:event]; 33 | return [result isKindOfClass:[SIToastView class]] ? nil : result; 34 | } 35 | 36 | @end 37 | 38 | @interface SIToastViewController : SISecondaryWindowRootViewController 39 | 40 | @property (nonatomic, strong) SIToastView *toastView; 41 | 42 | @end 43 | 44 | @implementation SIToastViewController 45 | 46 | - (void)loadView 47 | { 48 | self.view = self.toastView; 49 | } 50 | 51 | @end 52 | 53 | @interface SIToastView () 54 | 55 | @property (nonatomic, strong) UIView *backgroundView; 56 | @property (nonatomic, strong) UIView *containerView; 57 | @property (nonatomic, strong) UILabel *messageLabel; 58 | @property (nonatomic, strong) UIImageView *imageView; 59 | @property (nonatomic, strong) UIActivityIndicatorView *activityIndicatorView; 60 | @property (nonatomic, strong) SIToastWindow *toastWindow; 61 | @property (nonatomic, strong) NSTimer *timer; 62 | 63 | @end 64 | 65 | @implementation SIToastView 66 | 67 | + (void)initialize 68 | { 69 | if (self != [SIToastView class]) 70 | return; 71 | 72 | SIToastView *appearance = [self appearance]; 73 | appearance.viewBackgroundColor = [UIColor whiteColor]; 74 | appearance.messageColor = [UIColor darkGrayColor]; 75 | appearance.messageFont = [UIFont systemFontOfSize:[UIFont labelFontSize]]; 76 | appearance.cornerRadius = 2.0; 77 | 78 | __si_visible_toast_views = [NSMutableArray array]; 79 | } 80 | 81 | + (SIToastView *)toastView 82 | { 83 | SIToastView *view = [[self alloc] init]; 84 | return view; 85 | } 86 | 87 | + (SIToastView *)showToastWithMessage:(NSString *)message 88 | { 89 | SIToastView *view = [[self alloc] init]; 90 | [view showMessage:message]; 91 | return view; 92 | } 93 | 94 | + (SIToastView *)showToastWithMessage:(NSString *)message duration:(NSTimeInterval)duration 95 | { 96 | SIToastView *view = [[self alloc] init]; 97 | [view showMessage:message duration:duration]; 98 | return view; 99 | } 100 | 101 | + (SIToastView *)showToastWithMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity 102 | { 103 | SIToastView *view = [[self alloc] init]; 104 | [view showMessage:message duration:duration gravity:gravity]; 105 | return view; 106 | } 107 | 108 | + (SIToastView *)showToastWithMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset 109 | { 110 | SIToastView *view = [[self alloc] init]; 111 | [view showMessage:message duration:duration gravity:gravity offset:offset]; 112 | return view; 113 | } 114 | 115 | + (SIToastView *)showToastWithMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask 116 | { 117 | SIToastView *view = [[self alloc] init]; 118 | [view showMessage:message duration:duration gravity:gravity offset:offset mask:mask]; 119 | return view; 120 | } 121 | 122 | + (instancetype)showToastWithMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style 123 | { 124 | SIToastView *view = [[self alloc] init]; 125 | [view showMessage:message duration:duration gravity:gravity offset:offset mask:mask style:style]; 126 | return view; 127 | } 128 | 129 | + (SIToastView *)showToastWithActivityAndMessage:(NSString *)message 130 | { 131 | SIToastView *view = [[self alloc] init]; 132 | [view showActivityWithMessage:message]; 133 | return view; 134 | } 135 | 136 | + (SIToastView *)showToastWithActivityAndMessage:(NSString *)message gravity:(SIToastViewGravity)gravity 137 | { 138 | SIToastView *view = [[self alloc] init]; 139 | [view showActivityWithMessage:message gravity:gravity]; 140 | return view; 141 | } 142 | 143 | + (SIToastView *)showToastWithActivityAndMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset 144 | { 145 | SIToastView *view = [[self alloc] init]; 146 | [view showActivityWithMessage:message gravity:gravity offset:offset]; 147 | return view; 148 | } 149 | 150 | + (SIToastView *)showToastWithActivityAndMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask 151 | { 152 | SIToastView *view = [[self alloc] init]; 153 | [view showActivityWithMessage:message gravity:gravity offset:offset mask:mask]; 154 | return view; 155 | } 156 | 157 | + (instancetype)showToastWithActivityAndMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style 158 | { 159 | SIToastView *view = [[self alloc] init]; 160 | [view showActivityWithMessage:message gravity:gravity offset:offset mask:mask style:style]; 161 | return view; 162 | } 163 | 164 | + (SIToastView *)showToastWithImage:(UIImage *)image message:(NSString *)message 165 | { 166 | SIToastView *view = [[self alloc] init]; 167 | [view showImage:image message:message]; 168 | return view; 169 | } 170 | 171 | + (SIToastView *)showToastWithImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration 172 | { 173 | SIToastView *view = [[self alloc] init]; 174 | [view showImage:image message:message duration:duration]; 175 | return view; 176 | } 177 | 178 | + (SIToastView *)showToastWithImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity 179 | { 180 | SIToastView *view = [[self alloc] init]; 181 | [view showImage:image message:message duration:duration gravity:gravity]; 182 | return view; 183 | } 184 | 185 | + (SIToastView *)showToastWithImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset 186 | { 187 | SIToastView *view = [[self alloc] init]; 188 | [view showImage:image message:message duration:duration gravity:gravity offset:offset]; 189 | return view; 190 | } 191 | 192 | + (SIToastView *)showToastWithImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask 193 | { 194 | SIToastView *view = [[self alloc] init]; 195 | [view showImage:image message:message duration:duration gravity:gravity offset:offset mask:mask]; 196 | return view; 197 | } 198 | 199 | + (instancetype)showToastWithImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style 200 | { 201 | SIToastView *view = [[self alloc] init]; 202 | [view showImage:image message:message duration:duration gravity:gravity offset:offset mask:mask style:style]; 203 | return view; 204 | } 205 | 206 | + (NSArray *)visibleToastViews 207 | { 208 | return [__si_visible_toast_views copy]; 209 | } 210 | 211 | + (BOOL)isShowingToastView 212 | { 213 | return __si_visible_toast_views.count > 0; 214 | } 215 | 216 | #pragma mark - Init 217 | 218 | - (id)init 219 | { 220 | self = [super init]; 221 | if (self) { 222 | [self setup]; 223 | } 224 | return self; 225 | } 226 | 227 | - (id)initWithFrame:(CGRect)frame 228 | { 229 | self = [super initWithFrame:frame]; 230 | if (self) { 231 | [self setup]; 232 | } 233 | return self; 234 | } 235 | 236 | #pragma mark - Setters 237 | 238 | - (void)setMessage:(NSString *)message 239 | { 240 | if ([_message isEqualToString:message]) { 241 | return; 242 | } 243 | _message = [message copy]; 244 | 245 | if (self.isVisible) { 246 | [self refresh]; 247 | } 248 | } 249 | 250 | - (void)setImage:(UIImage *)image 251 | { 252 | if (_image == image) { 253 | return; 254 | } 255 | _image = image; 256 | 257 | if (self.isVisible) { 258 | [self refresh]; 259 | } 260 | } 261 | 262 | - (void)setShowsActivity:(BOOL)showActivity 263 | { 264 | if (_showsActivity == showActivity) { 265 | return; 266 | } 267 | _showsActivity = showActivity; 268 | 269 | if (self.isVisible) { 270 | [self refresh]; 271 | } 272 | } 273 | 274 | - (void)setDuration:(NSTimeInterval)duration 275 | { 276 | if (_duration == duration) { 277 | return; 278 | } 279 | _duration = duration; 280 | 281 | if (self.isVisible) { 282 | [self.timer invalidate]; 283 | if (_duration > 0) { 284 | self.timer = [NSTimer scheduledTimerWithTimeInterval:_duration target:self selector:@selector(dismiss) userInfo:nil repeats:NO]; 285 | } 286 | } 287 | } 288 | 289 | - (void)setGravity:(SIToastViewGravity)gravity 290 | { 291 | if (_gravity == gravity) { 292 | return; 293 | } 294 | _gravity = gravity; 295 | if (self.isVisible) { 296 | [self setNeedsLayout]; 297 | } 298 | } 299 | 300 | - (void)setStyle:(SIToastViewStyle)style 301 | { 302 | if (_style == style) { 303 | return; 304 | } 305 | 306 | _style = style; 307 | if (self.isVisible) { 308 | [self setNeedsLayout]; 309 | } 310 | } 311 | 312 | - (void)setOffset:(CGFloat)offset 313 | { 314 | if (_offset == offset) { 315 | return; 316 | } 317 | _offset = offset; 318 | if (self.isVisible) { 319 | [self setNeedsLayout]; 320 | } 321 | } 322 | 323 | #pragma mark - Getters 324 | 325 | - (BOOL)isVisible 326 | { 327 | return self.toastWindow != nil; 328 | } 329 | 330 | #pragma mark - Public 331 | 332 | - (void)show 333 | { 334 | [self refresh]; 335 | 336 | if (!self.isVisible) { 337 | [self setupWindow]; 338 | [__si_visible_toast_views addObject:self]; 339 | [self transitionIn]; 340 | } 341 | } 342 | 343 | - (void)showMessage:(NSString *)message 344 | { 345 | [self showMessage:message duration:0]; 346 | } 347 | 348 | - (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration 349 | { 350 | [self showMessage:message duration:duration gravity:SIToastViewGravityBottom]; 351 | } 352 | 353 | - (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity 354 | { 355 | [self showMessage:message duration:duration gravity:gravity offset:DEFAULT_OFFSET]; 356 | } 357 | 358 | - (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset 359 | { 360 | [self showMessage:message duration:duration gravity:gravity offset:offset mask:SIToastViewMaskNone]; 361 | } 362 | 363 | - (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask 364 | { 365 | [self showMessage:message duration:duration gravity:gravity offset:offset mask:mask style:SIToastViewStyleDefault]; 366 | } 367 | 368 | - (void)showMessage:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style 369 | { 370 | _message = message; 371 | _duration = duration; 372 | _showsActivity = NO; 373 | _image = nil; 374 | _gravity = gravity; 375 | _offset = offset; 376 | _mask = mask; 377 | _style = style; 378 | 379 | [self show]; 380 | } 381 | 382 | - (void)showActivityWithMessage:(NSString *)message 383 | { 384 | [self showActivityWithMessage:message gravity:SIToastViewGravityBottom]; 385 | } 386 | 387 | - (void)showActivityWithMessage:(NSString *)message gravity:(SIToastViewGravity)gravity 388 | { 389 | [self showActivityWithMessage:message gravity:gravity offset:DEFAULT_OFFSET]; 390 | } 391 | 392 | - (void)showActivityWithMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset 393 | { 394 | [self showActivityWithMessage:message gravity:gravity offset:DEFAULT_OFFSET mask:SIToastViewMaskNone]; 395 | } 396 | 397 | - (void)showActivityWithMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask 398 | { 399 | [self showActivityWithMessage:message gravity:gravity offset:offset mask:mask style:SIToastViewStyleDefault]; 400 | } 401 | 402 | - (void)showActivityWithMessage:(NSString *)message gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style 403 | { 404 | _message = message; 405 | _duration = 0; 406 | _showsActivity = YES; 407 | _image = nil; 408 | _gravity = gravity; 409 | _offset = offset; 410 | _mask = mask; 411 | _style = style; 412 | 413 | [self show]; 414 | } 415 | 416 | - (void)showImage:(UIImage *)image message:(NSString *)message 417 | { 418 | [self showImage:image message:message duration:0]; 419 | } 420 | 421 | - (void)showImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration 422 | { 423 | [self showImage:image message:message duration:duration gravity:SIToastViewGravityBottom]; 424 | } 425 | 426 | - (void)showImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity 427 | { 428 | [self showImage:image message:message duration:duration gravity:gravity offset:DEFAULT_OFFSET]; 429 | } 430 | 431 | - (void)showImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset 432 | { 433 | [self showImage:image message:message duration:duration gravity:gravity offset:offset mask:SIToastViewMaskNone]; 434 | } 435 | 436 | - (void)showImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask 437 | { 438 | [self showImage:image message:message duration:duration gravity:gravity offset:offset mask:mask style:SIToastViewStyleDefault]; 439 | } 440 | 441 | - (void)showImage:(UIImage *)image message:(NSString *)message duration:(NSTimeInterval)duration gravity:(SIToastViewGravity)gravity offset:(CGFloat)offset mask:(SIToastViewMask)mask style:(SIToastViewStyle)style 442 | { 443 | _message = message; 444 | _duration = duration; 445 | _showsActivity = NO; 446 | _image = image; 447 | _gravity = gravity; 448 | _offset = offset; 449 | _mask = mask; 450 | _style = style; 451 | 452 | [self show]; 453 | } 454 | 455 | - (void)dismiss 456 | { 457 | if (!self.isVisible) { 458 | return; 459 | } 460 | 461 | [self.timer invalidate]; 462 | self.timer = nil; 463 | 464 | [self transitionOut]; 465 | } 466 | 467 | #pragma mark - Layout 468 | 469 | - (void)layoutSubviews 470 | { 471 | // skip transform layout 472 | if (!CGAffineTransformEqualToTransform(self.containerView.transform, CGAffineTransformIdentity)) { 473 | return; 474 | } 475 | 476 | CGFloat horizontalPadding = round(self.messageFont.lineHeight * 0.6); 477 | CGFloat verticalPadding = round(horizontalPadding * 0.8); 478 | CGFloat gap = horizontalPadding; 479 | 480 | CGFloat left = horizontalPadding; 481 | CGFloat height = 0; 482 | 483 | if (self.activityIndicatorView) { 484 | [self setX:left forView:self.activityIndicatorView]; 485 | left += self.activityIndicatorView.bounds.size.width; 486 | height = self.activityIndicatorView.bounds.size.height; 487 | } 488 | 489 | if (self.imageView) { 490 | if (left > horizontalPadding) { 491 | left += gap; 492 | } 493 | [self setX:left forView:self.imageView]; 494 | left += self.imageView.bounds.size.width; 495 | height = MAX(height, self.imageView.bounds.size.height); 496 | } 497 | 498 | if (self.messageLabel) { 499 | if (left > horizontalPadding) { 500 | left += gap; 501 | } 502 | CGFloat maxMessageWidth = self.bounds.size.width - MARGIN * 2; 503 | maxMessageWidth -= left + horizontalPadding; 504 | CGRect rect = self.messageLabel.frame; 505 | rect.origin.x = left; 506 | rect.size.width = maxMessageWidth + (self.style == SIToastViewStyleBanner ? 0 : 2 * horizontalPadding); 507 | self.messageLabel.frame = rect; 508 | [self.messageLabel sizeToFit]; 509 | if (self.style == SIToastViewStyleBanner) { 510 | [self setWidth:maxMessageWidth + 2 * horizontalPadding forView:self.messageLabel]; 511 | } 512 | left += self.messageLabel.frame.size.width; 513 | height = MAX(height, self.messageLabel.bounds.size.height); 514 | } 515 | 516 | CGFloat width = left + horizontalPadding; 517 | height += verticalPadding * (self.style == SIToastViewStyleDefault ? 2 : 3); 518 | 519 | if (self.activityIndicatorView) { 520 | [self setY:round((height - self.activityIndicatorView.bounds.size.height) / 2) forView:self.activityIndicatorView]; 521 | } 522 | 523 | if (self.imageView) { 524 | [self setY:round((height - self.imageView.bounds.size.height) / 2) forView:self.imageView]; 525 | } 526 | 527 | if (self.messageLabel) { 528 | [self setY:round((height - self.messageLabel.bounds.size.height) / 2) forView:self.messageLabel]; 529 | } 530 | 531 | CGFloat x = 0, y = 0; 532 | if (self.style == SIToastViewStyleDefault) { 533 | x = round((self.bounds.size.width - width) / 2); 534 | } 535 | switch (self.gravity) { 536 | case SIToastViewGravityTop: 537 | y = self.offset; 538 | break; 539 | case SIToastViewGravityBottom: 540 | y = self.bounds.size.height - height - self.offset; 541 | break; 542 | case SIToastViewGravityNone: 543 | y = round((self.bounds.size.height - height) / 2) + self.offset; 544 | break; 545 | } 546 | self.containerView.frame = CGRectMake(x, y, width, height); 547 | self.containerView.layer.shadowPath = [UIBezierPath bezierPathWithRoundedRect:self.containerView.bounds cornerRadius:self.cornerRadius].CGPath; 548 | 549 | self.backgroundView.frame = self.bounds; 550 | } 551 | 552 | - (void)setX:(CGFloat)x forView:(UIView *)view 553 | { 554 | CGRect rect = view.frame; 555 | rect.origin.x = x; 556 | view.frame = rect; 557 | } 558 | - (void)setY:(CGFloat)y forView:(UIView *)view 559 | { 560 | CGRect rect = view.frame; 561 | rect.origin.y = y; 562 | view.frame = rect; 563 | } 564 | 565 | - (void)setWidth:(CGFloat)width forView:(UIView *)view 566 | { 567 | CGRect rect = view.frame; 568 | rect.size.width = width; 569 | view.frame = rect; 570 | } 571 | 572 | - (CGFloat)paddingVertical 573 | { 574 | return self.style == SIToastViewStyleDefault ? 8 : 16; 575 | } 576 | 577 | #pragma mark - Private 578 | 579 | - (void)setup 580 | { 581 | self.offset = DEFAULT_OFFSET; 582 | self.autoresizesSubviews = NO; 583 | 584 | self.containerView = [[UIView alloc] initWithFrame:CGRectZero]; 585 | self.containerView.backgroundColor = self.viewBackgroundColor; 586 | self.containerView.layer.cornerRadius = self.cornerRadius; 587 | self.containerView.layer.shadowRadius = self.shadowRadius; 588 | self.containerView.layer.shadowOpacity = self.shadowOpacity; 589 | self.containerView.layer.shadowOffset = CGSizeZero; 590 | self.containerView.autoresizesSubviews = NO; 591 | [self addSubview:self.containerView]; 592 | 593 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)]; 594 | [self.containerView addGestureRecognizer:tap]; 595 | } 596 | 597 | - (void)tearDown 598 | { 599 | [self.containerView.layer removeAllAnimations]; // cancel animations 600 | 601 | [self.backgroundView removeFromSuperview]; 602 | self.backgroundView = nil; 603 | [self.messageLabel removeFromSuperview]; 604 | self.messageLabel = nil; 605 | [self.activityIndicatorView removeFromSuperview]; 606 | self.activityIndicatorView = nil; 607 | [self.imageView removeFromSuperview]; 608 | self.imageView = nil; 609 | 610 | [self.timer invalidate]; 611 | self.timer = nil; 612 | } 613 | 614 | - (void)refresh 615 | { 616 | [self tearDown]; 617 | 618 | if (self.mask != SIToastViewMaskNone) { 619 | [self setupBackgroundView]; 620 | } 621 | 622 | if (self.message) { 623 | [self setupMessageLabel]; 624 | self.messageLabel.text = self.message; 625 | } 626 | 627 | if (self.showsActivity) { 628 | [self setupActivityIndicatorView]; 629 | } else { 630 | if (self.image) { 631 | [self setupImageView]; 632 | self.imageView.image = self.image; 633 | } 634 | } 635 | 636 | if (self.duration > 0) { 637 | self.timer = [NSTimer scheduledTimerWithTimeInterval:self.duration + TRANSITION_DURATION target:self selector:@selector(dismiss) userInfo:nil repeats:NO]; 638 | } 639 | 640 | [self setNeedsLayout]; 641 | } 642 | 643 | - (void)setupBackgroundView 644 | { 645 | self.backgroundView = [[UIView alloc] initWithFrame:self.bounds]; 646 | self.backgroundView.backgroundColor = (self.mask == SIToastViewMaskSolid) ? [UIColor colorWithWhite:0 alpha:0.6] : [UIColor clearColor]; 647 | [self insertSubview:self.backgroundView atIndex:0]; 648 | } 649 | 650 | - (void)setupMessageLabel 651 | { 652 | self.messageLabel = [[UILabel alloc] initWithFrame:CGRectZero]; 653 | self.messageLabel.backgroundColor = [UIColor clearColor]; 654 | self.messageLabel.textColor = self.messageColor; 655 | self.messageLabel.font = self.messageFont; 656 | self.messageLabel.numberOfLines = 0; 657 | [self.containerView addSubview:self.messageLabel]; 658 | } 659 | 660 | - (void)setupActivityIndicatorView 661 | { 662 | self.activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; 663 | self.activityIndicatorView.color = self.activityIndicatorColor; 664 | [self.containerView addSubview:self.activityIndicatorView]; 665 | [self.activityIndicatorView startAnimating]; 666 | } 667 | 668 | - (void)setupImageView 669 | { 670 | self.imageView = [[UIImageView alloc] initWithImage:self.image]; 671 | [self.containerView addSubview:self.imageView]; 672 | } 673 | 674 | - (void)setupWindow 675 | { 676 | SIToastWindow *window = [[SIToastWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 677 | window.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; 678 | window.opaque = NO; 679 | window.windowLevel = UIWindowLevelStatusBar + [UIApplication sharedApplication].windows.count; 680 | self.toastWindow = window; 681 | 682 | SIToastViewController *viewController = [[SIToastViewController alloc] init]; 683 | viewController.extendedLayoutIncludesOpaqueBars = YES; 684 | viewController.toastView = self; 685 | 686 | self.toastWindow.rootViewController = viewController; 687 | self.toastWindow.hidden = NO; 688 | 689 | [viewController.view layoutIfNeeded]; 690 | } 691 | 692 | - (void)transitionIn 693 | { 694 | if (self.willShowHandler) { 695 | self.willShowHandler(self); 696 | } 697 | [[NSNotificationCenter defaultCenter] postNotificationName:SIToastViewWillShowNotification object:self userInfo:nil]; 698 | 699 | void (^completion)(BOOL finished) = ^(BOOL finished) { 700 | if (self.didShowHandler) { 701 | self.didShowHandler(self); 702 | } 703 | [[NSNotificationCenter defaultCenter] postNotificationName:SIToastViewDidShowNotification object:self userInfo:nil]; 704 | }; 705 | 706 | if (self.gravity == SIToastViewGravityNone) { 707 | self.containerView.alpha = 0; 708 | self.containerView.transform = CGAffineTransformMakeScale(0.7, 0.7); 709 | [UIView animateKeyframesWithDuration:TRANSITION_DURATION 710 | delay:0 711 | options:UIViewKeyframeAnimationOptionCalculationModeLinear 712 | animations:^{ 713 | [UIView addKeyframeWithRelativeStartTime:0 714 | relativeDuration:0.8 715 | animations:^{ 716 | self.containerView.transform = CGAffineTransformMakeScale(1.1, 1.1); 717 | self.containerView.alpha = 1; 718 | }]; 719 | [UIView addKeyframeWithRelativeStartTime:0.8 720 | relativeDuration:0.2 721 | animations:^{ 722 | self.containerView.transform = CGAffineTransformIdentity; 723 | }]; 724 | } 725 | completion:completion]; 726 | } else { 727 | CGRect originalFrame = self.containerView.frame; 728 | if (self.gravity == SIToastViewGravityBottom) { 729 | [self setY:self.bounds.size.height forView:self.containerView]; 730 | } else { 731 | [self setY:-self.containerView.bounds.size.height forView:self.containerView]; 732 | } 733 | [UIView animateWithDuration:TRANSITION_DURATION 734 | animations:^{ 735 | self.containerView.frame = originalFrame; 736 | } 737 | completion:completion]; 738 | } 739 | 740 | if (self.mask == SIToastViewMaskSolid) { 741 | self.backgroundView.alpha = 0; 742 | [UIView animateWithDuration:TRANSITION_DURATION 743 | animations:^{ 744 | self.backgroundView.alpha = 1; 745 | }]; 746 | } 747 | } 748 | 749 | - (void)transitionOut 750 | { 751 | if (self.willDismissHandler) { 752 | self.willDismissHandler(self); 753 | } 754 | [[NSNotificationCenter defaultCenter] postNotificationName:SIToastViewWillDismissNotification object:self userInfo:nil]; 755 | 756 | void (^completion)(BOOL finished) = ^(BOOL finished) { 757 | [self.toastWindow removeFromSuperview]; 758 | self.toastWindow = nil; 759 | 760 | [self tearDown]; 761 | 762 | [__si_visible_toast_views removeObject:self]; 763 | 764 | if (self.didDismissHandler) { 765 | self.didDismissHandler(self); 766 | } 767 | [[NSNotificationCenter defaultCenter] postNotificationName:SIToastViewDidDismissNotification object:self userInfo:nil]; 768 | }; 769 | 770 | if (self.gravity == SIToastViewGravityNone) { 771 | [UIView animateKeyframesWithDuration:TRANSITION_DURATION 772 | delay:0 773 | options:UIViewKeyframeAnimationOptionCalculationModeLinear 774 | animations:^{ 775 | [UIView addKeyframeWithRelativeStartTime:0 776 | relativeDuration:0.2 777 | animations:^{ 778 | self.containerView.transform = CGAffineTransformMakeScale(1.1, 1.1); 779 | }]; 780 | [UIView addKeyframeWithRelativeStartTime:0.2 781 | relativeDuration:0.8 782 | animations:^{ 783 | self.containerView.transform = CGAffineTransformMakeScale(0.7, 0.7); 784 | self.containerView.alpha = 0; 785 | }]; 786 | } 787 | completion:completion]; 788 | } else { 789 | [UIView animateWithDuration:TRANSITION_DURATION 790 | animations:^{ 791 | if (self.gravity == SIToastViewGravityBottom) { 792 | [self setY:self.bounds.size.height forView:self.containerView]; 793 | } else { 794 | [self setY:-self.containerView.bounds.size.height forView:self.containerView]; 795 | } 796 | } 797 | completion:completion]; 798 | } 799 | if (self.mask == SIToastViewMaskSolid) { 800 | [UIView animateWithDuration:TRANSITION_DURATION 801 | animations:^{ 802 | self.backgroundView.alpha = 0; 803 | }]; 804 | } 805 | } 806 | 807 | #pragma mark - Action 808 | 809 | - (void)tapAction:(UITapGestureRecognizer *)recognizer 810 | { 811 | if (self.tapHandler) { 812 | self.tapHandler(self); 813 | } 814 | [[NSNotificationCenter defaultCenter] postNotificationName:SIToastViewDidTapNotification object:self userInfo:nil]; 815 | } 816 | 817 | #pragma mark - UIAppearance setters 818 | 819 | - (void)setViewBackgroundColor:(UIColor *)viewBackgroundColor 820 | { 821 | if (_viewBackgroundColor == viewBackgroundColor) { 822 | return; 823 | } 824 | _viewBackgroundColor = viewBackgroundColor; 825 | self.containerView.backgroundColor = viewBackgroundColor; 826 | } 827 | 828 | - (void)setMessageColor:(UIColor *)messageColor 829 | { 830 | if (_messageColor == messageColor) { 831 | return; 832 | } 833 | _messageColor = messageColor; 834 | self.messageLabel.textColor = messageColor; 835 | } 836 | 837 | - (void)setMessageFont:(UIFont *)messageFont 838 | { 839 | if (_messageFont == messageFont) { 840 | return; 841 | } 842 | _messageFont = messageFont; 843 | self.messageLabel.font = messageFont; 844 | [self setNeedsLayout]; 845 | } 846 | 847 | - (void)setActivityIndicatorColor:(UIColor *)activityIndicatorColor 848 | { 849 | if (_activityIndicatorColor == activityIndicatorColor) { 850 | return; 851 | } 852 | _activityIndicatorColor = activityIndicatorColor; 853 | self.activityIndicatorView.color = activityIndicatorColor; 854 | } 855 | 856 | - (void)setCornerRadius:(CGFloat)cornerRadius 857 | { 858 | if (_cornerRadius == cornerRadius) { 859 | return; 860 | } 861 | _cornerRadius = cornerRadius; 862 | self.containerView.layer.cornerRadius = cornerRadius; 863 | } 864 | 865 | - (void)setShadowRadius:(CGFloat)shadowRadius 866 | { 867 | if (_shadowRadius == shadowRadius) { 868 | return; 869 | } 870 | _shadowRadius = shadowRadius; 871 | self.containerView.layer.shadowRadius = shadowRadius; 872 | } 873 | 874 | - (void)setShadowOpacity:(CGFloat)shadowOpacity 875 | { 876 | if (_shadowOpacity == shadowOpacity) { 877 | return; 878 | } 879 | _shadowOpacity = shadowOpacity; 880 | self.containerView.layer.shadowOpacity = shadowOpacity; 881 | } 882 | 883 | @end 884 | -------------------------------------------------------------------------------- /SIToastViewExample/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sumi-Interactive/SIToastView/c8b8b60b7f5bae3b30bf622f939173ec36dbd34f/SIToastViewExample/Icon-72.png -------------------------------------------------------------------------------- /SIToastViewExample/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sumi-Interactive/SIToastView/c8b8b60b7f5bae3b30bf622f939173ec36dbd34f/SIToastViewExample/Icon-72@2x.png -------------------------------------------------------------------------------- /SIToastViewExample/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sumi-Interactive/SIToastView/c8b8b60b7f5bae3b30bf622f939173ec36dbd34f/SIToastViewExample/Icon.png -------------------------------------------------------------------------------- /SIToastViewExample/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sumi-Interactive/SIToastView/c8b8b60b7f5bae3b30bf622f939173ec36dbd34f/SIToastViewExample/Icon@2x.png -------------------------------------------------------------------------------- /SIToastViewExample/Podfile: -------------------------------------------------------------------------------- 1 | source 'https://github.com/CocoaPods/Specs.git' 2 | 3 | target 'SIToastViewExample', :exclusive => true do 4 | pod "SIToastView", :path => "../" 5 | end 6 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 493AE02E568046B5934F226C /* libPods-SIToastViewExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0F0B194832B84B6FB5A776CE /* libPods-SIToastViewExample.a */; }; 11 | 7E4B633B176EF4DA00C93DF1 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E4B633A176EF4DA00C93DF1 /* QuartzCore.framework */; }; 12 | 7E5DBCB11771B9E80004C9FE /* checkmark.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E5DBCAF1771B9E80004C9FE /* checkmark.png */; }; 13 | 7E5DBCB21771B9E80004C9FE /* checkmark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E5DBCB01771B9E80004C9FE /* checkmark@2x.png */; }; 14 | 7E6A7B32176B27DA0082D730 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E6A7B31176B27DA0082D730 /* UIKit.framework */; }; 15 | 7E6A7B34176B27DA0082D730 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E6A7B33176B27DA0082D730 /* Foundation.framework */; }; 16 | 7E6A7B36176B27DA0082D730 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E6A7B35176B27DA0082D730 /* CoreGraphics.framework */; }; 17 | 7E6A7B3C176B27DA0082D730 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7E6A7B3A176B27DA0082D730 /* InfoPlist.strings */; }; 18 | 7E6A7B3E176B27DA0082D730 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E6A7B3D176B27DA0082D730 /* main.m */; }; 19 | 7E6A7B42176B27DA0082D730 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E6A7B41176B27DA0082D730 /* AppDelegate.m */; }; 20 | 7E6A7B44176B27DA0082D730 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E6A7B43176B27DA0082D730 /* Default.png */; }; 21 | 7E6A7B46176B27DA0082D730 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E6A7B45176B27DA0082D730 /* Default@2x.png */; }; 22 | 7E6A7B48176B27DA0082D730 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E6A7B47176B27DA0082D730 /* Default-568h@2x.png */; }; 23 | 7E6A7B4B176B27DA0082D730 /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7E6A7B49176B27DA0082D730 /* MainStoryboard_iPhone.storyboard */; }; 24 | 7E6A7B4E176B27DA0082D730 /* MainStoryboard_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7E6A7B4C176B27DA0082D730 /* MainStoryboard_iPad.storyboard */; }; 25 | 7E6A7B51176B27DA0082D730 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E6A7B50176B27DA0082D730 /* ViewController.m */; }; 26 | 7E6A7B58176B280B0082D730 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E6A7B57176B280B0082D730 /* Icon.png */; }; 27 | 7E6A7B5A176B280E0082D730 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E6A7B59176B280E0082D730 /* Icon@2x.png */; }; 28 | 7E6A7B5C176B28120082D730 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E6A7B5B176B28120082D730 /* Icon-72.png */; }; 29 | 7E6A7B5E176B28150082D730 /* Icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E6A7B5D176B28150082D730 /* Icon-72@2x.png */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 0F0B194832B84B6FB5A776CE /* libPods-SIToastViewExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SIToastViewExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 7E4B633A176EF4DA00C93DF1 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 35 | 7E5DBCAF1771B9E80004C9FE /* checkmark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = checkmark.png; sourceTree = ""; }; 36 | 7E5DBCB01771B9E80004C9FE /* checkmark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "checkmark@2x.png"; sourceTree = ""; }; 37 | 7E6A7B2E176B27DA0082D730 /* SIToastViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SIToastViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 7E6A7B31176B27DA0082D730 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 39 | 7E6A7B33176B27DA0082D730 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 40 | 7E6A7B35176B27DA0082D730 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 41 | 7E6A7B39176B27DA0082D730 /* SIToastViewExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SIToastViewExample-Info.plist"; sourceTree = ""; }; 42 | 7E6A7B3B176B27DA0082D730 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 43 | 7E6A7B3D176B27DA0082D730 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 44 | 7E6A7B3F176B27DA0082D730 /* SIToastViewExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SIToastViewExample-Prefix.pch"; sourceTree = ""; }; 45 | 7E6A7B40176B27DA0082D730 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 46 | 7E6A7B41176B27DA0082D730 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 47 | 7E6A7B43176B27DA0082D730 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 48 | 7E6A7B45176B27DA0082D730 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 49 | 7E6A7B47176B27DA0082D730 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 50 | 7E6A7B4A176B27DA0082D730 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = ""; }; 51 | 7E6A7B4D176B27DA0082D730 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPad.storyboard; sourceTree = ""; }; 52 | 7E6A7B4F176B27DA0082D730 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 53 | 7E6A7B50176B27DA0082D730 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 54 | 7E6A7B57176B280B0082D730 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; 55 | 7E6A7B59176B280E0082D730 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = ""; }; 56 | 7E6A7B5B176B28120082D730 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; 57 | 7E6A7B5D176B28150082D730 /* Icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72@2x.png"; sourceTree = ""; }; 58 | 96B5D2A439B019643C627F57 /* Pods-SIToastViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SIToastViewExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SIToastViewExample/Pods-SIToastViewExample.debug.xcconfig"; sourceTree = ""; }; 59 | DED3151EF96AA578ED089A5F /* Pods-SIToastViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SIToastViewExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-SIToastViewExample/Pods-SIToastViewExample.release.xcconfig"; sourceTree = ""; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | 7E6A7B2B176B27DA0082D730 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | 7E4B633B176EF4DA00C93DF1 /* QuartzCore.framework in Frameworks */, 68 | 7E6A7B32176B27DA0082D730 /* UIKit.framework in Frameworks */, 69 | 7E6A7B34176B27DA0082D730 /* Foundation.framework in Frameworks */, 70 | 7E6A7B36176B27DA0082D730 /* CoreGraphics.framework in Frameworks */, 71 | 493AE02E568046B5934F226C /* libPods-SIToastViewExample.a in Frameworks */, 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | 7E5DBCA61771A9770004C9FE /* Images */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 7E5DBCAF1771B9E80004C9FE /* checkmark.png */, 82 | 7E5DBCB01771B9E80004C9FE /* checkmark@2x.png */, 83 | ); 84 | name = Images; 85 | sourceTree = ""; 86 | }; 87 | 7E6A7B25176B27DA0082D730 = { 88 | isa = PBXGroup; 89 | children = ( 90 | 7E6A7B37176B27DA0082D730 /* SIToastViewExample */, 91 | 7E6A7B30176B27DA0082D730 /* Frameworks */, 92 | 7E6A7B2F176B27DA0082D730 /* Products */, 93 | A210E4EE0A946CC5825E1A88 /* Pods */, 94 | ); 95 | sourceTree = ""; 96 | }; 97 | 7E6A7B2F176B27DA0082D730 /* Products */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 7E6A7B2E176B27DA0082D730 /* SIToastViewExample.app */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | 7E6A7B30176B27DA0082D730 /* Frameworks */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 7E4B633A176EF4DA00C93DF1 /* QuartzCore.framework */, 109 | 7E6A7B31176B27DA0082D730 /* UIKit.framework */, 110 | 7E6A7B33176B27DA0082D730 /* Foundation.framework */, 111 | 7E6A7B35176B27DA0082D730 /* CoreGraphics.framework */, 112 | 0F0B194832B84B6FB5A776CE /* libPods-SIToastViewExample.a */, 113 | ); 114 | name = Frameworks; 115 | sourceTree = ""; 116 | }; 117 | 7E6A7B37176B27DA0082D730 /* SIToastViewExample */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 7E5DBCA61771A9770004C9FE /* Images */, 121 | 7E6A7B5F176B281A0082D730 /* Icons */, 122 | 7E6A7B61176B282E0082D730 /* UI */, 123 | 7E6A7B60176B28280082D730 /* Classes */, 124 | 7E6A7B38176B27DA0082D730 /* Supporting Files */, 125 | ); 126 | path = SIToastViewExample; 127 | sourceTree = ""; 128 | }; 129 | 7E6A7B38176B27DA0082D730 /* Supporting Files */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 7E6A7B39176B27DA0082D730 /* SIToastViewExample-Info.plist */, 133 | 7E6A7B3A176B27DA0082D730 /* InfoPlist.strings */, 134 | 7E6A7B3D176B27DA0082D730 /* main.m */, 135 | 7E6A7B3F176B27DA0082D730 /* SIToastViewExample-Prefix.pch */, 136 | 7E6A7B43176B27DA0082D730 /* Default.png */, 137 | 7E6A7B45176B27DA0082D730 /* Default@2x.png */, 138 | 7E6A7B47176B27DA0082D730 /* Default-568h@2x.png */, 139 | ); 140 | name = "Supporting Files"; 141 | sourceTree = ""; 142 | }; 143 | 7E6A7B5F176B281A0082D730 /* Icons */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | 7E6A7B5D176B28150082D730 /* Icon-72@2x.png */, 147 | 7E6A7B5B176B28120082D730 /* Icon-72.png */, 148 | 7E6A7B59176B280E0082D730 /* Icon@2x.png */, 149 | 7E6A7B57176B280B0082D730 /* Icon.png */, 150 | ); 151 | name = Icons; 152 | path = ..; 153 | sourceTree = ""; 154 | }; 155 | 7E6A7B60176B28280082D730 /* Classes */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 7E6A7B40176B27DA0082D730 /* AppDelegate.h */, 159 | 7E6A7B41176B27DA0082D730 /* AppDelegate.m */, 160 | 7E6A7B4F176B27DA0082D730 /* ViewController.h */, 161 | 7E6A7B50176B27DA0082D730 /* ViewController.m */, 162 | ); 163 | name = Classes; 164 | sourceTree = ""; 165 | }; 166 | 7E6A7B61176B282E0082D730 /* UI */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | 7E6A7B49176B27DA0082D730 /* MainStoryboard_iPhone.storyboard */, 170 | 7E6A7B4C176B27DA0082D730 /* MainStoryboard_iPad.storyboard */, 171 | ); 172 | name = UI; 173 | sourceTree = ""; 174 | }; 175 | A210E4EE0A946CC5825E1A88 /* Pods */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 96B5D2A439B019643C627F57 /* Pods-SIToastViewExample.debug.xcconfig */, 179 | DED3151EF96AA578ED089A5F /* Pods-SIToastViewExample.release.xcconfig */, 180 | ); 181 | name = Pods; 182 | sourceTree = ""; 183 | }; 184 | /* End PBXGroup section */ 185 | 186 | /* Begin PBXNativeTarget section */ 187 | 7E6A7B2D176B27DA0082D730 /* SIToastViewExample */ = { 188 | isa = PBXNativeTarget; 189 | buildConfigurationList = 7E6A7B54176B27DA0082D730 /* Build configuration list for PBXNativeTarget "SIToastViewExample" */; 190 | buildPhases = ( 191 | 3E5706F7E146431DB3757AA6 /* Check Pods Manifest.lock */, 192 | 7E6A7B2A176B27DA0082D730 /* Sources */, 193 | 7E6A7B2B176B27DA0082D730 /* Frameworks */, 194 | 7E6A7B2C176B27DA0082D730 /* Resources */, 195 | F6D7EC2C6D3A4D409E4A26F7 /* Copy Pods Resources */, 196 | ); 197 | buildRules = ( 198 | ); 199 | dependencies = ( 200 | ); 201 | name = SIToastViewExample; 202 | productName = SIToastViewExample; 203 | productReference = 7E6A7B2E176B27DA0082D730 /* SIToastViewExample.app */; 204 | productType = "com.apple.product-type.application"; 205 | }; 206 | /* End PBXNativeTarget section */ 207 | 208 | /* Begin PBXProject section */ 209 | 7E6A7B26176B27DA0082D730 /* Project object */ = { 210 | isa = PBXProject; 211 | attributes = { 212 | LastUpgradeCheck = 0460; 213 | ORGANIZATIONNAME = "Sumi Interactive"; 214 | }; 215 | buildConfigurationList = 7E6A7B29176B27DA0082D730 /* Build configuration list for PBXProject "SIToastViewExample" */; 216 | compatibilityVersion = "Xcode 3.2"; 217 | developmentRegion = English; 218 | hasScannedForEncodings = 0; 219 | knownRegions = ( 220 | en, 221 | ); 222 | mainGroup = 7E6A7B25176B27DA0082D730; 223 | productRefGroup = 7E6A7B2F176B27DA0082D730 /* Products */; 224 | projectDirPath = ""; 225 | projectRoot = ""; 226 | targets = ( 227 | 7E6A7B2D176B27DA0082D730 /* SIToastViewExample */, 228 | ); 229 | }; 230 | /* End PBXProject section */ 231 | 232 | /* Begin PBXResourcesBuildPhase section */ 233 | 7E6A7B2C176B27DA0082D730 /* Resources */ = { 234 | isa = PBXResourcesBuildPhase; 235 | buildActionMask = 2147483647; 236 | files = ( 237 | 7E6A7B3C176B27DA0082D730 /* InfoPlist.strings in Resources */, 238 | 7E6A7B44176B27DA0082D730 /* Default.png in Resources */, 239 | 7E6A7B46176B27DA0082D730 /* Default@2x.png in Resources */, 240 | 7E6A7B48176B27DA0082D730 /* Default-568h@2x.png in Resources */, 241 | 7E6A7B4B176B27DA0082D730 /* MainStoryboard_iPhone.storyboard in Resources */, 242 | 7E6A7B4E176B27DA0082D730 /* MainStoryboard_iPad.storyboard in Resources */, 243 | 7E6A7B58176B280B0082D730 /* Icon.png in Resources */, 244 | 7E6A7B5A176B280E0082D730 /* Icon@2x.png in Resources */, 245 | 7E6A7B5C176B28120082D730 /* Icon-72.png in Resources */, 246 | 7E6A7B5E176B28150082D730 /* Icon-72@2x.png in Resources */, 247 | 7E5DBCB11771B9E80004C9FE /* checkmark.png in Resources */, 248 | 7E5DBCB21771B9E80004C9FE /* checkmark@2x.png in Resources */, 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | /* End PBXResourcesBuildPhase section */ 253 | 254 | /* Begin PBXShellScriptBuildPhase section */ 255 | 3E5706F7E146431DB3757AA6 /* Check Pods Manifest.lock */ = { 256 | isa = PBXShellScriptBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | ); 260 | inputPaths = ( 261 | ); 262 | name = "Check Pods Manifest.lock"; 263 | outputPaths = ( 264 | ); 265 | runOnlyForDeploymentPostprocessing = 0; 266 | shellPath = /bin/sh; 267 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 268 | showEnvVarsInLog = 0; 269 | }; 270 | F6D7EC2C6D3A4D409E4A26F7 /* Copy Pods Resources */ = { 271 | isa = PBXShellScriptBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | ); 275 | inputPaths = ( 276 | ); 277 | name = "Copy Pods Resources"; 278 | outputPaths = ( 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | shellPath = /bin/sh; 282 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SIToastViewExample/Pods-SIToastViewExample-resources.sh\"\n"; 283 | showEnvVarsInLog = 0; 284 | }; 285 | /* End PBXShellScriptBuildPhase section */ 286 | 287 | /* Begin PBXSourcesBuildPhase section */ 288 | 7E6A7B2A176B27DA0082D730 /* Sources */ = { 289 | isa = PBXSourcesBuildPhase; 290 | buildActionMask = 2147483647; 291 | files = ( 292 | 7E6A7B3E176B27DA0082D730 /* main.m in Sources */, 293 | 7E6A7B42176B27DA0082D730 /* AppDelegate.m in Sources */, 294 | 7E6A7B51176B27DA0082D730 /* ViewController.m in Sources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | /* End PBXSourcesBuildPhase section */ 299 | 300 | /* Begin PBXVariantGroup section */ 301 | 7E6A7B3A176B27DA0082D730 /* InfoPlist.strings */ = { 302 | isa = PBXVariantGroup; 303 | children = ( 304 | 7E6A7B3B176B27DA0082D730 /* en */, 305 | ); 306 | name = InfoPlist.strings; 307 | sourceTree = ""; 308 | }; 309 | 7E6A7B49176B27DA0082D730 /* MainStoryboard_iPhone.storyboard */ = { 310 | isa = PBXVariantGroup; 311 | children = ( 312 | 7E6A7B4A176B27DA0082D730 /* en */, 313 | ); 314 | name = MainStoryboard_iPhone.storyboard; 315 | sourceTree = ""; 316 | }; 317 | 7E6A7B4C176B27DA0082D730 /* MainStoryboard_iPad.storyboard */ = { 318 | isa = PBXVariantGroup; 319 | children = ( 320 | 7E6A7B4D176B27DA0082D730 /* en */, 321 | ); 322 | name = MainStoryboard_iPad.storyboard; 323 | sourceTree = ""; 324 | }; 325 | /* End PBXVariantGroup section */ 326 | 327 | /* Begin XCBuildConfiguration section */ 328 | 7E6A7B52176B27DA0082D730 /* Debug */ = { 329 | isa = XCBuildConfiguration; 330 | buildSettings = { 331 | ALWAYS_SEARCH_USER_PATHS = NO; 332 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 333 | CLANG_CXX_LIBRARY = "libc++"; 334 | CLANG_ENABLE_OBJC_ARC = YES; 335 | CLANG_WARN_CONSTANT_CONVERSION = YES; 336 | CLANG_WARN_EMPTY_BODY = YES; 337 | CLANG_WARN_ENUM_CONVERSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 340 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 341 | COPY_PHASE_STRIP = NO; 342 | GCC_C_LANGUAGE_STANDARD = gnu99; 343 | GCC_DYNAMIC_NO_PIC = NO; 344 | GCC_OPTIMIZATION_LEVEL = 0; 345 | GCC_PREPROCESSOR_DEFINITIONS = ( 346 | "DEBUG=1", 347 | "$(inherited)", 348 | ); 349 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 350 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 351 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 354 | ONLY_ACTIVE_ARCH = YES; 355 | SDKROOT = iphoneos; 356 | TARGETED_DEVICE_FAMILY = "1,2"; 357 | }; 358 | name = Debug; 359 | }; 360 | 7E6A7B53176B27DA0082D730 /* Release */ = { 361 | isa = XCBuildConfiguration; 362 | buildSettings = { 363 | ALWAYS_SEARCH_USER_PATHS = NO; 364 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 365 | CLANG_CXX_LIBRARY = "libc++"; 366 | CLANG_ENABLE_OBJC_ARC = YES; 367 | CLANG_WARN_CONSTANT_CONVERSION = YES; 368 | CLANG_WARN_EMPTY_BODY = YES; 369 | CLANG_WARN_ENUM_CONVERSION = YES; 370 | CLANG_WARN_INT_CONVERSION = YES; 371 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 372 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 373 | COPY_PHASE_STRIP = YES; 374 | GCC_C_LANGUAGE_STANDARD = gnu99; 375 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 377 | GCC_WARN_UNUSED_VARIABLE = YES; 378 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 379 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 380 | SDKROOT = iphoneos; 381 | TARGETED_DEVICE_FAMILY = "1,2"; 382 | VALIDATE_PRODUCT = YES; 383 | }; 384 | name = Release; 385 | }; 386 | 7E6A7B55176B27DA0082D730 /* Debug */ = { 387 | isa = XCBuildConfiguration; 388 | baseConfigurationReference = 96B5D2A439B019643C627F57 /* Pods-SIToastViewExample.debug.xcconfig */; 389 | buildSettings = { 390 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 391 | GCC_PREFIX_HEADER = "SIToastViewExample/SIToastViewExample-Prefix.pch"; 392 | INFOPLIST_FILE = "SIToastViewExample/SIToastViewExample-Info.plist"; 393 | PRODUCT_NAME = "$(TARGET_NAME)"; 394 | WRAPPER_EXTENSION = app; 395 | }; 396 | name = Debug; 397 | }; 398 | 7E6A7B56176B27DA0082D730 /* Release */ = { 399 | isa = XCBuildConfiguration; 400 | baseConfigurationReference = DED3151EF96AA578ED089A5F /* Pods-SIToastViewExample.release.xcconfig */; 401 | buildSettings = { 402 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 403 | GCC_PREFIX_HEADER = "SIToastViewExample/SIToastViewExample-Prefix.pch"; 404 | INFOPLIST_FILE = "SIToastViewExample/SIToastViewExample-Info.plist"; 405 | PRODUCT_NAME = "$(TARGET_NAME)"; 406 | WRAPPER_EXTENSION = app; 407 | }; 408 | name = Release; 409 | }; 410 | /* End XCBuildConfiguration section */ 411 | 412 | /* Begin XCConfigurationList section */ 413 | 7E6A7B29176B27DA0082D730 /* Build configuration list for PBXProject "SIToastViewExample" */ = { 414 | isa = XCConfigurationList; 415 | buildConfigurations = ( 416 | 7E6A7B52176B27DA0082D730 /* Debug */, 417 | 7E6A7B53176B27DA0082D730 /* Release */, 418 | ); 419 | defaultConfigurationIsVisible = 0; 420 | defaultConfigurationName = Release; 421 | }; 422 | 7E6A7B54176B27DA0082D730 /* Build configuration list for PBXNativeTarget "SIToastViewExample" */ = { 423 | isa = XCConfigurationList; 424 | buildConfigurations = ( 425 | 7E6A7B55176B27DA0082D730 /* Debug */, 426 | 7E6A7B56176B27DA0082D730 /* Release */, 427 | ); 428 | defaultConfigurationIsVisible = 0; 429 | defaultConfigurationName = Release; 430 | }; 431 | /* End XCConfigurationList section */ 432 | }; 433 | rootObject = 7E6A7B26176B27DA0082D730 /* Project object */; 434 | } 435 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample.xcodeproj/project.xcworkspace/xcshareddata/SIToastViewExample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 71A1799C-E1AF-488F-9825-ABD5D06D5D36 9 | IDESourceControlProjectName 10 | SIToastViewExample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | C3BCAC7F-5FA7-4185-A9DE-A761C8B37BFF 14 | https://github.com/Sumi-Interactive/SIToastView.git 15 | 16 | IDESourceControlProjectPath 17 | SIToastViewExample/SIToastViewExample.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | C3BCAC7F-5FA7-4185-A9DE-A761C8B37BFF 21 | ../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/Sumi-Interactive/SIToastView.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | C3BCAC7F-5FA7-4185-A9DE-A761C8B37BFF 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | C3BCAC7F-5FA7-4185-A9DE-A761C8B37BFF 36 | IDESourceControlWCCName 37 | SIToastView 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample.xcworkspace/xcshareddata/SIToastViewExample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | E9CEF3C3-9674-40F9-9A2E-7C9522C481B6 9 | IDESourceControlProjectName 10 | SIToastViewExample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 607AA31AAFA2F6D94A351425425E083DA30799B9 14 | github.com:Sumi-Interactive/SIToastView.git 15 | 16 | IDESourceControlProjectPath 17 | SIToastViewExample/SIToastViewExample.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 607AA31AAFA2F6D94A351425425E083DA30799B9 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | github.com:Sumi-Interactive/SIToastView.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 607AA31AAFA2F6D94A351425425E083DA30799B9 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 607AA31AAFA2F6D94A351425425E083DA30799B9 36 | IDESourceControlWCCName 37 | SIToastView 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SIToastViewExample 4 | // 5 | // Created by Kevin Cao on 13-6-14. 6 | // Copyright (c) 2013年 Sumi Interactive. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // SIToastViewExample 4 | // 5 | // Created by Kevin Cao on 13-6-14. 6 | // Copyright (c) 2013年 Sumi Interactive. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sumi-Interactive/SIToastView/c8b8b60b7f5bae3b30bf622f939173ec36dbd34f/SIToastViewExample/SIToastViewExample/Default-568h@2x.png -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sumi-Interactive/SIToastView/c8b8b60b7f5bae3b30bf622f939173ec36dbd34f/SIToastViewExample/SIToastViewExample/Default.png -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sumi-Interactive/SIToastView/c8b8b60b7f5bae3b30bf622f939173ec36dbd34f/SIToastViewExample/SIToastViewExample/Default@2x.png -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/SIToastViewExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIcons 12 | 13 | CFBundlePrimaryIcon 14 | 15 | CFBundleIconFiles 16 | 17 | Icon.png 18 | Icon@2x.png 19 | Icon-72.png 20 | Icon-72@2x.png 21 | 22 | UIPrerenderedIcon 23 | 24 | 25 | 26 | CFBundleIdentifier 27 | com.sumi-sumi.${PRODUCT_NAME:rfc1034identifier} 28 | CFBundleInfoDictionaryVersion 29 | 6.0 30 | CFBundleName 31 | ${PRODUCT_NAME} 32 | CFBundlePackageType 33 | APPL 34 | CFBundleShortVersionString 35 | 1.0 36 | CFBundleSignature 37 | ???? 38 | CFBundleVersion 39 | 1.0 40 | LSRequiresIPhoneOS 41 | 42 | UIMainStoryboardFile 43 | MainStoryboard_iPhone 44 | UIMainStoryboardFile~ipad 45 | MainStoryboard_iPad 46 | UIPrerenderedIcon 47 | 48 | UIRequiredDeviceCapabilities 49 | 50 | armv7 51 | 52 | UISupportedInterfaceOrientations 53 | 54 | UIInterfaceOrientationPortrait 55 | UIInterfaceOrientationLandscapeLeft 56 | UIInterfaceOrientationLandscapeRight 57 | 58 | UISupportedInterfaceOrientations~ipad 59 | 60 | UIInterfaceOrientationPortrait 61 | UIInterfaceOrientationPortraitUpsideDown 62 | UIInterfaceOrientationLandscapeLeft 63 | UIInterfaceOrientationLandscapeRight 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/SIToastViewExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'SIToastViewExample' target in the 'SIToastViewExample' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // SIToastViewExample 4 | // 5 | // Created by Kevin Cao on 13-6-14. 6 | // Copyright (c) 2013年 Sumi Interactive. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // SIToastViewExample 4 | // 5 | // Created by Kevin Cao on 13-6-14. 6 | // Copyright (c) 2013年 Sumi Interactive. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "SIToastView.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong) SIToastView *aToastView; 15 | 16 | @end 17 | 18 | @implementation ViewController 19 | 20 | - (void)dealloc 21 | { 22 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 23 | } 24 | 25 | - (void)viewDidLoad 26 | { 27 | [super viewDidLoad]; 28 | 29 | // [[SIToastView appearance] setViewBackgroundColor:[UIColor darkGrayColor]]; 30 | // [[SIToastView appearance] setMessageColor:[UIColor whiteColor]]; 31 | 32 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willShowHandler:) name:SIToastViewWillShowNotification object:nil]; 33 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didShowHandler:) name:SIToastViewDidShowNotification object:nil]; 34 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willDismissHandler:) name:SIToastViewWillDismissNotification object:nil]; 35 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didDismissHandler:) name:SIToastViewDidDismissNotification object:nil]; 36 | } 37 | 38 | - (void)didReceiveMemoryWarning 39 | { 40 | [super didReceiveMemoryWarning]; 41 | // Dispose of any resources that can be recreated. 42 | } 43 | 44 | - (IBAction)show1:(id)sender 45 | { 46 | // SIToastView *toastView = [SIToastView showToastWithActivityAndMessage:nil]; 47 | // double delayInSeconds = 3.0; 48 | // dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); 49 | // dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ 50 | // [toastView dismiss]; 51 | // }); 52 | // [SIToastView showToastWithMessage:@"Hello Sumi!" duration:3]; 53 | 54 | // [SIToastView showToastWithImage:[UIImage imageNamed:@"checkmark"] message:@"Success Etiam porta sem malesuada magna mollis euismod. " duration:2 gravity:SIToastViewGravityTop offset:50]; 55 | 56 | // SIToastView *toastView = [[SIToastView alloc] init]; 57 | // toastView.message = @"Etiam porta"; 58 | // toastView.showActivity = YES; 59 | // toastView.gravity = SIToastViewGravityTop; 60 | // toastView.offset = 30; 61 | // toastView.duration = 2; 62 | // toastView.willShowHandler = ^(SIToastView *toastView) { 63 | // NSLog(@"willShowHandler, %@", toastView); 64 | // }; 65 | // toastView.didShowHandler = ^(SIToastView *toastView) { 66 | // NSLog(@"didShowHandler, %@", toastView); 67 | // }; 68 | // toastView.willDismissHandler = ^(SIToastView *toastView) { 69 | // NSLog(@"willDismissHandler, %@", toastView); 70 | // }; 71 | // toastView.didDismissHandler = ^(SIToastView *toastView) { 72 | // NSLog(@"didDismissHandler, %@", toastView); 73 | // }; 74 | // [toastView show]; 75 | 76 | // SIToastView *toastView = [SIToastView showToastWithMessage:@"Ni hao" duration:5]; 77 | // toastView.duration = 1; 78 | 79 | // SIToastView *toastView = [SIToastView showToastWithMessage:@"Nullam quis risus eget urna mollis ornare vel eu leo."]; 80 | // toastView.didDismissHandler = ^(SIToastView *myToastView) { 81 | // [myToastView showMessage:@"Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Vestibulum id ligula porta felis euismod semper. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. Maecenas sed diam eget risus varius blandit sit amet non magna. Vestibulum id ligula porta felis euismod semper." duration:2]; 82 | // myToastView.didDismissHandler = nil; 83 | // }; 84 | // [toastView showMessage:@"text 2" duration:2 gravity:SIToastViewGravityTop]; 85 | 86 | SIToastView *toastView = [SIToastView showToastWithImage:[UIImage imageNamed:@"checkmark"] message:@"Job Done" duration:3 gravity:SIToastViewGravityTop offset:0 mask:SIToastViewMaskSolid style:SIToastViewStyleBanner]; 87 | toastView.tapHandler = ^(SIToastView *toastView) { 88 | [toastView dismiss]; 89 | }; 90 | } 91 | 92 | - (IBAction)show2:(id)sender 93 | { 94 | // SIToastView *toastView = [SIToastView showToastWithMessage:@"Etiam porta sem malesuada." duration:1 gravity:SIToastViewGravityTop]; 95 | // toastView.offset = 50; 96 | 97 | SIToastView *toastView2 = [SIToastView showToastWithActivityAndMessage:@"Vivamus sagittis lacus vel augue." gravity:SIToastViewGravityNone offset:0]; 98 | // toastView2.activityIndicatorColor = [UIColor blueColor]; 99 | double delayInSeconds = 2.0; 100 | dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); 101 | dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ 102 | [toastView2 dismiss]; 103 | }); 104 | 105 | // [SIToastView showActivityWithMessage:@"Etiam porta sem malesuada magna mollis euismod."]; 106 | // [SIToastView showActivityWithMessage:@"Etiam porta sem malesuada magna mollis euismod. Donec id elit non mi porta gravida at eget metus."]; 107 | } 108 | 109 | #pragma mark - Notifications 110 | 111 | - (void)willShowHandler:(NSNotification *)notification 112 | { 113 | NSLog(@"%@, %@", NSStringFromSelector(_cmd), notification.object); 114 | } 115 | 116 | - (void)didShowHandler:(NSNotification *)notification 117 | { 118 | NSLog(@"%@, %@", NSStringFromSelector(_cmd), notification.object); 119 | } 120 | 121 | - (void)willDismissHandler:(NSNotification *)notification 122 | { 123 | NSLog(@"%@, %@", NSStringFromSelector(_cmd), notification.object); 124 | } 125 | 126 | - (void)didDismissHandler:(NSNotification *)notification 127 | { 128 | NSLog(@"%@, %@", NSStringFromSelector(_cmd), notification.object); 129 | 130 | NSLog(@"%@", [SIToastView visibleToastViews]); 131 | } 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sumi-Interactive/SIToastView/c8b8b60b7f5bae3b30bf622f939173ec36dbd34f/SIToastViewExample/SIToastViewExample/checkmark.png -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/checkmark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sumi-Interactive/SIToastView/c8b8b60b7f5bae3b30bf622f939173ec36dbd34f/SIToastViewExample/SIToastViewExample/checkmark@2x.png -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/en.lproj/MainStoryboard_iPad.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/en.lproj/MainStoryboard_iPhone.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 26 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /SIToastViewExample/SIToastViewExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SIToastViewExample 4 | // 5 | // Created by Kevin Cao on 13-6-14. 6 | // Copyright (c) 2013年 Sumi Interactive. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | --------------------------------------------------------------------------------