iOS页面跳转传递数据之block的使用
来源:互联网 发布:大数据hadoop生态圈 编辑:程序博客网 时间:2024/05/16 01:35
//
// ViewController.h
// QQLogin
//
// Created by imac on 15/8/15.
// Copyright (c) 2015年 All rights reserved.
//
#import <UIKit/UIKit.h>
#import "RegisterViewController.h"
@class LoginViewController;
@interface ViewController :UIViewController
{
RegisterViewController *_registerUser;
LoginViewController *_loginView;
NSDictionary *_dict;
}
@end
//
// ViewController.m
// QQLogin
//
// Created by imac on 15/8/15.
// Copyright (c) 2015年 . All rights reserved.
//
#import "ViewController.h"
#import "RegisterViewController.h"
#import "LoginViewController.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutletUITextField *userNum;
@property (weak, nonatomic) IBOutletUITextField *passWord;
- (IBAction)loginBtn:(UIButton *) button;
- (IBAction)registerBtn;
@end
@implementation ViewController
- (void)viewDidLoad {
[superviewDidLoad];
self.view.backgroundColor = [UIColorcyanColor];
}
-(void)viewDidAppear:(BOOL)animated{
}
- (IBAction)loginBtn:(UIButton *) button{
[self.viewendEditing:YES];
}
- (IBAction)registerBtn {
_registerUser = [[RegisterViewControlleralloc] init];
_registerUser.modalTransitionStyle =UIModalTransitionStyleFlipHorizontal;
[selfpresentViewController:_registerUseranimated:YEScompletion:nil];
_registerUser.block = ^(NSDictionary *dic){
NSLog(@"%@",dic);
_userNum.text = dic[@"userName"];
_passWord.text = dic[@"passW"];
NSLog(@"0000=-----");
};
}
@end
//
// ViewController.m
// QQLogin
//
// Created by imac on 15/8/15.
// Copyright (c) 2015年 . All rights reserved.
//
#import "ViewController.h"
#import "RegisterViewController.h"
#import "LoginViewController.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutletUITextField *userNum;
@property (weak, nonatomic) IBOutletUITextField *passWord;
- (IBAction)loginBtn:(UIButton *) button;
- (IBAction)registerBtn;
@end
@implementation ViewController
- (void)viewDidLoad {
[superviewDidLoad];
self.view.backgroundColor = [UIColorcyanColor];
}
-(void)viewDidAppear:(BOOL)animated{
}
- (IBAction)loginBtn:(UIButton *) button{
[self.viewendEditing:YES];
}
- (IBAction)registerBtn {
_registerUser = [[RegisterViewControlleralloc] init];
_registerUser.modalTransitionStyle =UIModalTransitionStyleFlipHorizontal;
[selfpresentViewController:_registerUseranimated:YEScompletion:nil];
_registerUser.block = ^(NSDictionary *dic){
NSLog(@"%@",dic);
_userNum.text = dic[@"userName"];
_passWord.text = dic[@"passW"];
NSLog(@"0000=-----");
};
}
@end
//
// ViewController.m
// QQLogin
//
// Created by imac on 15/8/15.
// Copyright (c) 2015年 . All rights reserved.
//
#import "ViewController.h"
#import "RegisterViewController.h"
#import "LoginViewController.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutletUITextField *userNum;
@property (weak, nonatomic) IBOutletUITextField *passWord;
- (IBAction)loginBtn:(UIButton *) button;
- (IBAction)registerBtn;
@end
@implementation ViewController
- (void)viewDidLoad {
[superviewDidLoad];
self.view.backgroundColor = [UIColorcyanColor];
}
-(void)viewDidAppear:(BOOL)animated{
}
- (IBAction)loginBtn:(UIButton *) button{
[self.viewendEditing:YES];
}
- (IBAction)registerBtn {
_registerUser = [[RegisterViewControlleralloc] init];
_registerUser.modalTransitionStyle =UIModalTransitionStyleFlipHorizontal;
[selfpresentViewController:_registerUseranimated:YEScompletion:nil];
_registerUser.block = ^(NSDictionary *dic){
NSLog(@"%@",dic);
_userNum.text = dic[@"userName"];
_passWord.text = dic[@"passW"];
NSLog(@"0000=-----");
};
}
@end
- iOS页面跳转传递数据之block的使用
- IOS 页面跳转的数据传递方式
- IOS 页面跳转的数据传递方式
- 【iOS界面处理】使用storyboard实现页面跳转,简单的数据传递
- 【iOS界面处理】使用storyboard实现页面跳转,简单的数据传递
- 【iOS界面处理】使用storyboard实现页面跳转,简单的数据传递
- 【iOS界面处理】使用storyboard实现页面跳转,简单的数据传递
- 【iOS界面处理】使用storyboard实现页面跳转,简单的数据传递
- iOS中使用storyboard实现页面跳转,Segue详解及简单的数据传递
- iOS页面跳转及数据传递
- iOS页面跳转及数据传递
- iOS页面跳转及数据传递
- iOS页面跳转及数据传递
- iOS页面跳转及数据传递
- iOS页面跳转及数据传递
- iOS页面跳转及数据传递
- iOS页面跳转及数据传递
- iOS页面跳转及数据传递
- Android设计模式之工厂模式 Factory
- 爬虫、网页分析解析辅助工具 Xpath-helper
- 黑马程序员--oc语言类和对象
- ZooKeeper=Util 重复注册监听节点
- UIScrollView 实践经验
- iOS页面跳转传递数据之block的使用
- iOS概念入门学习-Foundation框架-Block
- HDU 1061 Rightmost Digit(简单快速幂)
- windows7 ghost系统并拷贝到另一台电脑
- ios-文件读写
- 理解 pkg-config 工具
- Java中的自动装箱与拆箱
- 关于数字的智力题-三个女儿的年龄
- 冒泡排序