码迷,mamicode.com
首页 > 移动开发 > 详细

iOS 判读是否登录

时间:2015-05-21 09:08:14      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:ios 登录 判读是否登录


直接代码

//

//  ismyRight.h

//  panGuChina

//

//  Created by taogu on 15/5/9.

//  Copyright (c) 2015 com.taogucn.www. All rights reserved.

//


#import <UIKit/UIKit.h>


@interface ismyRight : UIView

@property (nonatomic, strong) UILabel * scoreLabel;

@property (nonatomic, strong) UIImageView * blackImage;

@property (nonatomic,strong) UIButton *yesButton;

@property (nonatomic,strong) UIButton *noButton;

+ (void)showString:(NSString *)string;


@end

#import "ismyRight.h"


@implementation ismyRight


- (id)initWithFrame:(CGRect)frame withTitle:(NSString *)title

{

    self = [super initWithFrame:frame];

    if (self) {


        

        _blackImage =[[UIImageView alloc]initWithFrame:CGRectMake((VIEW_WIDTH - 150) / 2, VIEW_HEIGHT / 2 - 30, 120, 150)];

        //self.backgroundColor =[UIColor whiteColor];

        self.scoreLabel =[[UILabel alloc]initWithFrame:CGRectMake(10, 10, 100, 20)];

        self.scoreLabel.text =@"您的账号在别的设备有登录请求,请确认";

        self.scoreLabel.textColor =[UIColor blueColor];

        self.scoreLabel.textAlignment = NSTextAlignmentCenter;

        self.scoreLabel.font =[UIFont systemFontOfSize:12];

        [_blackImage addSubview:self.scoreLabel];

        

        self.yesButton =[[UIButton alloc]initWithFrame:CGRectMake(10, 40, 30, 30)];

        self.yesButton.titleLabel.text =@"";

        self.yesButton.backgroundColor=[UIColor redColor];

        [_blackImage addSubview:self.yesButton];

        

        self.noButton =[[UIButton alloc]initWithFrame:CGRectMake(60, 40, 30, 30)];

        self.noButton.titleLabel.text =@"";

        self.noButton.backgroundColor=[UIColor redColor];

        [_blackImage addSubview:self.noButton];

        

        [[[UIApplication sharedApplication].delegate window] addSubview:_blackImage];

        

    }

    return self;

}


//显示文字并设置大哦哦那个花

+ (void)showString:(NSString *)string

{

    ismyRight *animation =[[ismyRight alloc]initWithFrame: CGRectMake((VIEW_WIDTH - 150) / 2, VIEW_HEIGHT / 2 - 30, 120, 150)withTitle:string];

    

   

//    AnimationView * animation = [[AnimationView alloc] initWithFrame:CGRectMake((VIEW_WIDTH - 150) / 2, VIEW_HEIGHT / 2 - 30, 150, 60) withTitle:string];

//    [animation startAnimationSeconds:seconds];

}


/*

// Only override drawRect: if you perform custom drawing.

// An empty implementation adversely affects performance during animation.

- (void)drawRect:(CGRect)rect {

    // Drawing code

}

*/


@end



iOS 判读是否登录

标签:ios 登录 判读是否登录

原文地址:http://blog.csdn.net/sammyieveo/article/details/45880081

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!