登录的背景动画

  UIImageView *ImageScroll = [[UIImageView alloc]init];

    ImageScroll.image = [UIImage imageNamed:@"ic_bg@2x.jpg"];

    ImageScroll.frame = CGRectMake(-self.view.frame.size.width, 0, [UIScreen mainScreen].bounds.size.width*2, [UIScreen mainScreen].bounds.size.height);

    [self.view addSubview:ImageScroll];

    [self.view sendSubviewToBack:ImageScroll];

    

    [UIView beginAnimations:nil context:nil];

    [UIView setAnimationDuration:5];

    [UIView setAnimationRepeatCount:LONG_MAX];

    [UIView setAnimationRepeatAutoreverses:YES];

    [UIView setAnimationCurve:UIViewAnimationCurveLinear];

    ImageScroll.frame = CGRectMake(0, 0, self.view.frame.size.width*2, self.view.frame.size.height);

    [UIView commitAnimations];

    

    NSMutableDictionary *attrs = [NSMutableDictionary dictionary];

    attrs[NSForegroundColorAttributeName] = [UIColor whiteColor];

    //NSAttributedString:带有属性的文字(叫富文本,可以让你的文字丰富多彩)但是这个是不可变的带有属性的文字,创建完成之后就不可以改变了  所以需要可变的

    NSMutableAttributedString *placeHolder = [[NSMutableAttributedString alloc]initWithString:@"请输入用户名" attributes:attrs];

    _TextName.attributedPlaceholder = placeHolder;

    

    NSMutableDictionary *attrs1 = [NSMutableDictionary dictionary];

    attrs1[NSForegroundColorAttributeName] = [UIColor whiteColor];

    //NSAttributedString:带有属性的文字(叫富文本,可以让你的文字丰富多彩)但是这个是不可变的带有属性的文字,创建完成之后就不可以改变了  所以需要可变的

    NSMutableAttributedString *placeHolder1 = [[NSMutableAttributedString alloc]initWithString:@"请输入验证码" attributes:attrs1];

    _textPassWord.attributedPlaceholder = placeHolder1;

    

//     NSString *Str1 = @"^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z\S]{8,16}$";

//    _textPassWord.text =Str1;

    

    _ViewName.layer.cornerRadius = 8;

    _ViewName.layer.masksToBounds = YES;

    

    //给图层添加一个有色边框

    _ViewName.layer.borderWidth = 2;

    _ViewName.layer.borderColor = [[UIColor whiteColor] CGColor];


    _ViewPassWord.layer.cornerRadius = 8;

    _ViewPassWord.layer.masksToBounds = YES;

    

    //给图层添加一个有色边框

    _ViewPassWord.layer.borderWidth = 2;

    _ViewPassWord.layer.borderColor = [[UIColor whiteColor] CGColor];

    

    [self initWaitlable];



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值