1

The below picture shows that there is a view Inside TextView. Now I want that Where UIView ends from there textview starts editing, not only from Left-top also from left-bottom.

How to do it ?

Is it possible ?

If Yes, then how ?

If no, then any other suggestion ?

In case of text filed below code is applied for left padding

UIView *paddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 10, 20)];
    textField.leftView = paddingView;
    textField.leftViewMode = UITextFieldViewModeAlways;

enter image description here

Aarti Oza
  • 1,134
  • 2
  • 14
  • 31

1 Answers1

1

You can wrap textfiled using below code

UIBezierPath * imgRect = [UIBezierPath bezierPathWithRect:CGRectMake(0, 0, 30, 30)];
self.textView.textContainer.exclusionPaths = @[imgRect];

And, now you can add any control in place of "imgRect"

 UIView *spacerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
spacerView1.backgroundColor = [UIColor redColor]; 
[textView addSubview:spacerView1];
Aarti Oza
  • 1,134
  • 2
  • 14
  • 31