1.设置UITextView背景图片,在UITextView区域内.
UITextView *textView = [[UITextView alloc] initWithFrame: CGRectMake(100,100,200,100)];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:[textView bounds]];
imageView.image = [UIImage imageNamed:@"background"];
[textView addSubview:imageView];
[textView sendSubviewToBack:imageView];
2.设置居中
textView.textAlignment = NSTextAlignmentCenter