iOS 判讀是否登入

來源:互聯網
上載者:User

標籤: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 = [superinitWithFrame:frame];

   if (self) {


        

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

        //self.backgroundColor =[UIColor whiteColor];

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

        self.scoreLabel.text =@"您的帳號在別的裝置有登入請求,請確認";

       self.scoreLabel.textColor =[UIColorblueColor];

        self.scoreLabel.textAlignment = NSTextAlignmentCenter;

       self.scoreLabel.font =[UIFontsystemFontOfSize:12];

        [_blackImageaddSubview:self.scoreLabel];

        

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

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

        self.yesButton.backgroundColor=[UIColorredColor];

        [_blackImageaddSubview:self.yesButton];

        

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

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

        self.noButton.backgroundColor=[UIColorredColor];

        [_blackImageaddSubview:self.noButton];

        

        [[[UIApplicationsharedApplication].delegatewindow] addSubview:_blackImage];

        

    }

    return self;

}


//顯示文字並設定大哦哦那個花

+ (void)showString:(NSString *)string

{

   ismyRight *animation =[[ismyRightalloc]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 判讀是否登入

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.