標籤: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 判讀是否登入