EGOTextView icon indicating copy to clipboard operation
EGOTextView copied to clipboard

Autocomplete box display wrong direction and position.

Open trungp opened this issue 14 years ago • 2 comments

Hi,

I've downloaded EgoTextView, it's great. It's a great textEditor I've ever seen. But I see a issue, if we can fix it, it's really fantastic.

  • The autoComplete box display wrong direction of word (from bottom to top), it display the suggestion word wrong direction.
  • When I change the font with new fontName and size, the autoComplete box display wrong direction and position.

Here is the code which I changed to EGOTextView_DemoViewController.m:

if (_egoTextView==nil) {

    EGOTextView *view = [[EGOTextView alloc] initWithFrame:self.view.bounds];
    view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    view.delegate = (id<EGOTextViewDelegate>)self;
    [self.view addSubview:view];
    self.egoTextView = view;
    self.egoTextView.font = [UIFont fontWithName:@"Helvetica" size:25.0f];
    [view release];  
    [view becomeFirstResponder];

}

I just set the font for egoTextView by this line: self.egoTextView.font = [UIFont fontWithName:@"Helvetica" size:25.0f];

Then I run on iPad 5.0, when I write my text, the autoComplete box display wrong on both of direction and position.

The textEditor would be better if we can fix it.

Thanks in advance and waiting the fix.

trungp avatar Apr 06 '12 05:04 trungp

In case someone is looking for a solution. I'm not saying it is the best one, but that's all I could find after several hours, in EGOContentView implementation :

  • (void) layoutSubviews { [super layoutSubviews];

    for (CALayer * layer in self.layer.sublayers) { layer.geometryFlipped = YES; }

    [self.delegate textChanged]; // reset layout on frame / orientation change

}

aimak avatar Feb 04 '13 16:02 aimak

thanks @aimak this works with charm but i am still having another issue with the autoComplete box origin. This box displayed at wrong position

kamarshad avatar Dec 13 '13 12:12 kamarshad