---
title: "给 TextView 加个圆角"
author: "niCe"
date: "2010-12-31T10:47:08Z"
tags: []
categories: ["移动开发"]
slug: "textview"
draft: false
lastmod: "2010-12-31T10:47:08Z"
id: 856603
url: "https://nice.iteye.com/blog/856603"
---

给 TextView 加上圆角无疑会让界面更漂亮更有苹果味儿

 

 

```
   #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;
```