问题
How can i add border to uitextview little beyond its bounds. Can i give the location for border or do i have to add custom border and give position to it.Any help will be appreciated.
回答1:
it's easy task. you have to add quartz core framework
and write the following line
CALayer *imageLayer = textView.layer;
[imageLayer setCornerRadius:10];
[imageLayer setBorderWidth:1];
imageLayer.borderColor=[[UIColor lightGrayColor] CGColor];
回答2:
Add "QuartzCore" Framework And Import It in your HeaderFile
#import <QuartzCore/QuartzCore.h>
in .h File
UITextView *TextView;
For Setting The Border IN TextView
TextView.layer.borderWidth = 1.0f;
TextView.layer.borderColor = [[UIColor grayColor] CGColor]; //[YounCan Use any Color For Border]
回答3:
This has really simple integration and brilliant text view customisation: https://github.com/99centsappdevelopment/JSTextView
来源:https://stackoverflow.com/questions/8798508/adding-custom-border-around-uitextview-but-little-beyond-its-bounds