ITeye博客

GCDiscreetNotificationView提示视图

android_zhang · 2013-06-05 11:17 · ios · 移动开发 · Markdown

先看一下效果图:

注意顶部的加载提示

如果打算使用这种效果,在工程中添加: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

附上源码(开源中国):

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。