码迷,mamicode.com
首页 > 其他好文 > 详细

textView 圆角

时间:2014-08-07 22:41:05      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:des   style   blog   color   io   art   ar   div   

#import <QuartzCore/QuartzCore.h>

[self.content.layer setBackgroundColor:[[UIColor whiteColor] CGColor]];
    [self.content.layer setBorderColor:[[UIColor grayColor] CGColor]];
    [self.content.layer setBorderWidth:1.0];
     [self.content.layer setCornerRadius:8.0];
     [self.content.layer setMasksToBounds:YES];
    self.content.clipsToBounds = YES;

 

 

 

 

 // 商品标题

    imputFeedBackTextView=[[UITextView alloc] initWithFrame:CGRectMake(20, 100, 280, 130)];

    imputFeedBackTextView.font = [UIFont systemFontOfSize:15];

    imputFeedBackTextView.backgroundColor = [UIColor whiteColor];

    [self.view addSubview:imputFeedBackTextView];

    imputFeedBackTextView.hidden=NO;

    imputFeedBackTextView.delegate = self;

    

    // 添加商品标题placeholder

    labelplaceHorder=[[UILabel alloc]initWithFrame:CGRectMake(25, 105,200,20)];

    labelplaceHorder.text = @"请添加商品描述";

    labelplaceHorder.font = [UIFont systemFontOfSize:15];

    labelplaceHorder.textColor=[UIColor colorWithRed:200/256.0 green:200/256.0 blue:200/256.0 alpha:1];

    //  labelGoodsDescription.enabled = NO;    // 设置为不可用

   

   

    [imputFeedBackTextView.layer setBackgroundColor:[[UIColor whiteColor] CGColor]];

    [imputFeedBackTextView.layer setBorderColor:[[UIColor colorWithRed:0.85 green:0.85 blue:0.85 alpha:1] CGColor]];

    [imputFeedBackTextView.layer setBorderWidth:1.0];

    [imputFeedBackTextView.layer setCornerRadius:6.0];

    [imputFeedBackTextView.layer setMasksToBounds:YES];

    imputFeedBackTextView.clipsToBounds = YES;

     [self.view addSubview:labelplaceHorder];

    

//实现UITextView的代理

 

-(void)textViewDidChange:(UITextView *)textView

{

 

    if (imputFeedBackTextView.text.length == 0) {

        labelplaceHorder.text = @"请添加商品描述";

    }else{

        labelplaceHorder.text = @"";

    }


}

 

textView 圆角,布布扣,bubuko.com

textView 圆角

标签:des   style   blog   color   io   art   ar   div   

原文地址:http://www.cnblogs.com/iflewless/p/3898047.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!