IOS开发之QQ登录界面

下面是具体代码

//  ViewController.m

 

#import "ViewController.h"

 

@interface ViewController ()

 

@property (nonatomic,weak) IBOutlet UITextField *text1;

@property (nonatomic,weak) IBOutlet UITextField *text2;

@property (nonatomic,weak) IBOutlet UIButton *button;

 

@end

 

@implementation ViewController

 

- (void)viewDidLoad {

    [super viewDidLoad];

    self.button.layer.cornerRadius = 10;

}

 

- (IBAction)click {

    NSString *str1 = self.text1.text;

    NSString *str2 = self.text2.text;

    NSLog(@"QQ = %@",str1);

    NSLog(@"密码 = %@",str2);

    [self.view endEditing:YES];

}

 

@end

 

PS:占位符 UITextField中得默认显示字在控件面板中得placeholder中设置

 

posted on 2015-02-03 00:56  Holy_Mac  阅读(603)  评论(0编辑  收藏  举报

导航