ios - UITextView Fixed Size and Stop Auto Resizing -


i'm trying add editable text block uiscrollview (so text blocks scroll when keyboard shows up) buttons can change. problem creating uitextview programmatically , adding uiscrollview's subview prevents buttons being able access uitextview.text. added uitextview in scrollview in storyboard, uitextview autoresized 1 character since starts no text. i've tried using cgrectmake, uitextview won't keep width fixed. user won't able see texting 1 character visible @ time.

suggestions on how have fixed width, editable textview, added scrollview keyboard can show, doesn't automatically resize?

here code:

@interface inventoryviewcontroller ()  @property (weak, nonatomic) iboutlet uitextfield *texttitle;  @end  @implementation inventoryviewcontroller   @synthesize texttitle;  -(void) createviewwithtitle {     uiview *whiteview = [[uiview alloc] initwithframe:cgrectmake(0.0f, 0.0f, 320.0f, 400.0f)];     whiteview.backgroundcolor = [uicolor redcolor];      cgsize containersize = cgsizemake(320.0f, 400.0f);     self.containerview = [[uiview alloc] initwithframe:(cgrect) {.origin = cgpointmake(0.0f, 0.0f), .size=containersize}];     [self.scrollview setdelegate:self];     [self.scrollview addsubview:self.containerview];      postion = cgrectmake(122.0f, 34.0f, 178.0f, 30.0f);     [texttitle settextcolor:[uicolor blackcolor]];     [texttitle setborderstyle:uitextborderstyleroundedrect];     [texttitle setframe:postion];     [texttitle settext:@""];     [whiteview addsubview:texttitle]; }  - (ibaction)buttonquantityadd:(id)sender {      [self updaterecordwithtitle:texttitle.text]; }  @end 

this trying achieve:

what want

this using uitextview , code above...

what have


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -