`

GCDiscreetNotificationView提示视图

    博客分类:
  • ios
 
阅读更多
先看一下效果图:
[img]

[/img]

注意顶部的加载提示


如果打算使用这种效果,在工程中添加:GCDiscreetNotificationView.h 和 GCDiscreetNotificationView.m文件

调用方法:

ViewController.h如下:
//
//  ViewController.h
//  TestToast
//
//  Created by 张 志亮 on 13-1-14.
//  Copyright (c) 2013年 张 志亮. All rights reserved.
//

#import <UIKit/UIKit.h>

@class GCDiscreetNotificationView;
@interface ViewController : UIViewController

@property(nonatomic,retain)GCDiscreetNotificationView *notificationView;

@end


ViewController.m如下:
//
//  ViewController.m
//  TestToast
//
//  Created by 张 志亮 on 13-1-14.
//  Copyright (c) 2013年 张 志亮. All rights reserved.
//

#import "ViewController.h"
#import "GCDiscreetNotificationView.h"

@interface ViewController ()

@end

@implementation ViewController
@synthesize notificationView;
- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    // if inPresentationMode: is no  The notification will on top
    // if inPresentationMode: is yes the notification will on bottom
    
    notificationView = [[GCDiscreetNotificationView alloc] initWithText:@"notification"
                                                           showActivity:YES
                                                     inPresentationMode:NO
                                                                 inView:self.view];
    [self.notificationView show:YES];
    
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end



附上源码(开源中国):


  • 大小: 23.6 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics