IOS login?

Source: Internet
Author: User

IOS login?

 

Direct code

//

// IsmyRight. h

// PanGuChina

//

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

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

//

 

# Import

 

@ 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 = @ "Your account has a login request on another device. Please confirm ";

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 = @ "yes ";

Self. yesButton. backgroundColor = [UIColor redColor];

[_ BlackImage addSubview: self. yesButton];

 

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

Self. noButton. titleLabel. text = @ "no ";

Self. noButton. backgroundColor = [UIColor redColor];

[_ BlackImage addSubview: self. noButton];

 

[[[UIApplication sharedApplication]. delegate window] addSubview: _ blackImage];

 

}

Return self;

}

 

// Display the text and set it to large.

+ (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



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.