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

时间: 2024-08-14 04:04:11

iOS 判读是否登录的相关文章

iOS Mac忘记登录密码的4种解决方法

4种方法: 一.使用Apple ID重置用户账户密码 使用这个方法有一个前提 如上图红框,此项必须勾选,否则无法使用Apple ID重置密码.(如果你不记得有没有勾选,则你起码要记得首次启动 OS X 或装有 OS X Lion 或更高版本的全新 Mac 时,你会进入“OS X 设置助理”,其中需要你输入 Apple ID.输入 Apple ID 后,请在“创建您的帐户”阶段选择“允许我的 Apple ID 重设此用户的密码”选项.) 好了,来说下具体实现的方法: 如果您在登录窗口错误输入帐户密

无处不在,详解iOS集成第三方登录(SSO授权登录&lt;无需密码&gt;)

1.前言 不多说,第三登录无处不在!必备技能,今天以新浪微博为例. 这是上次写的iOS第三方社交分享:http://www.cnblogs.com/qingche/p/3727559.html 可以和今天的一起集成使用. 2.集成前的准备工作 2.1.去ShareSDK(现为Mob)注册帐号,下载SDK,然后添加自己的应用后得到AppKey 下载地址:http://sharesdk.cn/Download 2.2.申请第三方登录的Appkey 例如: 新浪微博.腾讯微博.QQ.微信.豆瓣应用.人

iOS- 无处不在,详解iOS集成第三方登录(SSO授权登录&lt;无需密码&gt;)

1.前言 不多说,第三登录无处不在!必备技能,今天以新浪微博为例. 这是上次写的iOS第三方社交分享:http://www.cnblogs.com/qingche/p/3727559.html 可以和今天的一起集成使用. 2.集成前的准备工作 2.1.去ShareSDK(现为Mob)注册帐号,下载SDK,然后添加自己的应用后得到AppKey 下载地址:http://sharesdk.cn/Download 2.2.申请第三方登录的Appkey 例如: 新浪微博.腾讯微博.QQ.微信.豆瓣应用.人

豪哥学ios开发之登录界面

首先在ViewController.h文件中: #import <UIKit/UIKit.h> #import "SRWebSocket.h" //继承SRWebSocket.h,作为登录服务器 @interface ViewController : UIViewController<UITextFieldDelegate,SRWebSocketDelegate> //- (IBAction)SaveLogin:(id)sender; //与SB联系账号输入,密

iOS无处不在详解iOS集成第三方登录(SSO授权登录无需密码)

链接地址:http://www.it165.net/pro/html/201408/18884.html 1.前言 不多说,第三登录无处不在!必备技能,今天以新浪微博为例. 这是上次写的iOS第三方社交分享:http://www.cnblogs.com/qingche/p/3727559.html 可以和今天的一起集成使用. 2.集成前的准备工作 2.1.去ShareSDK(现为Mob)注册帐号,下载SDK,然后添加自己的应用后得到AppKey 下载地址:http://sharesdk.cn/D

iOS 自己主动登录,登录过程中一直显示载入页

iOS开发中 假设client做的人性化一点肯定会考虑自己主动登录 事实上原理非常easy,就是再首次登录成功之后将username和password存入userdefault 下次登录的时候推断usedefault中有没有存储usernamepassword,假设有的话就绕过登录界面直接登录 可是在做的过程中遇到了一个问题 如今做一整理,供大家学习,指正 一般实现自己主动登录都是在载入页中去实现. 可是登录一般都须要与server通信.是异步的,而载入页在主线程中.这样就无法控制载入页在登录完

iOS常用技术-登录界面

////  SXTTextField.h//  04-UITextField练习////  Created by andezhou on 16/1/8.//  Copyright (c) 2016年 周安德. All rights reserved.// #import <UIKit/UIKit.h> @interface SXTTextField : UITextField // 设置左边图片名字@property (copy, nonatomic) NSString *leftImgNam

IOS 判读档当前网络状态

互联网的时代,一切都有网络的时代,没有网络啥也干不了,正如开发一个APP,关心用户,检测是否又网,都需要做出判断,最常用的就是下面这个 Reachability 支持ARC和GCD 定义一个方法,通过返回值来判读啊,还是直接在方法里面判断,都是可以 下面是其中一个方法 - (void)networkStateChange { // 1.检测wifi状态 Reachability *wifi = [Reachability reachabilityForLocalWiFi]; // 2.检测手机是

猫猫学习ios 之第三方登录友盟实现

一:集成友盟分享 做第三方登录现在大多数用友盟,友盟之中做第三方登录的时候首先下载sdk,然后自己看文档,其实友盟的官方文档写的已经十分清楚了,这里自己写写,做一下笔记 二:详细 友盟:http://www.umeng.com/ appDelegate中写入 //设置分享到QQ/Qzone的应用Id,和分享url 链接 #import "UMSocialQQHandler.h" [UMSocialQQHandler setQQWithAppId:@"100424468&quo